nunonmg commited on
Commit
dd3bcdf
1 Parent(s): ad1ccd2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -121
README.md CHANGED
@@ -29,7 +29,6 @@ TowerInstruct is a language model that results from fine-tuning TowerBase on the
29
  The model is trained to handle several translation-related tasks, such as general machine translation (e.g., sentence- and document-level translation, terminology-aware translation, context-aware translation), automatic post edition, named-entity recognition, gramatical error correction, and paraphrase generation.
30
  We will release more details in the upcoming technical report.
31
 
32
-
33
  - **Developed by:** Unbabel, Instituto Superior Técnico, CentraleSupélec University of Paris-Saclay
34
  - **Model type:** A 7B parameter model fine-tuned on a mix of publicly available, synthetic datasets on translation-related tasks, as well as conversational datasets and code instructions.
35
  - **Language(s) (NLP):** English, Portuguese, Spanish, French, German, Dutch, Italian, Korean, Chinese, Russian
@@ -52,39 +51,63 @@ The model was initially fine-tuned on a filtered and preprocessed supervised fin
52
 
53
  You can find the dataset and all data sources of TowerBlocks here.
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ### Direct Use
56
 
57
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
58
 
59
- [More Information Needed]
60
-
61
  ### Downstream Use [optional]
62
 
63
  <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
64
 
65
- [More Information Needed]
66
-
67
  ### Out-of-Scope Use
68
 
69
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
70
 
71
- [More Information Needed]
72
-
73
  ## Bias, Risks, and Limitations
74
 
75
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
76
 
77
- [More Information Needed]
78
-
79
  ### Recommendations
80
 
81
  <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
82
 
83
  Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
84
 
85
- ## How to Get Started with the Model
 
 
 
 
86
 
87
- Use the code below to get started with the model.
88
 
89
  [More Information Needed]
90
 
@@ -92,123 +115,31 @@ Use the code below to get started with the model.
92
 
93
  ### Training Data
94
 
95
- <!-- 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. -->
96
-
97
- [More Information Needed]
98
 
99
  ### Training Procedure
100
 
101
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
102
-
103
- #### Preprocessing [optional]
104
-
105
- [More Information Needed]
106
-
107
 
108
  #### Training Hyperparameters
109
 
110
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
111
-
112
- #### Speeds, Sizes, Times [optional]
113
-
114
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
115
-
116
- [More Information Needed]
117
-
118
- ## Evaluation
119
 
120
- <!-- This section describes the evaluation protocols and provides the results. -->
121
-
122
- ### Testing Data, Factors & Metrics
123
-
124
- #### Testing Data
125
-
126
- <!-- This should link to a Dataset Card if possible. -->
127
-
128
- [More Information Needed]
 
 
 
129
 
130
- #### Factors
131
-
132
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
133
-
134
- [More Information Needed]
135
-
136
- #### Metrics
137
-
138
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
139
-
140
- [More Information Needed]
141
-
142
- ### Results
143
-
144
- [More Information Needed]
145
-
146
- #### Summary
147
-
148
-
149
-
150
- ## Model Examination [optional]
151
-
152
- <!-- Relevant interpretability work for the model goes here -->
153
-
154
- [More Information Needed]
155
-
156
- ## Environmental Impact
157
-
158
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
159
-
160
- 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).
161
-
162
- - **Hardware Type:** [More Information Needed]
163
- - **Hours used:** [More Information Needed]
164
- - **Cloud Provider:** [More Information Needed]
165
- - **Compute Region:** [More Information Needed]
166
- - **Carbon Emitted:** [More Information Needed]
167
-
168
- ## Technical Specifications [optional]
169
-
170
- ### Model Architecture and Objective
171
-
172
- [More Information Needed]
173
-
174
- ### Compute Infrastructure
175
-
176
- [More Information Needed]
177
-
178
- #### Hardware
179
-
180
- [More Information Needed]
181
-
182
- #### Software
183
-
184
- [More Information Needed]
185
-
186
- ## Citation [optional]
187
-
188
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
189
-
190
- **BibTeX:**
191
-
192
- [More Information Needed]
193
-
194
- **APA:**
195
-
196
- [More Information Needed]
197
-
198
- ## Glossary [optional]
199
-
200
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
201
-
202
- [More Information Needed]
203
-
204
- ## More Information [optional]
205
-
206
- [More Information Needed]
207
-
208
- ## Model Card Authors [optional]
209
-
210
- [More Information Needed]
211
 
212
- ## Model Card Contact
213
 
214
- [More Information Needed]
 
29
  The model is trained to handle several translation-related tasks, such as general machine translation (e.g., sentence- and document-level translation, terminology-aware translation, context-aware translation), automatic post edition, named-entity recognition, gramatical error correction, and paraphrase generation.
30
  We will release more details in the upcoming technical report.
31
 
 
32
  - **Developed by:** Unbabel, Instituto Superior Técnico, CentraleSupélec University of Paris-Saclay
33
  - **Model type:** A 7B parameter model fine-tuned on a mix of publicly available, synthetic datasets on translation-related tasks, as well as conversational datasets and code instructions.
34
  - **Language(s) (NLP):** English, Portuguese, Spanish, French, German, Dutch, Italian, Korean, Chinese, Russian
 
51
 
52
  You can find the dataset and all data sources of TowerBlocks here.
53
 
54
+ Here's how you can run the model using the `pipeline()` function from 🤗 Transformers:
55
+
56
+ ```python
57
+ # Install transformers from source - only needed for versions <= v4.34
58
+ # pip install git+https://github.com/huggingface/transformers.git
59
+ # pip install accelerate
60
+
61
+ import torch
62
+ from transformers import pipeline
63
+
64
+ pipe = pipeline("text-generation", model="Unbabel/TowerInstruct-v0.1", torch_dtype=torch.bfloat16, device_map="auto")
65
+
66
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
67
+ messages = [
68
+ {"role": "user", "content": "Translate the following text from English into Portuguese.\nEnglish: A group of researchers has released a new model for translation-related tasks.\nPortuguese:"},
69
+ ]
70
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
71
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
72
+ print(outputs[0]["generated_text"])
73
+ # <|system|>
74
+ # You are a friendly chatbot who always responds in the style of a pirate.</s>
75
+ # <|user|>
76
+ # How many helicopters can a human eat in one sitting?</s>
77
+ # <|assistant|>
78
+ # 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!
79
+ ```
80
+
81
+
82
  ### Direct Use
83
 
84
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
85
 
 
 
86
  ### Downstream Use [optional]
87
 
88
  <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
89
 
 
 
90
  ### Out-of-Scope Use
91
 
92
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
93
 
 
 
94
  ## Bias, Risks, and Limitations
95
 
96
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
97
 
 
 
98
  ### Recommendations
99
 
100
  <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
101
 
102
  Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
103
 
104
+ ## Prompt Format
105
+
106
+ Mention mlchat here (no system prompt)
107
+
108
+ ### Supervised tasks
109
 
110
+ Prompts for different tasks.
111
 
112
  [More Information Needed]
113
 
 
115
 
116
  ### Training Data
117
 
118
+ Link to TowerBlocks.
 
 
119
 
120
  ### Training Procedure
121
 
122
+ Write sth about Axolotl.
 
 
 
 
 
123
 
124
  #### Training Hyperparameters
125
 
126
+ The following hyperparameters were used during training:
 
 
 
 
 
 
 
 
127
 
128
+ learning_rate: 5e-07
129
+ train_batch_size: 2
130
+ eval_batch_size: 4
131
+ seed: 42
132
+ distributed_type: multi-GPU
133
+ num_devices: 16
134
+ total_train_batch_size: 32
135
+ total_eval_batch_size: 64
136
+ optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
137
+ lr_scheduler_type: linear
138
+ lr_scheduler_warmup_ratio: 0.1
139
+ num_epochs: 3.0
140
 
141
+ ## Citation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
+ To be completed.
144
 
145
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)