Commit
β’
c840381
1
Parent(s):
ba1ea61
Upload folder using huggingface_hub
Browse files- .gitattributes +5 -35
- OrpoLlama-3-8B-Q3_K_L.gguf +3 -0
- OrpoLlama-3-8B-Q4_K_M.gguf +3 -0
- OrpoLlama-3-8B-Q5_K_M.gguf +3 -0
- OrpoLlama-3-8B-Q6_K.gguf +3 -0
- OrpoLlama-3-8B-Q8_0.gguf +3 -0
- README.md +79 -0
.gitattributes
CHANGED
@@ -1,35 +1,5 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
+
OrpoLlama-3-8B-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
2 |
+
OrpoLlama-3-8B-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
3 |
+
OrpoLlama-3-8B-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
4 |
+
OrpoLlama-3-8B-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
5 |
+
OrpoLlama-3-8B-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OrpoLlama-3-8B-Q3_K_L.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a8d01ad7549e9865493cf75c3f79eb6609e254da2e13cdc5e7d6d9cecdd05b1b
|
3 |
+
size 4322479264
|
OrpoLlama-3-8B-Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6bd6a641d7aac4d29aae585d1bc14f4144455d14f16f66bcdd9505c4052ae579
|
3 |
+
size 4921258208
|
OrpoLlama-3-8B-Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3150ed675a5faee2979cca9f3d8366e1a89130fea85e55aab4a7e104977e5b3c
|
3 |
+
size 5733512416
|
OrpoLlama-3-8B-Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:62904c6a089615da493f03e4a968e85e11e16e6f3a12481f4a3ea41cb443fcf4
|
3 |
+
size 6596532512
|
OrpoLlama-3-8B-Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:31f2210b42ede89712fbdf85c975aa5a47ed58392f3b760f937d14c52ff9b835
|
3 |
+
size 8541300896
|
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: other
|
5 |
+
library_name: transformers
|
6 |
+
tags:
|
7 |
+
- orpo
|
8 |
+
- llama 3
|
9 |
+
- rlhf
|
10 |
+
- sft
|
11 |
+
datasets:
|
12 |
+
- mlabonne/orpo-dpo-mix-40k
|
13 |
+
---
|
14 |
+
|
15 |
+
# OrpoLlama-3-8B
|
16 |
+
|
17 |
+
![](https://i.imgur.com/ZHwzQvI.png)
|
18 |
+
|
19 |
+
This is an ORPO fine-tune of [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on 1k samples of [mlabonne/orpo-dpo-mix-40k](https://huggingface.co/datasets/mlabonne/orpo-dpo-mix-40k) created for [this article](https://huggingface.co/blog/mlabonne/orpo-llama-3).
|
20 |
+
|
21 |
+
It's a successful fine-tune that follows the ChatML template!
|
22 |
+
|
23 |
+
**Try the demo**: https://huggingface.co/spaces/mlabonne/OrpoLlama-3-8B
|
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 |
+
### Nous
|
32 |
+
|
33 |
+
OrpoLlama-4-8B outperforms Llama-3-8B-Instruct on the GPT4All and TruthfulQA datasets.
|
34 |
+
|
35 |
+
Evaluation performed using [LLM AutoEval](https://github.com/mlabonne/llm-autoeval), see the entire leaderboard [here](https://huggingface.co/spaces/mlabonne/Yet_Another_LLM_Leaderboard).
|
36 |
+
|
37 |
+
| Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench |
|
38 |
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------: | --------: | --------: | ---------: | --------: |
|
39 |
+
| [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) [π](https://gist.github.com/mlabonne/8329284d86035e6019edb11eb0933628) | 51.34 | 41.22 | 69.86 | 51.65 | 42.64 |
|
40 |
+
| [**mlabonne/OrpoLlama-3-8B**](https://huggingface.co/mlabonne/OrpoLlama-3-8B) [π](https://gist.github.com/mlabonne/22896a1ae164859931cc8f4858c97f6f) | **48.63** | **34.17** | **70.59** | **52.39** | **37.36** |
|
41 |
+
| [mlabonne/OrpoLlama-3-8B-1k](https://huggingface.co/mlabonne/OrpoLlama-3-8B) [π](https://gist.github.com/mlabonne/f41dad371d1781d0434a4672fd6f0b82) | 46.76 | 31.56 | 70.19 | 48.11 | 37.17 |
|
42 |
+
| [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) [π](https://gist.github.com/mlabonne/616b6245137a9cfc4ea80e4c6e55d847) | 45.42 | 31.1 | 69.95 | 43.91 | 36.7 |
|
43 |
+
|
44 |
+
`mlabonne/OrpoLlama-3-8B-1k` corresponds to a version of this model trained on 1K samples (you can see the parameters in [this article](https://huggingface.co/blog/mlabonne/orpo-llama-3)).
|
45 |
+
|
46 |
+
### Open LLM Leaderboard
|
47 |
+
|
48 |
+
TBD.
|
49 |
+
|
50 |
+
## π Training curves
|
51 |
+
|
52 |
+
You can find the experiment on W&B at [this address](https://wandb.ai/mlabonne/DPO/runs/vxnmq24z/workspace?nw=nwusermlabonne).
|
53 |
+
|
54 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/zm71HyZiG96YY1GUtpfHq.png)
|
55 |
+
|
56 |
+
## π» Usage
|
57 |
+
|
58 |
+
```python
|
59 |
+
!pip install -qU transformers accelerate
|
60 |
+
|
61 |
+
from transformers import AutoTokenizer
|
62 |
+
import transformers
|
63 |
+
import torch
|
64 |
+
|
65 |
+
model = "mlabonne/OrpoLlama-3-8B"
|
66 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
67 |
+
|
68 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
69 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
70 |
+
pipeline = transformers.pipeline(
|
71 |
+
"text-generation",
|
72 |
+
model=model,
|
73 |
+
torch_dtype=torch.float16,
|
74 |
+
device_map="auto",
|
75 |
+
)
|
76 |
+
|
77 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
78 |
+
print(outputs[0]["generated_text"])
|
79 |
+
```
|