jondurbin commited on
Commit
91ae688
·
verified ·
1 Parent(s): 82a6518

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +207 -0
README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <img src="https://huggingface.co/datasets/allenai/blog-images/resolve/main/tulu3/Tulu3-logo.png" alt="Tulu 3 banner" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
2
+
3
+ # Llama-3.1-Tulu-3-405B
4
+
5
+ Tülu3 is a leading instruction following model family, offering fully open-source data, code, and recipes designed to serve as a comprehensive guide for modern post-training techniques.
6
+ Tülu3 is designed for state-of-the-art performance on a diversity of tasks in addition to chat, such as MATH, GSM8K, and IFEval.
7
+
8
+ ## Model description
9
+
10
+ - **Model type:** A model trained on a mix of publicly available, synthetic and human-created datasets.
11
+ - **Language(s) (NLP):** Primarily English
12
+ - **License:** Llama 3.1 Community License Agreement
13
+ - **Finetuned from model:** allenai/Llama-3.1-Tulu-3-405B-DPO
14
+
15
+ ### Model Sources
16
+
17
+ - **Training Repository:** https://github.com/allenai/open-instruct
18
+ - **Eval Repository:** https://github.com/allenai/olmes
19
+ - **Paper:** https://arxiv.org/abs/2411.15124
20
+ - **Demo:** https://playground.allenai.org/
21
+
22
+ ### Model Family
23
+
24
+ | **Stage** | **Llama 3.1 8B** | **Llama 3.1 70B** |
25
+ |----------------------|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
26
+ | **Base Model** | [meta-llama/Llama-3.1-8B](https://huggingface.co/meta-llama/Llama-3.1-8B) | [meta-llama/Llama-3.1-70B](https://huggingface.co/meta-llama/Llama-3.1-70B) |
27
+ | **SFT** | [allenai/Llama-3.1-Tulu-3-8B-SFT](https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B-SFT) | [allenai/Llama-3.1-Tulu-3-70B-SFT](https://huggingface.co/allenai/Llama-3.1-Tulu-3-70B-SFT) |
28
+ | **DPO** | [allenai/Llama-3.1-Tulu-3-8B-DPO](https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B-DPO) | [allenai/Llama-3.1-Tulu-3-70B-DPO](https://huggingface.co/allenai/Llama-3.1-Tulu-3-70B-DPO) |
29
+ | **Final Models (RLVR)** | [allenai/Llama-3.1-Tulu-3-8B](https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B) | [allenai/Llama-3.1-Tulu-3-70B](https://huggingface.co/allenai/Llama-3.1-Tulu-3-70B) |
30
+ | **Reward Model (RM)**| [allenai/Llama-3.1-Tulu-3-8B-RM](https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B-RM) | (Same as 8B) |
31
+
32
+ | **Stage** | **Llama 3.1 405B** |
33
+ |-----------|-------------------|
34
+ | **Base Model** | [meta-llama/llama-3.1-405B](https://huggingface.co/meta-llama/llama-3.1-405B) |
35
+ | **SFT** | [allenai/llama-3.1-Tulu-3-405B-SFT](https://huggingface.co/allenai/llama-3.1-Tulu-3-405B-SFT) |
36
+ | **DPO** | [allenai/llama-3.1-Tulu-3-405B-DPO](https://huggingface.co/allenai/llama-3.1-Tulu-3-405B-DPO) |
37
+ | **Final Model (RLVR)** | [allenai/llama-3.1-Tulu-3-405B](https://huggingface.co/allenai/llama-3.1-Tulu-3-405B) |
38
+ | **Reward Model (RM)**| (Same as 8B)
39
+
40
+
41
+ ## Using the model
42
+
43
+ ### Loading with HuggingFace
44
+
45
+ To load the model with HuggingFace, use the following snippet:
46
+ ```
47
+ from transformers import AutoModelForCausalLM
48
+
49
+ tulu_model = AutoModelForCausalLM.from_pretrained("allenai/Llama-3.1-Tulu-3-405B")
50
+ ```
51
+
52
+ ### VLLM
53
+
54
+ As a Llama base model, the model can be easily served with:
55
+ ```
56
+ vllm serve allenai/Llama-3.1-Tulu-3-405B
57
+ ```
58
+ Note that given the long chat template of Llama, you may want to use `--max_model_len=8192`.
59
+
60
+ ### Chat template
61
+
62
+ The chat template for our models is formatted as:
63
+ ```
64
+ <|user|>\nHow are you doing?\n<|assistant|>\nI'm just a computer program, so I don't have feelings, but I'm functioning as expected. How can I assist you today?<|endoftext|>
65
+ ```
66
+ Or with new lines expanded:
67
+ ```
68
+ <|user|>
69
+ How are you doing?
70
+ <|assistant|>
71
+ I'm just a computer program, so I don't have feelings, but I'm functioning as expected. How can I assist you today?<|endoftext|>
72
+ ```
73
+ It is embedded within the tokenizer as well, for `tokenizer.apply_chat_template`.
74
+
75
+ ### System prompt
76
+
77
+ In Ai2 demos, we use this system prompt by default:
78
+ ```
79
+ You are Tulu 3, a helpful and harmless AI Assistant built by the Allen Institute for AI.
80
+ ```
81
+ The model has not been trained with a specific system prompt in mind.
82
+
83
+ ### Bias, Risks, and Limitations
84
+
85
+ The Tülu3 models have limited safety training, but are not deployed automatically with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
86
+ It is also unknown what the size and composition of the corpus was used to train the base Llama 3.1 models, however it is likely to have included a mix of Web data and technical sources like books and code.
87
+ See the Falcon 180B model card for an example of this.
88
+
89
+
90
+ ## Performance
91
+
92
+ | Benchmark (eval) | Tülu 3 SFT 8B | Tülu 3 DPO 8B | Tülu 3 8B | Llama 3.1 8B Instruct | Qwen 2.5 7B Instruct | Magpie 8B | Gemma 2 9B Instruct | Ministral 8B Instruct |
93
+ |---------------------------------|----------------|----------------|------------|------------------------|----------------------|-----------|---------------------|-----------------------|
94
+ | **Avg.** | 60.4 | 64.4 | **64.8** | 62.2 | 57.8 | 44.7 | 55.2 | 58.3 |
95
+ | **MMLU (0 shot, CoT)** | 65.9 | 68.7 | 68.2 | 71.2 | **76.6** | 62.0 | 74.6 | 68.5 |
96
+ | **PopQA (15 shot)** | **29.3** | 29.3 | 29.1 | 20.2 | 18.1 | 22.5 | 28.3 | 20.2 |
97
+ | **TruthfulQA (6 shot)** | 46.8 | 56.1 | 55.0 | 55.1 | **63.1** | 57.0 | 61.4 | 55.5 |
98
+ | **BigBenchHard (3 shot, CoT)** | **67.9** | 65.8 | 66.0 | 62.8 | 21.7 | 0.9 | 2.5 | 56.2 |
99
+ | **DROP (3 shot)** | 61.3 | 62.5 | **62.6** | 61.5 | 54.4 | 49.4 | 58.8 | 56.2 |
100
+ | **MATH (4 shot CoT, Flex)** | 31.5 | 42.0 | **43.7** | 42.5 | 14.8 | 5.1 | 29.8 | 40.0 |
101
+ | **GSM8K (8 shot, CoT)** | 76.2 | 84.3 | **87.6** | 83.4 | 83.8 | 61.2 | 79.7 | 80.0 |
102
+ | **HumanEval (pass@10)** | 86.2 | 83.9 | 83.9 | 86.3 | **93.1** | 75.4 | 71.7 | 91.0 |
103
+ | **HumanEval+ (pass@10)** | 81.4 | 78.6 | 79.2 | 82.9 | **89.7** | 69.1 | 67.0 | 88.5 |
104
+ | **IFEval (prompt loose)** | 72.8 | 81.1 | **82.4** | 80.6 | 74.7 | 38.8 | 69.9 | 56.4 |
105
+ | **AlpacaEval 2 (LC % win)** | 12.4 | 33.5 | 34.5 | 24.2 | 29.0 | **49.0** | 43.7 | 31.4 |
106
+ | **Safety (6 task avg.)** | **93.1** | 87.2 | 85.5 | 75.2 | 75.0 | 46.4 | 75.5 | 56.2 |
107
+
108
+ | Benchmark (eval) | Tülu 3 70B SFT | Tülu 3 DPO 70B | Tülu 3 70B | Llama 3.1 70B Instruct | Qwen 2.5 72B Instruct | Hermes 3 Llama 3.1 70B | Nemotron Llama 3.1 70B |
109
+ |---------------------------------|-----------------|-----------------|-------------|-------------------------|-----------------------|------------------------|-------------------------|
110
+ | **Avg.** | 72.6 | 75.9 | **76.0** | 73.4 | 71.5 | 68.3 | 65.5 |
111
+ | **MMLU (0 shot, CoT)** | 78.9 | 83.3 | 83.1 | 85.3 | **85.5** | 80.4 | 83.8 |
112
+ | **PopQA (15 shot)** | **48.6** | 46.3 | 46.5 | 46.4 | 30.6 | 48.1 | 36.4 |
113
+ | **TruthfulQA (6 shot)** | 55.7 | 67.9 | 67.6 | 66.8 | **69.9** | 66.5 | 62.6 |
114
+ | **BigBenchHard (3 shot, CoT)** | **82.7** | 81.8 | 82.0 | 73.8 | 67.2 | 82.1 | 0.7 |
115
+ | **DROP (3 shot)** | **77.2** | 74.1 | 74.3 | 77.0 | 34.2 | 73.2 | 68.8 |
116
+ | **MATH (4 shot CoT, Flex)** | 53.7 | 62.3 | 63.0 | 56.4 | **74.3** | 41.9 | 55.0 |
117
+ | **GSM8K (8 shot, CoT)** | 91.1 | 93.5 | 93.5 | **93.7** | 89.5 | 90.0 | 84.7 |
118
+ | **HumanEval (pass@10)** | 92.9 | 92.4 | 92.4 | 93.6 | 94.0 | 89.6 | **94.1** |
119
+ | **HumanEval+ (pass@10)** | 87.3 | 88.4 | 88.0 | 89.5 | **90.8** | 85.9 | 85.5 |
120
+ | **IFEval (prompt loose)** | 82.1 | 82.6 | 83.2 | **88.0** | 87.6 | 76.0 | 79.9 |
121
+ | **AlpacaEval 2 (LC % win)** | 26.3 | 49.6 | 49.8 | 33.4 | 47.7 | 28.4 | **66.1** |
122
+ | **Safety (6 task avg.)** | **94.4** | 89.0 | 88.3 | 76.5 | 87.0 | 57.9 | 69.0 |
123
+
124
+ | Benchmark (eval) | Tülu 3 405B SFT | Tülu 3 405B DPO | Tülu 3 405B | Llama 3.1 405B Instruct | Nous Hermes 3 405B | Deepseek V3 | GPT 4o (11-24) |
125
+ |-----------------|----------------|----------------|-------------|------------------------|-------------------|-------------|----------------|
126
+ | **Avg w/o Safety** | 76.3 | 79.0 | 80.0 | 78.1 | 74.4 | 79.0 | **80.5** |
127
+ | **Avg w/ Safety** | 77.5 | 79.6 | 80.7 | 79.0 | 73.5 | 75.9 | **81.6** |
128
+ | **MMLU (5 shot, CoT)** | 84.4 | 86.6 | 87.0 | **88.0** | 84.9 | 82.1 | 87.9 |
129
+ | **PopQA (3 shot)** | **55.7** | 55.4 | 55.5 | 52.9 | 54.2 | 44.9 | 53.6 |
130
+ | **BigBenchHard (0 shot, CoT)** | 88.0 | 88.8 | 88.6 | 87.1 | 87.7 | **89.5** | 83.3 |
131
+ | **MATH (4 shot, Flex)** | 63.4 | 59.9 | 67.3 | 66.6 | 58.4 | **72.5** | 68.8 |
132
+ | **GSM8K (8 shot, CoT)** | 93.6 | 94.2 | **95.5** | 95.4 | 92.7 | 94.1 | 91.7 |
133
+ | **HumanEval (pass@10)** | 95.7 | **97.2** | 95.9 | 95.9 | 92.3 | 94.6 | 97.0 |
134
+ | **HumanEval+ (pass@10)** | 93.3 | **93.9** | 92.9 | 90.3 | 86.9 | 91.6 | 92.7 |
135
+ | **IFEval (prompt loose)** | 82.4 | 85.0 | 86.0 | **88.4** | 81.9 | 88.0 | 84.8 |
136
+ | **AlpacaEval 2 (LC % win)** | 30.4 | 49.8 | 51.4 | 38.5 | 30.2 | 53.5 | **65.0** |
137
+ | **Safety (6 task avg.)** | 87.7 | 85.5 | 86.7 | 86.8 | 65.8 | 72.2 | **90.9** |
138
+
139
+
140
+ ## Hyperparamters
141
+
142
+ PPO settings for RLVR:
143
+ - **Learning Rate**: 1 × 10⁻⁷
144
+ - **Discount Factor (gamma)**: 1.0
145
+ - **General Advantage Estimation (lambda)**: 0.95
146
+ - **Mini-batches (N_mb)**: 1
147
+ - **PPO Update Iterations (K)**: 4
148
+ - **PPO's Clipping Coefficient (epsilon)**: 0.2
149
+ - **Value Function Coefficient (c1)**: 0.1
150
+ - **Gradient Norm Threshold**: 1.0
151
+ - **Learning Rate Schedule**: Linear
152
+ - **Generation Temperature**: 1.0
153
+ - **Batch Size (effective)**: 1,856
154
+ - **Max Token Length**: 2,048
155
+ - **Max Prompt Token Length**: 2,048
156
+ - **Penalty Reward Value for Responses without an EOS Token**: -10.0
157
+ - **Response Length**: 2,048
158
+ - **Total Episodes**: 300,000
159
+ - **KL penalty coefficient (beta)**: 0.05
160
+ - **Warm up ratio (omega)**: 0.0
161
+
162
+ ## License and use
163
+
164
+ All Llama 3.1 Tülu3 models are released under Meta's [Llama 3.1 Community License Agreement](https://www.llama.com/llama3_1/license/).
165
+ Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc.
166
+ Tülu3 is intended for research and educational use.
167
+ For more information, please see our [Responsible Use Guidelines](https://allenai.org/responsible-use).
168
+
169
+ The models have been fine-tuned using a dataset mix with outputs generated from third party models and are subject to additional terms:
170
+ [Gemma Terms of Use](https://ai.google.dev/gemma/terms) and [Qwen License Agreement](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE) (models were improved using Qwen 2.5).
171
+
172
+
173
+ ## Citation
174
+
175
+ If Tülu3 or any of the related materials were helpful to your work, please cite:
176
+ ```
177
+ @article{lambert2024tulu3,
178
+ title = {Tülu 3: Pushing Frontiers in Open Language Model Post-Training},
179
+ author = {
180
+ Nathan Lambert and
181
+ Jacob Morrison and
182
+ Valentina Pyatkin and
183
+ Shengyi Huang and
184
+ Hamish Ivison and
185
+ Faeze Brahman and
186
+ Lester James V. Miranda and
187
+ Alisa Liu and
188
+ Nouha Dziri and
189
+ Shane Lyu and
190
+ Yuling Gu and
191
+ Saumya Malik and
192
+ Victoria Graf and
193
+ Jena D. Hwang and
194
+ Jiangjiang Yang and
195
+ Ronan Le Bras and
196
+ Oyvind Tafjord and
197
+ Chris Wilhelm and
198
+ Luca Soldaini and
199
+ Noah A. Smith and
200
+ Yizhong Wang and
201
+ Pradeep Dasigi and
202
+ Hannaneh Hajishirzi
203
+ },
204
+ year = {2024},
205
+ email = {[email protected]}
206
+ }
207
+ ```