Upload 7 files
Browse files- README.md +66 -0
- config.json +6 -0
- model.bin +3 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer_config.json +35 -0
- vocabulary.json +0 -0
README.md
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- cerebras/SlimPajama-627B
|
5 |
+
- bigcode/starcoderdata
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
---
|
9 |
+
<div align="center">
|
10 |
+
|
11 |
+
# TinyLlama-1.1B
|
12 |
+
</div>
|
13 |
+
|
14 |
+
The TinyLlama project aims to **pretrain** a **1.1B Llama model on 3 trillion tokens**. With some proper optimization, we can achieve this within a span of "just" 90 days using 16 A100-40G GPUs 🚀🚀. The training has started on 2023-09-01.
|
15 |
+
|
16 |
+
<div align="center">
|
17 |
+
<img src="./TinyLlama_logo.png" width="300"/>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint.
|
21 |
+
|
22 |
+
|
23 |
+
#### Releases Schedule
|
24 |
+
We will be rolling out intermediate checkpoints following the below schedule. We also include some baseline models for comparison.
|
25 |
+
|
26 |
+
| Date | HF Checkpoint | Tokens | Step | HellaSwag Acc_norm |
|
27 |
+
|------------|-------------------------------------------------|--------|------|---------------------|
|
28 |
+
| Baseline | [StableLM-Alpha-3B](https://huggingface.co/stabilityai/stablelm-base-alpha-3b)| 800B | -- | 38.31 |
|
29 |
+
| Baseline | [Pythia-1B-intermediate-step-50k-105b](https://huggingface.co/EleutherAI/pythia-1b/tree/step50000) | 105B | 50k | 42.04 |
|
30 |
+
| Baseline | [Pythia-1B](https://huggingface.co/EleutherAI/pythia-1b) | 300B | 143k | 47.16 |
|
31 |
+
| 2023-09-04 | [TinyLlama-1.1B-intermediate-step-50k-105b](https://huggingface.co/PY007/TinyLlama-1.1B-step-50K-105b) | 105B | 50k | 43.50 |
|
32 |
+
| 2023-09-16 | -- | 500B | -- | -- |
|
33 |
+
| 2023-10-01 | -- | 1T | -- | -- |
|
34 |
+
| 2023-10-16 | -- | 1.5T | -- | -- |
|
35 |
+
| 2023-10-31 | -- | 2T | -- | -- |
|
36 |
+
| 2023-11-15 | -- | 2.5T | -- | -- |
|
37 |
+
| 2023-12-01 | -- | 3T | -- | -- |
|
38 |
+
|
39 |
+
<!-- | Baseline | [Pythia-1B-intermediate-52b](https://huggingface.co/EleutherAI/pythia-1b/tree/step25000) | 52B | 25k | 38.81 | -->
|
40 |
+
<!-- | Baseline | [Pythia-1.4B-intermediate-52b](https://huggingface.co/EleutherAI/pythia-1.4b/tree/step25000) | 52B | 25k | 42.49 | -->
|
41 |
+
<!-- | Baseline | [Pythia-1.4B-intermediate-105b](https://huggingface.co/EleutherAI/pythia-1.4b/tree/step50000) | 105B | 50k | 46.14 | -->
|
42 |
+
<!-- | 2023-09-04 | [TinyLlama-1.1B-intermediate-52b](https://huggingface.co/PY007/TinyLlama-1.1B-52b) | 52B | 25k | 40.85 |
|
43 |
+
| 2023-09-04 | [TinyLlama-1.1B-intermediate-84b](https://huggingface.co/PY007/TinyLlama-1.1B-84b) | 84B | 40k | 42.65 | -->
|
44 |
+
|
45 |
+
It can be observed that TinyLlama has so far progressed well 🎉🎉.
|
46 |
+
|
47 |
+
Meanwhile, you can track the live cross entropy loss [here](https://wandb.ai/lance777/lightning_logs/reports/metric-train_loss-23-09-02-15-26-17---Vmlldzo1MjkzNzMw?accessToken=9843chbl7rfi1w03hxttpcnbo9z8t6088pw3ddn4h8teunaq0cy7j8hw9c5i02ve).
|
48 |
+
|
49 |
+
## Training Details
|
50 |
+
Below are some details of our training setup:
|
51 |
+
|
52 |
+
| Setting | Description |
|
53 |
+
|---------------------------------|----------------------------------------------------------------|
|
54 |
+
| Parameters | 1.1B |
|
55 |
+
| Attention Variant | Grouped Query Attention |
|
56 |
+
| Model Size | Layers: 22, Heads: 32, Query Groups: 4, Embedding Size: 2048, Intermediate Size (Swiglu): 5632|
|
57 |
+
| Sequence Length | 2048 |
|
58 |
+
| Batch Size | 2 million tokens (2048 * 1024) |
|
59 |
+
| Learning Rate | 4e-4 |
|
60 |
+
| Learning Rate Schedule | Cosine with 2000 warmup steps |
|
61 |
+
| Training Data | [Slimpajama](https://huggingface.co/datasets/cerebras/slimpajama-627b) & [Starcoderdata](https://huggingface.co/datasets/bigcode/starcoderdata) |
|
62 |
+
| Data Preprocessing | Excluded GitHub subset of Slimpajama; Sampled all code from Starcoderdata |
|
63 |
+
| Combined Dataset Size | 1 trillion tokens |
|
64 |
+
| Total Tokens During Training | 3 trillion (3 epochs/1430k steps) |
|
65 |
+
| Natural Language to Code Ratio | 7:3 |
|
66 |
+
| Hardware | 16 A100-40G GPUs |
|
config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"layer_norm_epsilon": 1e-05,
|
5 |
+
"unk_token": "<unk>"
|
6 |
+
}
|
model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d8659344eb1c35228da5cdfd9c81ab663f36601ac9d1806dbc0e3f61647a3a8a
|
3 |
+
size 1102178787
|
special_tokens_map.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"unk_token": {
|
17 |
+
"content": "<unk>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"bos_token": {
|
5 |
+
"__type": "AddedToken",
|
6 |
+
"content": "<s>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"clean_up_tokenization_spaces": false,
|
13 |
+
"eos_token": {
|
14 |
+
"__type": "AddedToken",
|
15 |
+
"content": "</s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"legacy": false,
|
22 |
+
"model_max_length": 1000000000000000019884624838656,
|
23 |
+
"pad_token": null,
|
24 |
+
"padding_side": "right",
|
25 |
+
"sp_model_kwargs": {},
|
26 |
+
"tokenizer_class": "LlamaTokenizer",
|
27 |
+
"unk_token": {
|
28 |
+
"__type": "AddedToken",
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": false,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false
|
34 |
+
}
|
35 |
+
}
|
vocabulary.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|