munish0838 commited on
Commit
fdaa486
Β·
verified Β·
1 Parent(s): 7c52427

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ base_model: mlabonne/OrpoLlama-3-8B
14
+ ---
15
+
16
+ # OrpoLlama-3-8B-GGUF
17
+ - This is quantized version of [mlabonne/OrpoLlama-3-8B](https://huggingface.co/mlabonne/OrpoLlama-3-8B) created using llama.cpp
18
+
19
+ # Model Description
20
+
21
+ ![](https://i.imgur.com/ZHwzQvI.png)
22
+
23
+ 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).
24
+
25
+ It's a successful fine-tune that follows the ChatML template!
26
+
27
+
28
+ ## πŸ”Ž Application
29
+
30
+ This model uses a context window of 8k. It was trained with the ChatML template.
31
+
32
+ ## πŸ† Evaluation
33
+
34
+ ### Nous
35
+
36
+ OrpoLlama-4-8B outperforms Llama-3-8B-Instruct on the GPT4All and TruthfulQA datasets.
37
+
38
+ 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).
39
+
40
+ | Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench |
41
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------: | --------: | --------: | ---------: | --------: |
42
+ | [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 |
43
+ | [**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** |
44
+ | [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 |
45
+ | [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 |
46
+
47
+ `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)).
48
+
49
+ ### Open LLM Leaderboard
50
+
51
+ TBD.
52
+
53
+ ## πŸ“ˆ Training curves
54
+
55
+ You can find the experiment on W&B at [this address](https://wandb.ai/mlabonne/DPO/runs/vxnmq24z/workspace?nw=nwusermlabonne).
56
+
57
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/zm71HyZiG96YY1GUtpfHq.png)
58
+
59
+ ## πŸ’» Usage
60
+
61
+ ```python
62
+ !pip install -qU transformers accelerate
63
+
64
+ from transformers import AutoTokenizer
65
+ import transformers
66
+ import torch
67
+
68
+ model = "mlabonne/OrpoLlama-3-8B"
69
+ messages = [{"role": "user", "content": "What is a large language model?"}]
70
+
71
+ tokenizer = AutoTokenizer.from_pretrained(model)
72
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
73
+ pipeline = transformers.pipeline(
74
+ "text-generation",
75
+ model=model,
76
+ torch_dtype=torch.float16,
77
+ device_map="auto",
78
+ )
79
+
80
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
81
+ print(outputs[0]["generated_text"])
82
+ ```