Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,73 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Evaluation Results
|
| 7 |
|
| 8 |
## Big-Bench Hard (BBH)
|
|
@@ -138,106 +203,3 @@ Average
|
|
| 138 |
|--------------------------|---------|
|
| 139 |
| Qwen2-72B-Instruct | 8.96541 |
|
| 140 |
| Smaug-Qwen2-72B-Instruct | 8.86563 |
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
# Model Card for Model ID
|
| 145 |
-
|
| 146 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
## Model Details
|
| 151 |
-
|
| 152 |
-
### Model Description
|
| 153 |
-
|
| 154 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 155 |
-
|
| 156 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 157 |
-
|
| 158 |
-
- **Developed by:** [More Information Needed]
|
| 159 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 160 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 161 |
-
- **Model type:** [More Information Needed]
|
| 162 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 163 |
-
- **License:** [More Information Needed]
|
| 164 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 165 |
-
|
| 166 |
-
### Model Sources [optional]
|
| 167 |
-
|
| 168 |
-
<!-- Provide the basic links for the model. -->
|
| 169 |
-
|
| 170 |
-
- **Repository:** [More Information Needed]
|
| 171 |
-
- **Paper [optional]:** [More Information Needed]
|
| 172 |
-
- **Demo [optional]:** [More Information Needed]
|
| 173 |
-
|
| 174 |
-
## Uses
|
| 175 |
-
|
| 176 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 177 |
-
|
| 178 |
-
### Direct Use
|
| 179 |
-
|
| 180 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 181 |
-
|
| 182 |
-
[More Information Needed]
|
| 183 |
-
|
| 184 |
-
### Downstream Use [optional]
|
| 185 |
-
|
| 186 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 187 |
-
|
| 188 |
-
[More Information Needed]
|
| 189 |
-
|
| 190 |
-
### Out-of-Scope Use
|
| 191 |
-
|
| 192 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 193 |
-
|
| 194 |
-
[More Information Needed]
|
| 195 |
-
|
| 196 |
-
## Bias, Risks, and Limitations
|
| 197 |
-
|
| 198 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 199 |
-
|
| 200 |
-
[More Information Needed]
|
| 201 |
-
|
| 202 |
-
### Recommendations
|
| 203 |
-
|
| 204 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 205 |
-
|
| 206 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 207 |
-
|
| 208 |
-
## How to Get Started with the Model
|
| 209 |
-
|
| 210 |
-
Use the code below to get started with the model.
|
| 211 |
-
|
| 212 |
-
[More Information Needed]
|
| 213 |
-
|
| 214 |
-
## Training Details
|
| 215 |
-
|
| 216 |
-
### Training Data
|
| 217 |
-
|
| 218 |
-
<!-- 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. -->
|
| 219 |
-
|
| 220 |
-
[More Information Needed]
|
| 221 |
-
|
| 222 |
-
### Training Procedure
|
| 223 |
-
|
| 224 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 225 |
-
|
| 226 |
-
#### Preprocessing [optional]
|
| 227 |
-
|
| 228 |
-
[More Information Needed]
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
#### Training Hyperparameters
|
| 232 |
-
|
| 233 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 234 |
-
|
| 235 |
-
#### Speeds, Sizes, Times [optional]
|
| 236 |
-
|
| 237 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 238 |
-
|
| 239 |
-
[More Information Needed]
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: tongyi-qianwen
|
| 4 |
+
license_link: https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/LICENSE
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- chat
|
| 10 |
---
|
| 11 |
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
|
| 15 |
+
# Smaug-Qwen2-72B-Instruct
|
| 16 |
+
|
| 17 |
+
# Introduction
|
| 18 |
+
|
| 19 |
+
We introduce the latest in the Smaug series - a finetune of [Qwen2-72B-Instruct](https://huggingface.co/Qwen/Qwen2-72B-Instruct)
|
| 20 |
+
|
| 21 |
+
Compared to Qwen2-72B-Instruct, Smaug has better BBH, LiveCodeBench, and Arena-Hard scores (see evaluation results below).
|
| 22 |
+
|
| 23 |
+
## How to use
|
| 24 |
+
|
| 25 |
+
The prompt format is unchanged from Qwen2-72B-Instruct.
|
| 26 |
+
|
| 27 |
+
### Use with transformers
|
| 28 |
+
|
| 29 |
+
See the snippet below for usage with Transformers:
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
import transformers
|
| 33 |
+
import torch
|
| 34 |
+
|
| 35 |
+
model_id = "abacusai/Smaug-Qwen2-72B-Instruct"
|
| 36 |
+
|
| 37 |
+
pipeline = transformers.pipeline(
|
| 38 |
+
"text-generation",
|
| 39 |
+
model=model_id,
|
| 40 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 41 |
+
device_map="auto",
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
messages = [
|
| 45 |
+
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
|
| 46 |
+
{"role": "user", "content": "Who are you?"},
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
prompt = pipeline.tokenizer.apply_chat_template(
|
| 50 |
+
messages,
|
| 51 |
+
tokenize=False,
|
| 52 |
+
add_generation_prompt=True
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
terminators = [
|
| 56 |
+
pipeline.tokenizer.eos_token_id,
|
| 57 |
+
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
outputs = pipeline(
|
| 61 |
+
prompt,
|
| 62 |
+
max_new_tokens=256,
|
| 63 |
+
eos_token_id=terminators,
|
| 64 |
+
do_sample=True,
|
| 65 |
+
temperature=0.6,
|
| 66 |
+
top_p=0.9,
|
| 67 |
+
)
|
| 68 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
# Evaluation Results
|
| 72 |
|
| 73 |
## Big-Bench Hard (BBH)
|
|
|
|
| 203 |
|--------------------------|---------|
|
| 204 |
| Qwen2-72B-Instruct | 8.96541 |
|
| 205 |
| Smaug-Qwen2-72B-Instruct | 8.86563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|