npvinHnivqn
commited on
Commit
•
bd0a89d
1
Parent(s):
f6c9731
Update README.md
Browse files
README.md
CHANGED
@@ -14,21 +14,21 @@ should probably proofread and complete it, then remove this comment. -->
|
|
14 |
|
15 |
# phi-2-FCRL-v0.1
|
16 |
|
17 |
-
This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on
|
18 |
|
19 |
-
|
|
|
|
|
|
|
20 |
|
21 |
-
|
|
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
## Training and evaluation data
|
28 |
-
|
29 |
-
More information needed
|
30 |
-
|
31 |
-
## Training procedure
|
32 |
|
33 |
### Training hyperparameters
|
34 |
|
@@ -41,10 +41,6 @@ The following hyperparameters were used during training:
|
|
41 |
- lr_scheduler_type: cosine
|
42 |
- num_epochs: 1
|
43 |
|
44 |
-
### Training results
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
### Framework versions
|
49 |
|
50 |
- PEFT 0.7.1
|
|
|
14 |
|
15 |
# phi-2-FCRL-v0.1
|
16 |
|
17 |
+
This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on [vicgalle/alpaca-gpt4]{https://huggingface.co/vicgalle/alpaca-gpt4}, [nRuaif/OpenOrca-GPT3.5]{https://huggingface.co/nRuaif/OpenOrca-GPT3.5}, [sahil2801/CodeAlpaca-20k]{https://huggingface.co/sahil2801/CodeAlpaca-20k}
|
18 |
|
19 |
+
### Quick start
|
20 |
+
```python
|
21 |
+
import torch
|
22 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
23 |
|
24 |
+
model = AutoModelForCausalLM.from_pretrained("npvinHnivqn/phi-2-FCRL-v0.1", trust_remote_code=True, torch_dtype=torch.float32)
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2-FCRL-v0.1", trust_remote_code=True)
|
26 |
+
inputs = tokenizer('''<SYSTEM>: You are a very good and helpful chatbot, you can answer almost every questions. <|USER|>: Write a short story about a curious cat <|BOT|>:''', return_tensors="pt", return_attention_mask=False)
|
27 |
|
28 |
+
outputs = model.generate(**inputs, max_length=512)
|
29 |
+
text = tokenizer.batch_decode(outputs)[0]
|
30 |
+
print(text)
|
31 |
+
```
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
### Training hyperparameters
|
34 |
|
|
|
41 |
- lr_scheduler_type: cosine
|
42 |
- num_epochs: 1
|
43 |
|
|
|
|
|
|
|
|
|
44 |
### Framework versions
|
45 |
|
46 |
- PEFT 0.7.1
|