Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,63 @@
|
|
1 |
---
|
|
|
|
|
2 |
license: llama3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
license: llama3
|
5 |
+
library_name: transformers
|
6 |
+
tags:
|
7 |
+
- orpo
|
8 |
+
- llama 3
|
9 |
+
- rlhf
|
10 |
+
- sft
|
11 |
+
datasets:
|
12 |
+
- mlabonne/orpo-dpo-mix-40k
|
13 |
+
base_model:
|
14 |
+
- meta-llama/Meta-Llama-3-70B
|
15 |
---
|
16 |
+
|
17 |
+
# dfurman/Llama-3-70B-Orpo-v0.1
|
18 |
+
|
19 |
+
![](https://i.imgur.com/ZHwzQvI.png)
|
20 |
+
|
21 |
+
This is an ORPO fine-tune of [meta-llama/Meta-Llama-3-70B](https://huggingface.co/meta-llama/Meta-Llama-3-70B) on 2k samples of [mlabonne/orpo-dpo-mix-40k](https://huggingface.co/datasets/mlabonne/orpo-dpo-mix-40k).
|
22 |
+
|
23 |
+
It's a successful fine-tune that follows the ChatML template!
|
24 |
+
|
25 |
+
## ๐ Application
|
26 |
+
|
27 |
+
This model uses a context window of 8k. It was trained with the ChatML template.
|
28 |
+
|
29 |
+
## ๐ Evaluation
|
30 |
+
|
31 |
+
### Open LLM Leaderboard
|
32 |
+
|
33 |
+
TBD.
|
34 |
+
|
35 |
+
## ๐ Training curves
|
36 |
+
|
37 |
+
You can find the experiment on W&B at [this address](https://wandb.ai/dryanfurman/huggingface/runs/ojsbud95/workspace?nw=nwuserdryanfurman).
|
38 |
+
|
39 |
+
|
40 |
+
## ๐ป Usage
|
41 |
+
|
42 |
+
```python
|
43 |
+
!pip install -qU transformers accelerate
|
44 |
+
|
45 |
+
from transformers import AutoTokenizer
|
46 |
+
import transformers
|
47 |
+
import torch
|
48 |
+
|
49 |
+
model = "dfurman/Llama-3-70B-Orpo-v0.1"
|
50 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
51 |
+
|
52 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
53 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
54 |
+
pipeline = transformers.pipeline(
|
55 |
+
"text-generation",
|
56 |
+
model=model,
|
57 |
+
torch_dtype=torch.float16,
|
58 |
+
device_map="auto",
|
59 |
+
)
|
60 |
+
|
61 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
62 |
+
print(outputs[0]["generated_text"])
|
63 |
+
```
|