Text Generation
Transformers
PyTorch
Safetensors
English
llama
conversational
text-generation-inference
Inference Endpoints
natolambert commited on
Commit
9b9d8d5
1 Parent(s): 1c860d7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -183
README.md CHANGED
@@ -1,204 +1,133 @@
1
  ---
2
- # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
- # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
- {}
 
 
 
 
 
 
 
 
 
5
  ---
6
 
7
- # Model Card for Model ID
8
 
9
- <!-- Provide a quick summary of what the model is/does. -->
10
 
11
  <img src="https://huggingface.co/datasets/allenai/blog-images/resolve/main/tulu-v2/Tulu%20V2%20banner.png" alt="TuluV2 banner" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
12
 
13
- This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
14
 
15
- ## Model Details
16
-
17
- ### Model Description
18
-
19
- <!-- Provide a longer summary of what this model is. -->
20
-
21
-
22
-
23
- - **Developed by:** [More Information Needed]
24
- - **Funded by [optional]:** [More Information Needed]
25
- - **Shared by [optional]:** [More Information Needed]
26
- - **Model type:** [More Information Needed]
27
- - **Language(s) (NLP):** [More Information Needed]
28
- - **License:** [More Information Needed]
29
- - **Finetuned from model [optional]:** [More Information Needed]
30
-
31
- ### Model Sources [optional]
32
-
33
- <!-- Provide the basic links for the model. -->
34
-
35
- - **Repository:** [More Information Needed]
36
- - **Paper [optional]:** [More Information Needed]
37
- - **Demo [optional]:** [More Information Needed]
38
-
39
- ## Uses
40
-
41
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
42
-
43
- ### Direct Use
44
-
45
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
46
-
47
- [More Information Needed]
48
-
49
- ### Downstream Use [optional]
50
-
51
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
52
-
53
- [More Information Needed]
54
-
55
- ### Out-of-Scope Use
56
-
57
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
58
-
59
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ## Bias, Risks, and Limitations
62
 
63
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
64
 
65
- [More Information Needed]
66
-
67
- ### Recommendations
68
-
69
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
70
-
71
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
72
-
73
- ## How to Get Started with the Model
74
-
75
- Use the code below to get started with the model.
76
-
77
- [More Information Needed]
78
-
79
- ## Training Details
80
-
81
- ### Training Data
82
-
83
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
84
-
85
- [More Information Needed]
86
-
87
- ### Training Procedure
88
-
89
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
90
-
91
- #### Preprocessing [optional]
92
-
93
- [More Information Needed]
94
-
95
-
96
- #### Training Hyperparameters
97
-
98
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
99
-
100
- #### Speeds, Sizes, Times [optional]
101
-
102
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
103
-
104
- [More Information Needed]
105
-
106
- ## Evaluation
107
-
108
- <!-- This section describes the evaluation protocols and provides the results. -->
109
-
110
- ### Testing Data, Factors & Metrics
111
-
112
- #### Testing Data
113
-
114
- <!-- This should link to a Dataset Card if possible. -->
115
-
116
- [More Information Needed]
117
-
118
- #### Factors
119
-
120
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
121
-
122
- [More Information Needed]
123
-
124
- #### Metrics
125
-
126
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
127
-
128
- [More Information Needed]
129
-
130
- ### Results
131
-
132
- [More Information Needed]
133
-
134
- #### Summary
135
-
136
-
137
-
138
- ## Model Examination [optional]
139
-
140
- <!-- Relevant interpretability work for the model goes here -->
141
-
142
- [More Information Needed]
143
-
144
- ## Environmental Impact
145
-
146
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
147
-
148
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
149
-
150
- - **Hardware Type:** [More Information Needed]
151
- - **Hours used:** [More Information Needed]
152
- - **Cloud Provider:** [More Information Needed]
153
- - **Compute Region:** [More Information Needed]
154
- - **Carbon Emitted:** [More Information Needed]
155
-
156
- ## Technical Specifications [optional]
157
-
158
- ### Model Architecture and Objective
159
-
160
- [More Information Needed]
161
-
162
- ### Compute Infrastructure
163
-
164
- [More Information Needed]
165
-
166
- #### Hardware
167
-
168
- [More Information Needed]
169
-
170
- #### Software
171
-
172
- [More Information Needed]
173
-
174
- ## Citation [optional]
175
-
176
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
177
-
178
- **BibTeX:**
179
-
180
- [More Information Needed]
181
-
182
- **APA:**
183
-
184
- [More Information Needed]
185
-
186
- ## Glossary [optional]
187
-
188
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
189
-
190
- [More Information Needed]
191
 
192
- ## More Information [optional]
193
 
194
- [More Information Needed]
195
 
196
- ## Model Card Authors [optional]
 
 
 
 
 
 
 
197
 
198
- [More Information Needed]
199
 
200
- ## Model Card Contact
201
 
202
- [More Information Needed]
203
 
 
 
 
204
 
 
 
1
  ---
2
+ tags:
3
+ - generated_from_trainer
4
+ model-index:
5
+ - name: tulu-2-dpo-70b
6
+ results: []
7
+ # license: mit
8
+ datasets:
9
+ # - HuggingFaceH4/ultrachat_200k
10
+ - HuggingFaceH4/ultrafeedback_binarized
11
+ language:
12
+ - en
13
+ base_model: meta-llama/Llama-2-70b-hf
14
  ---
15
 
 
16
 
 
17
 
18
  <img src="https://huggingface.co/datasets/allenai/blog-images/resolve/main/tulu-v2/Tulu%20V2%20banner.png" alt="TuluV2 banner" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
19
 
 
20
 
21
+ # Model Card for Tulu V2 DPO 70B
22
+
23
+ Zephyr is a series of language models that are trained to act as helpful assistants. Zephyr-7B-β is the second model in the series, and is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) that was trained on on a mix of publicly available, synthetic datasets using [Direct Preference Optimization (DPO)](https://arxiv.org/abs/2305.18290). We found that removing the in-built alignment of these datasets boosted performance on [MT Bench](https://huggingface.co/spaces/lmsys/mt-bench) and made the model more helpful. However, this means that model is likely to generate problematic text when prompted to do so and should only be used for educational and research purposes. You can find more details in the [technical report](https://arxiv.org/abs/2310.16944).
24
+
25
+
26
+ ## Model description
27
+
28
+ - **Model type:** The flagship model of a suite of instruction and RLHF tuned chat models on a mix of publicly available, synthetic and human-created datasets.
29
+ - **Language(s) (NLP):** Primarily English
30
+ - **License:** MIT
31
+ - **Finetuned from model:** [meta-llama/Llama-2-70b-hf](https://huggingface.co/ meta-llama/Llama-2-70b-hf)
32
+
33
+ ### Model Sources
34
+
35
+ - **Repository:** https://github.com/allenai/https://github.com/allenai/open-instruct
36
+ - TODO add collection
37
+
38
+ ## Performance
39
+
40
+ At the time of release, the Tulu-v2-dpo-70b model is approximately equal to GPT4 on AlpacaEval, and has a score of TODO on MT-Bench.
41
+ All smaller DPO'd models have strong performance per model size in the category and with lower verbosity (average completion length).
42
+ | Model | Size | Alignment | MT-Bench (score) | AlpacaEval (win rate %) |
43
+ |-------------|-----|----|---------------|--------------|
44
+ | **Tulu-v2-7b** 🪁 | **7B** | **dDPO** | **TODO** | **TODO** |
45
+ | **Tulu-v2-13b** 🪁 | **13B** | **dDPO** | **TODO** | **TODO** |
46
+ | **Tulu-v2-70b** 🪁 | **70B** | **dDPO** | **TODO** | **TODO** |
47
+ | **Tulu-v2-dpo-7b** 🪁 | **7B** | **dDPO** | **TODO** | **TODO** |
48
+ | **Tulu-v2-dpo-13b** 🪁 | **13B** | **dDPO** | **TODO** | **TODO** |
49
+ | **Tulu-v2-dpo-70b** 🪁 | **70B** | **dDPO** | **TODO** | **TODO** |
50
+ | StableLM-Tuned-α | 7B| dSFT |2.75| -|
51
+ | MPT-Chat | 7B |dSFT |5.42| -|
52
+ | Xwin-LMv0.1 | 7B| dPPO| 6.19| 87.83|
53
+ | Mistral-Instructv0.1 | 7B| - | 6.84 |-|
54
+ | Zephyr-7b-α |7B| dDPO| 6.88| -|
55
+ | Zephyr-7b-β 🪁 | 7B | dDPO | 7.34 | 90.60 |
56
+ | Falcon-Instruct | 40B |dSFT |5.17 |45.71|
57
+ | Guanaco | 65B | SFT |6.41| 71.80|
58
+ | Llama2-Chat | 70B |RLHF |6.86| 92.66|
59
+ | Vicuna v1.3 | 33B |dSFT |7.12 |88.99|
60
+ | WizardLM v1.0 | 70B |dSFT |7.71 |-|
61
+ | Xwin-LM v0.1 | 70B |dPPO |- |95.57|
62
+ | GPT-3.5-turbo | - |RLHF |7.94 |89.37|
63
+ | Claude 2 | - |RLHF |8.06| 91.36|
64
+ | GPT-4 | -| RLHF |8.99| 95.28|
65
+
66
+
67
+ ## Intended uses & limitations
68
+
69
+ The model was initially fine-tuned on a filtered and preprocessed of the Tulu V2 mix dataset (TODO add link), which contains a diverse range of human created instructions and synthetic dialogues generated primarily by other LLMs.
70
+ We then further aligned the model with a [Jax DPO trainer](https://github.com/hamishivi/EasyLM/blob/main/EasyLM/models/llama/llama_train_dpo.py) built on [EasyLM](https://github.com/young-geng/EasyLM) on the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) dataset, which contains 64k prompts and model completions that are ranked by GPT-4. As a result, the model can be used for chat and you can check out our [demo](https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat) to test its capabilities.
71
+
72
+ <!-- You can find the datasets used for training Tulu V2 [here]() -->
73
+
74
+ Here's how you can run the model using the `pipeline()` function from 🤗 Transformers:
75
+
76
+ ```python
77
+ # Install transformers from source - only needed for versions <= v4.34
78
+ # pip install git+https://github.com/huggingface/transformers.git
79
+ # pip install accelerate
80
+
81
+ import torch
82
+ from transformers import pipeline
83
+
84
+ pipe = pipeline("text-generation", model="HuggingFaceH4/tulu-2-dpo-70b", torch_dtype=torch.bfloat16, device_map="auto")
85
+
86
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
87
+ messages = [
88
+ {
89
+ "role": "system",
90
+ "content": "You are a friendly chatbot who always responds in the style of a pirate",
91
+ },
92
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
93
+ ]
94
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
95
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
96
+ print(outputs[0]["generated_text"])
97
+ # <|system|>
98
+ # You are a friendly chatbot who always responds in the style of a pirate.</s>
99
+ # <|user|>
100
+ # How many helicopters can a human eat in one sitting?</s>
101
+ # <|assistant|>
102
+ # Ah, me hearty matey! But yer question be a puzzler! A human cannot eat a helicopter in one sitting, as helicopters are not edible. They be made of metal, plastic, and other materials, not food!
103
+ ```
104
 
105
  ## Bias, Risks, and Limitations
106
 
107
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
108
 
109
+ The Tulu models have not been aligned to generate safe completions within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
110
+ It is also unknown what the size and composition of the corpus was used to train the base Llama 2 models, however it is likely to have included a mix of Web data and technical sources like books and code. See the [Falcon 180B model card](https://huggingface.co/tiiuae/falcon-180B#training-data) for an example of this.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
 
112
 
113
+ ### Training hyperparameters
114
 
115
+ The following hyperparameters were used during training:
116
+ - learning_rate: 5e-07
117
+ - total_train_batch_size: 32
118
+ - total_eval_batch_size: 64
119
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
120
+ - lr_scheduler_type: linear
121
+ - lr_scheduler_warmup_ratio: 0.1
122
+ - num_epochs: 3.0
123
 
 
124
 
125
+ ## Citation
126
 
127
+ If you find Tulu V2 is useful in your work, please cite it with:
128
 
129
+ ```
130
+ TODO
131
+ ```
132
 
133
+ *Model card adapted from [Zephyr Beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta/blob/main/README.md)*