End of training
Browse files- README.md +159 -0
- config.json +39 -0
- generation_config.json +6 -0
- logs/projector=linear/events.out.tfevents.1724270239.e3f806ea38c9 +3 -0
- logs/projector=linear/events.out.tfevents.1724278251.e3f806ea38c9 +3 -0
- logs/projector=orthogonal/events.out.tfevents.1724270153.e3f806ea38c9 +3 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: gpt2
|
3 |
+
datasets:
|
4 |
+
- wikimedia/wikipedia
|
5 |
+
library_name: Distily
|
6 |
+
license: mit
|
7 |
+
tags:
|
8 |
+
- bitnet
|
9 |
+
- 1.58b
|
10 |
+
- generated_from_trainer
|
11 |
+
model-index:
|
12 |
+
- name: distily_projector_experiment
|
13 |
+
results: []
|
14 |
+
---
|
15 |
+
|
16 |
+
|
17 |
+
# Summary
|
18 |
+
|
19 |
+
Distilled with [Distily](https://github.com/lapp0/distily) library
|
20 |
+
using teacher model [gpt2](https://huggingface.co/gpt2)
|
21 |
+
on dataset [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia).
|
22 |
+
|
23 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
24 |
+
should probably proofread and complete it, then remove this comment.
|
25 |
+
|
26 |
+
# Model description
|
27 |
+
|
28 |
+
More information needed
|
29 |
+
|
30 |
+
# Intended uses & limitations
|
31 |
+
|
32 |
+
More information needed
|
33 |
+
-->
|
34 |
+
|
35 |
+
# Model Architecture:
|
36 |
+
- **Architecture**: `GPT2LMHeadModel`
|
37 |
+
- **Total Parameters**: 124,439,808
|
38 |
+
- **Data Type (dtype)**: torch.bfloat16
|
39 |
+
- **Model Size**: 0.24 GB
|
40 |
+
|
41 |
+
|
42 |
+
# Evaluation Metrics Comparison
|
43 |
+
|
44 |
+
| step | epoch | enwikippl | frwikippl | loss | runtime | samples_per_second | steps_per_second | tinystoriesppl | zhwikippl |
|
45 |
+
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
46 |
+
| **teacher eval** | | 43.25 | 61.25 | | | | | 11.6875 | 19.125 |
|
47 |
+
| 0 | 0 | 1460288880640.0 | 113799453474816.0 | 20.3200 | 25.9904 | 96.189 | 12.043 | 7247757312.0 | 18966575579136.0 |
|
48 |
+
| 2500 | 0.0404 | 896.0 | 5856.0 | 2.1915 | 26.0834 | 95.846 | 12.0 | 604.0 | 11200.0 |
|
49 |
+
| 5000 | 0.0808 | 330.0 | 1424.0 | 1.5171 | 26.0834 | 95.847 | 12.0 | 262.0 | 296.0 |
|
50 |
+
| 7500 | 0.1212 | 210.0 | 816.0 | 1.2547 | 26.1072 | 95.759 | 11.989 | 188.0 | 162.0 |
|
51 |
+
| 10000 | 0.1616 | 162.0 | 584.0 | 1.0555 | 26.1053 | 95.766 | 11.99 | 131.0 | 124.5 |
|
52 |
+
| 12500 | 0.2020 | 114.5 | 466.0 | 0.8387 | 26.1335 | 95.663 | 11.977 | 88.5 | 139.0 |
|
53 |
+
| 15000 | 0.2424 | 100.0 | 384.0 | 0.7409 | 26.0745 | 95.879 | 12.004 | 77.0 | 130.0 |
|
54 |
+
| 17500 | 0.2828 | 87.0 | 336.0 | 0.6531 | 26.124 | 95.698 | 11.981 | 66.5 | 114.5 |
|
55 |
+
| 20000 | 0.3232 | 75.5 | 286.0 | 0.5932 | 26.1016 | 95.78 | 11.992 | 66.5 | 104.5 |
|
56 |
+
| 22500 | 0.3636 | 67.5 | 232.0 | 0.5080 | 26.1245 | 95.696 | 11.981 | 53.75 | 106.5 |
|
57 |
+
| 25000 | 0.4040 | 64.5 | 223.0 | 0.4751 | 26.0572 | 95.943 | 12.012 | 50.5 | 89.5 |
|
58 |
+
| 27500 | 0.4444 | 64.0 | 207.0 | 0.4674 | 26.1072 | 95.759 | 11.989 | 49.25 | 159.0 |
|
59 |
+
| 30000 | 0.4848 | 65.0 | 204.0 | 0.4668 | 26.047 | 95.98 | 12.017 | 49.5 | 100.5 |
|
60 |
+
| 32500 | 0.5253 | 65.5 | 215.0 | 0.4567 | 26.0814 | 95.854 | 12.001 | 48.5 | 85.0 |
|
61 |
+
| 35000 | 0.5657 | 63.25 | 188.0 | 0.4214 | 26.0269 | 96.054 | 12.026 | 45.25 | 107.0 |
|
62 |
+
| 37500 | 0.6061 | 62.0 | 181.0 | 0.4092 | 26.0391 | 96.009 | 12.02 | 41.75 | 109.0 |
|
63 |
+
| 40000 | 0.6465 | 59.25 | 178.0 | 0.3990 | 26.0153 | 96.097 | 12.031 | 40.75 | 93.0 |
|
64 |
+
| 42500 | 0.6869 | 59.25 | 190.0 | 0.3829 | 26.1161 | 95.726 | 11.985 | 40.75 | 76.0 |
|
65 |
+
| 45000 | 0.7273 | 53.75 | 148.0 | 0.3251 | 26.0653 | 95.913 | 12.008 | 36.0 | 72.0 |
|
66 |
+
| 47500 | 0.7677 | 52.25 | 141.0 | 0.3087 | 26.1075 | 95.758 | 11.989 | 33.75 | 53.25 |
|
67 |
+
| 50000 | 0.8081 | 50.75 | 138.0 | 0.2983 | 26.0725 | 95.886 | 12.005 | 34.0 | 38.5 |
|
68 |
+
| 52500 | 0.8485 | 51.25 | 134.0 | 0.2931 | 26.0671 | 95.906 | 12.007 | 33.5 | 42.0 |
|
69 |
+
| 55000 | 0.8889 | 50.0 | 131.0 | 0.2816 | 26.0871 | 95.833 | 11.998 | 32.5 | 36.0 |
|
70 |
+
| 57500 | 0.9293 | 49.75 | 131.0 | 0.2777 | 26.0528 | 95.959 | 12.014 | 32.0 | 35.5 |
|
71 |
+
| 60000 | 0.9697 | 49.5 | 131.0 | 0.2760 | 26.0611 | 95.928 | 12.01 | 31.875 | 34.25 |
|
72 |
+
| 61875 | 1.0 | 49.5 | 131.0 | 0.2757 | 26.0451 | 95.987 | 12.018 | 31.875 | 34.25 |
|
73 |
+
|
74 |
+
# Resource Usage Comparison
|
75 |
+
|
76 |
+
- VRAM Use: 7.5008 GB
|
77 |
+
|
78 |
+
# Distillation (Teacher -> Student) Architecture Difference:
|
79 |
+
|
80 |
+
- **Architecture**: `GPT2LMHeadModel` -> `GPT2LMHeadModel`
|
81 |
+
- **Total Parameters**: 124,439,808 -> 124,439,808
|
82 |
+
- **Data Type (dtype)**: torch.bfloat16 -> torch.bfloat16
|
83 |
+
- **Model Size**: 0.24 GB -> 0.24 GB
|
84 |
+
|
85 |
+
<details>
|
86 |
+
<summary>Module Diff Details</summary>
|
87 |
+
|
88 |
+
```diff
|
89 |
+
|
90 |
+
```
|
91 |
+
|
92 |
+
</details>
|
93 |
+
<br/>
|
94 |
+
|
95 |
+
# Train Dataset
|
96 |
+
Trained on 145,756,992 tokens from the [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) dataset.
|
97 |
+
|
98 |
+
- Num Samples: `247,500`
|
99 |
+
- Subset: `20231101.en`
|
100 |
+
- Split: `train`
|
101 |
+
|
102 |
+
|
103 |
+
# Training Objective
|
104 |
+
|
105 |
+
```
|
106 |
+
DistillationObjective(logits_loss_component=LossComponent(label=logits, weight=1, loss_fn=kl))
|
107 |
+
```
|
108 |
+
|
109 |
+
# Hyperparameters
|
110 |
+
The following hyperparameters were used during training:
|
111 |
+
|
112 |
+
<details>
|
113 |
+
<summary>Expand</summary>
|
114 |
+
|
115 |
+
- learning_rate: `0.0001`
|
116 |
+
- train_batch_size: `4`
|
117 |
+
- eval_batch_size: `8`
|
118 |
+
- seed: `42`
|
119 |
+
- optimizer: `Adam with betas=(0.9,0.999) and epsilon=1e-08`
|
120 |
+
- lr_scheduler_type: `linear`
|
121 |
+
- lr_scheduler_warmup_ratio: `0.5`
|
122 |
+
- num_epochs: `1.0`
|
123 |
+
- distillation_objective: `DistillationObjective(logits_loss_component=LossComponent(label=logits, weight=1, loss_fn=kl))`
|
124 |
+
- train_embeddings: `True`
|
125 |
+
- lr_scheduler: `<torch.optim.lr_scheduler.LambdaLR object at 0x7f48441cc250>`
|
126 |
+
- student_model_name_or_path: `None`
|
127 |
+
- student_config_name_or_path: `None`
|
128 |
+
- student_model_config: `None`
|
129 |
+
- reinitialize_weights: `None`
|
130 |
+
- copy_teacher_modules: `[('lm_head', False)]`
|
131 |
+
- student_model_as_bitnet: `True`
|
132 |
+
- student_model_compile: `False`
|
133 |
+
- dropout: `None`
|
134 |
+
- teacher_model_name_or_path: `gpt2`
|
135 |
+
- teacher_load_in_8bit: `False`
|
136 |
+
- teacher_load_in_4bit: `False`
|
137 |
+
- teacher_model_compile: `False`
|
138 |
+
- dataset_uri: `wikimedia/wikipedia`
|
139 |
+
- dataset_subset: `20231101.en`
|
140 |
+
- dataset_split: `train`
|
141 |
+
- dataset_column_name: `text`
|
142 |
+
- dataset_sample_size: `250000`
|
143 |
+
- dataset_test_size: `0.01`
|
144 |
+
- gradient_accumulation_steps: `1`
|
145 |
+
- weight_decay: `0.0`
|
146 |
+
- max_grad_norm: `1.0`
|
147 |
+
- warmup_ratio: `0.5`
|
148 |
+
- warmup_steps: `0`
|
149 |
+
- gradient_checkpointing: `True`
|
150 |
+
|
151 |
+
</details>
|
152 |
+
<br/>
|
153 |
+
|
154 |
+
|
155 |
+
# Framework Versions
|
156 |
+
- Distily 0.2.0
|
157 |
+
- Transformers 4.44.1
|
158 |
+
- Pytorch 2.3.0
|
159 |
+
- Datasets 2.21.0
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "gpt2",
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2LMHeadModel"
|
6 |
+
],
|
7 |
+
"attn_pdrop": 0.1,
|
8 |
+
"bos_token_id": 50256,
|
9 |
+
"embd_pdrop": 0.1,
|
10 |
+
"eos_token_id": 50256,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"layer_norm_epsilon": 1e-05,
|
13 |
+
"model_type": "gpt2",
|
14 |
+
"n_ctx": 1024,
|
15 |
+
"n_embd": 768,
|
16 |
+
"n_head": 12,
|
17 |
+
"n_inner": null,
|
18 |
+
"n_layer": 12,
|
19 |
+
"n_positions": 1024,
|
20 |
+
"reorder_and_upcast_attn": false,
|
21 |
+
"resid_pdrop": 0.1,
|
22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
23 |
+
"scale_attn_weights": true,
|
24 |
+
"summary_activation": null,
|
25 |
+
"summary_first_dropout": 0.1,
|
26 |
+
"summary_proj_to_labels": true,
|
27 |
+
"summary_type": "cls_index",
|
28 |
+
"summary_use_proj": true,
|
29 |
+
"task_specific_params": {
|
30 |
+
"text-generation": {
|
31 |
+
"do_sample": true,
|
32 |
+
"max_length": 50
|
33 |
+
}
|
34 |
+
},
|
35 |
+
"torch_dtype": "bfloat16",
|
36 |
+
"transformers_version": "4.44.1",
|
37 |
+
"use_cache": true,
|
38 |
+
"vocab_size": 50257
|
39 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 50256,
|
4 |
+
"eos_token_id": 50256,
|
5 |
+
"transformers_version": "4.44.1"
|
6 |
+
}
|
logs/projector=linear/events.out.tfevents.1724270239.e3f806ea38c9
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df9ce4d4663e7f002cd88472e3c4fc4316e24150b71b64cf2fbfaf7b2ca3d8ff
|
3 |
+
size 29632483
|
logs/projector=linear/events.out.tfevents.1724278251.e3f806ea38c9
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25d4840e00ec24abcee7dd1bcac5342720a317363bee2a069330476773d53be6
|
3 |
+
size 588
|
logs/projector=orthogonal/events.out.tfevents.1724270153.e3f806ea38c9
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e80c3d4435112d7aff26c27f76f943c9beede1acce528c18b133f47f9c6ae13f
|
3 |
+
size 5262
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4cfe12cfd2222eb2645dfd8569bbb547d72f328658f2f567ef060e38aa9b5c4e
|
3 |
+
size 248894656
|
special_tokens_map.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<|endoftext|>",
|
3 |
+
"eos_token": "<|endoftext|>",
|
4 |
+
"pad_token": "<|endoftext|>",
|
5 |
+
"unk_token": "<|endoftext|>"
|
6 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"50256": {
|
5 |
+
"content": "<|endoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
}
|
12 |
+
},
|
13 |
+
"bos_token": "<|endoftext|>",
|
14 |
+
"clean_up_tokenization_spaces": true,
|
15 |
+
"eos_token": "<|endoftext|>",
|
16 |
+
"model_max_length": 1024,
|
17 |
+
"pad_token": "<|endoftext|>",
|
18 |
+
"tokenizer_class": "GPT2Tokenizer",
|
19 |
+
"unk_token": "<|endoftext|>"
|
20 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:95bfde1adf61bbe5586f3675aa7efb317dc98b7ee164a398a5c3ab4d0deb42a8
|
3 |
+
size 1017899080
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|