Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,116 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
11 |
-
|
12 |
-
## Model Details
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
|
|
|
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
|
|
|
|
|
|
|
77 |
|
78 |
-
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
|
|
|
|
|
|
81 |
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
|
103 |
## Evaluation
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
###
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
license: llama3
|
4 |
+
datasets:
|
5 |
+
- aqua_rat
|
6 |
+
- microsoft/orca-math-word-problems-200k
|
7 |
+
- m-a-p/CodeFeedback-Filtered-Instruction
|
8 |
---
|
9 |
|
10 |
+
# Smaug-Llama-3-70B-Instruct-32K
|
11 |
|
12 |
+
### Built with Meta Llama 3
|
13 |
|
14 |
+
This is a 32K version of Smaug-Llama-3-70B-Instruct. It uses PoSE (https://arxiv.org/abs/2309.10400) and LoRA (https://arxiv.org/abs/2106.09685) adapter transfer. More details are coming soon.
|
15 |
|
16 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c14f6b02e1f8f67c73bd05/8Z5XgqrZXKcb2hmeTKTT6.png)
|
|
|
17 |
|
18 |
### Model Description
|
19 |
|
20 |
+
- **Developed by:** [Abacus.AI](https://abacus.ai)
|
21 |
+
- **License:** https://llama.meta.com/llama3/license/
|
22 |
+
- **Finetuned from model:** [meta-llama/Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
## How to use
|
25 |
|
26 |
+
The prompt format is unchanged from Llama 3 70B Instruct.
|
27 |
|
28 |
+
### Use with transformers
|
29 |
|
30 |
+
See the snippet below for usage with Transformers:
|
31 |
|
32 |
+
```python
|
33 |
+
import transformers
|
34 |
+
import torch
|
35 |
|
36 |
+
model_id = "abacusai/Smaug-Llama-3-70B-Instruct"
|
37 |
|
38 |
+
pipeline = transformers.pipeline(
|
39 |
+
"text-generation",
|
40 |
+
model=model_id,
|
41 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
42 |
+
device_map="auto",
|
43 |
+
)
|
44 |
|
45 |
+
messages = [
|
46 |
+
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
|
47 |
+
{"role": "user", "content": "Who are you?"},
|
48 |
+
]
|
49 |
|
50 |
+
prompt = pipeline.tokenizer.apply_chat_template(
|
51 |
+
messages,
|
52 |
+
tokenize=False,
|
53 |
+
add_generation_prompt=True
|
54 |
+
)
|
55 |
|
56 |
+
terminators = [
|
57 |
+
pipeline.tokenizer.eos_token_id,
|
58 |
+
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
59 |
+
]
|
60 |
|
61 |
+
outputs = pipeline(
|
62 |
+
prompt,
|
63 |
+
max_new_tokens=256,
|
64 |
+
eos_token_id=terminators,
|
65 |
+
do_sample=True,
|
66 |
+
temperature=0.6,
|
67 |
+
top_p=0.9,
|
68 |
+
)
|
69 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
70 |
+
```
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
## Evaluation
|
74 |
|
75 |
+
### Arena-Hard
|
76 |
+
|
77 |
+
### Arena-Hard
|
78 |
+
|
79 |
+
Score vs selected others (sourced from: (https://lmsys.org/blog/2024-04-19-arena-hard/#full-leaderboard-with-gpt-4-turbo-as-judge)). GPT-4o and Gemini-1.5-pro-latest were missing from the original blob post, and we produced those numbers from a local run using the same methodology.
|
80 |
+
|
81 |
+
| Model | Score | 95% Confidence Interval | Average Tokens |
|
82 |
+
| :---- | ---------: | ----------: | ------: |
|
83 |
+
| GPT-4-Turbo-2024-04-09 | 82.6 | (-1.8, 1.6) | 662 |
|
84 |
+
| GPT-4o | 78.3 | (-2.4, 2.1) | 685 |
|
85 |
+
| Gemini-1.5-pro-latest | 72.1 | (-2.3, 2.2) | 630 |
|
86 |
+
| Claude-3-Opus-20240229 | 60.4 | (-3.3, 2.4) | 541 |
|
87 |
+
| **Smaug-Llama-3-70B-Instruct-32K** | 60.0 | (-2.6, 2.1) | 844 |
|
88 |
+
| Smaug-Llama-3-70B-Instruct | 56.7 | (-2.2, 2.6) | 661 |
|
89 |
+
| GPT-4-0314 | 50.0 | (-0.0, 0.0) | 423 |
|
90 |
+
| Claude-3-Sonnet-20240229 | 46.8 | (-2.1, 2.2) | 552 |
|
91 |
+
| Llama-3-70B-Instruct | 41.1 | (-2.5, 2.4) | 583 |
|
92 |
+
| GPT-4-0613 | 37.9 | (-2.2, 2.0) | 354 |
|
93 |
+
| Mistral-Large-2402 | 37.7 | (-1.9, 2.6) | 400 |
|
94 |
+
| Mixtral-8x22B-Instruct-v0.1 | 36.4 | (-2.7, 2.9) | 430 |
|
95 |
+
| Qwen1.5-72B-Chat | 36.1 | (-2.5, 2.2) | 474 |
|
96 |
+
| Command-R-Plus | 33.1 | (-2.1, 2.2) | 541 |
|
97 |
+
| Mistral-Medium | 31.9 | (-2.3, 2.4) | 485 |
|
98 |
+
| GPT-3.5-Turbo-0613 | 24.8 | (-1.6, 2.0) | 401 |
|
99 |
+
|
100 |
+
Note that we believe the number of tokens/verbosity of the model strongly influences the GPT-4 judge in this case, and at least partially explains the improvement in Arena-Hard score for the 32K model.
|
101 |
+
|
102 |
+
### OpenLLM Leaderboard Manual Evaluation
|
103 |
+
|
104 |
+
| Model | ARC | Hellaswag | MMLU | TruthfulQA | Winogrande | GSM8K* | Average |
|
105 |
+
| :---- | ---: | ------: | ---: | ---: | ---: | ---: | ---: |
|
106 |
+
| Smaug-Llama-3-70B-Instruct-32K | 70.1 | TBA | TBA | 61.9 | 82.2 | TBA | TBA |
|
107 |
+
| Llama-3-70B-Instruct | 71.4 | 85.7 | 80.0 | 61.8 | 82.9 | 91.1 | 78.8 |
|
108 |
+
|
109 |
+
**GSM8K** The GSM8K numbers quoted here are computed using a recent release
|
110 |
+
of the [LM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness/).
|
111 |
+
The commit used by the leaderboard has a significant issue that impacts models that
|
112 |
+
tend to use `:` in their responses due to a bug in the stop word configuration for
|
113 |
+
GSM8K. The issue is covered in more detail in this
|
114 |
+
[GSM8K evaluation discussion](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard/discussions/770).
|
115 |
+
The score for both Llama-3 and this model are significantly different when evaluated
|
116 |
+
with the updated harness as the issue with stop words has been addressed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|