Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,85 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
library_name: transformers
|
7 |
+
tags:
|
8 |
+
- llm
|
9 |
+
- dataset combination
|
10 |
+
- Pretraining
|
11 |
---
|
12 |
+
|
13 |
+
# SlimPajama-DC
|
14 |
+
|
15 |
+
<center><img src="assets/SlimPajama-DC-logo.png" alt="SlimPajama-DC logo" width="200"/></center>
|
16 |
+
|
17 |
+
|
18 |
+
**SlimPajama-DC** is a set of 1.3B parameter language models, distinctively trained on the different combinations of 330B subsets of SlimPajama dataset.
|
19 |
+
|
20 |
+
| Details of Dataset Combinations for Different Models |
|
21 |
+
|------------------------------------------------|
|
22 |
+
|
23 |
+
<center><img src="assets/data_combination.png" alt="details of dataset combinations" width="800"/></center>
|
24 |
+
|
25 |
+
|
26 |
+
Despite being trained on a smaller amount of 330B tokens compared to TinyLlama and Olmo's 3 trillion, SlimPajama-DC surpasses TinyLlama and Olmo in some challenging English tasks.
|
27 |
+
|
28 |
+
| Our tests comprise: (1) AI2 Reasoning Challenge (25-shot); (2) HellaSwag (10-shot); (3) MMLU (5-shot); (4) TruthfulQA (0-shot) |
|
29 |
+
|------------------------------------------------|
|
30 |
+
<center><img src="assets/res1.png" alt="results" width="880"/></center>
|
31 |
+
|
32 |
+
‡ represents the RefinedWeb CC.
|
33 |
+
|
34 |
+
| Performance on More Benchmarks |
|
35 |
+
|------------------------------------------------|
|
36 |
+
<center><img src="assets/res2.png" alt="results" width="830"/></center>
|
37 |
+
|
38 |
+
ARC easy and ARC challenge are evaluated using 25-shot. All other evaluation benchmarks are tested on 0-shot. * represents the results are averaged across multiple sub-items inside each benchmark dataset.
|
39 |
+
|
40 |
+
|
41 |
+
# Dataset
|
42 |
+
|
43 |
+
Our full dataset is available at [SlimPajama-627B-DC](https://huggingface.co/datasets/MBZUAI-LLM/SlimPajama-627B-DC).
|
44 |
+
|
45 |
+
|
46 |
+
# Model Usage
|
47 |
+
|
48 |
+
To load a specific checkpoint, use the revision argument as shown below, for example, `SlimPajama-DC-6`. All the revisions can be seen from the branch dropdown in the "Files and versions" tab. If no revision argument is provided, it will load the default checkpoint `SlimPajama-DC-6`.
|
49 |
+
|
50 |
+
```python
|
51 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
52 |
+
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
54 |
+
"MBZUAI-LLM/SlimPajama-DC",
|
55 |
+
revision="SlimPajama-DC-6",
|
56 |
+
trust_remote_code=True
|
57 |
+
)
|
58 |
+
model = AutoModelForCausalLM.from_pretrained(
|
59 |
+
"MBZUAI-LLM/SlimPajama-DC",
|
60 |
+
revision="SlimPajama-DC-6",
|
61 |
+
trust_remote_code=True
|
62 |
+
)
|
63 |
+
|
64 |
+
prompt = 'int add(int x, int y) {'
|
65 |
+
|
66 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
67 |
+
gen_tokens = model.generate(input_ids, do_sample=True, max_length=400)
|
68 |
+
|
69 |
+
print("-"*20 + "Output for model" + 20 * '-')
|
70 |
+
print(tokenizer.batch_decode(gen_tokens)[0])
|
71 |
+
```
|
72 |
+
|
73 |
+
|
74 |
+
# Citation
|
75 |
+
|
76 |
+
**BibTeX:**
|
77 |
+
|
78 |
+
```bibtex
|
79 |
+
@article{shen2023slimpajama,
|
80 |
+
title={Slimpajama-dc: Understanding data combinations for llm training},
|
81 |
+
author={Zhiqiang Shen, Tianhua Tao, Liqun Ma, Willie Neiswanger, Zhengzhong Liu, Hongyi Wang, Bowen Tan, Joel Hestness, Natalia Vassilieva, Daria Soboleva, Eric Xing},
|
82 |
+
journal={arXiv preprint arXiv:2309.10818},
|
83 |
+
year={2023}
|
84 |
+
}
|
85 |
+
```
|