Update README.md
Browse files
README.md
CHANGED
@@ -8,3 +8,38 @@ tags:
|
|
8 |
---
|
9 |
---
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
9 |
---
|
10 |
|
11 |
+
Update README.md
|
12 |
+
# 🦜 EmertonOmniBeagle-7B-dpo
|
13 |
+
|
14 |
+
EmertonOmniBeagle-7B-dpo is a DPO fine-tune of [mlabonne/OmniBeagle14-7B](https://huggingface.co/mlabonne/OmniBeagle-7B) using the [yleo/emerton_dpo_pairs](https://huggingface.co/datasets/yleo/emerton_dpo_pairs) preference dataset created from [Intel/orca_dpo_pairs](https://huggingface.co/datasets/Intel/orca_dpo_pairs) by replacing gpt 3.5 answer by a gpt4 Turbo answer. Then, gpt4 Turbo is put as chosen whereas gpt4 is put as rejected.
|
15 |
+
|
16 |
+
## 🔍 Applications
|
17 |
+
|
18 |
+
This model uses a context window of 8k. It is compatible with different templates, like chatml and Llama's chat template.
|
19 |
+
|
20 |
+
## 🏆 Evaluation
|
21 |
+
|
22 |
+
### Open LLM Leaderboard
|
23 |
+
|
24 |
+
To come...
|
25 |
+
|
26 |
+
## 💻 Usage
|
27 |
+
|
28 |
+
```python
|
29 |
+
!pip install -qU transformers accelerate
|
30 |
+
from transformers import AutoTokenizer
|
31 |
+
import transformers
|
32 |
+
import torch
|
33 |
+
model = "yleo/EmertonOmniBeagle14-7B"
|
34 |
+
messages = [{"role": "user", "content": "How to improve LLM fine-tuning?"}]
|
35 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
36 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
37 |
+
pipeline = transformers.pipeline(
|
38 |
+
"text-generation",
|
39 |
+
model=model,
|
40 |
+
torch_dtype=torch.float16,
|
41 |
+
device_map="auto",
|
42 |
+
)
|
43 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
44 |
+
print(outputs[0]["generated_text"])
|
45 |
+
```
|