File size: 1,719 Bytes
7e6822b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
966bded
7e6822b
bd0a89d
 
 
 
7e6822b
bd0a89d
 
 
7e6822b
bd0a89d
 
 
 
7e6822b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
license: other
library_name: peft
tags:
- generated_from_trainer
base_model: microsoft/phi-2
model-index:
- name: phi-2-FCRL-v0.1
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# phi-2-FCRL-v0.1

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)

### Quick start
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("npvinHnivqn/phi-2-FCRL-v0.1", trust_remote_code=True, torch_dtype=torch.float32)
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2-FCRL-v0.1", trust_remote_code=True)
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)

outputs = model.generate(**inputs, max_length=512)
text = tokenizer.batch_decode(outputs)[0]
print(text)
```

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 2
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- num_epochs: 1

### Framework versions

- PEFT 0.7.1
- Transformers 4.36.0
- Pytorch 2.0.0
- Datasets 2.15.0
- Tokenizers 0.15.0