eryk-mazus commited on
Commit
68199bd
1 Parent(s): ec5ce3f

Upload 7 files

Browse files
README.md CHANGED
@@ -1,29 +1,230 @@
1
  ---
2
- license: apache-2.0
3
- datasets:
4
- - allenai/MADLAD-400
5
- - eryk-mazus/polka-pretrain-en-pl-v1
6
- language:
7
- - pl
8
- - en
9
- pipeline_tag: text-generation
10
  ---
11
 
12
- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61bf0e11c88f3fd22f654059/EMSrPEzAFkjY9nvbaJoC3.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- # Polka-1.1b
15
 
 
16
 
17
- `polka-1.1b` takes the [TinyLlama-1.1B](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) model and enhances it by continuing pretraining on an additional **5.7 billion Polish tokens**, primarily sourced from the [MADLAD-400](https://arxiv.org/abs/2309.04662) dataset. The tokens were sampled in a 10:1 ratio between Polish and English shards using [DSIR](https://github.com/p-lambda/dsir). Furthermore, Polka extends the TinyLlama tokenizer's vocabulary to 43,882 tokens, improving its efficiency for generating Polish text.
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- The training took 425 GPU hours on a single 8 x RTX 4090 machine with DeepSpeed ZeRO-2.
20
 
21
- ## Notes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- ...
24
 
25
- ## Sample code
26
 
27
- ```python
28
- ...
29
- ```
 
 
1
  ---
2
+ base_model: eryk-mazus/tinyllama-with-custom-tokenizer
3
+ tags:
4
+ - generated_from_trainer
5
+ model-index:
6
+ - name: workspace/tmp/
7
+ results: []
 
 
8
  ---
9
 
10
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
+ should probably proofread and complete it, then remove this comment. -->
12
+
13
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
14
+ <details><summary>See axolotl config</summary>
15
+
16
+ axolotl version: `0.3.0`
17
+ ```yaml
18
+ base_model: eryk-mazus/tinyllama-with-custom-tokenizer
19
+
20
+ model_type: LlamaForCausalLM
21
+ tokenizer_type: AutoTokenizer
22
+ is_llama_derived_model: true
23
+
24
+ load_in_8bit: false
25
+ load_in_4bit: false
26
+ strict: false
27
+
28
+ datasets:
29
+ - path: eryk-mazus/polka-pretrain-en-pl-v1
30
+ type: completion # format from earlier
31
+ field: text # Optional[str] default: text, field to use for completion data
32
+
33
+ dataset_prepared_path:
34
+ val_set_size: 0.05
35
+ output_dir: /workspace/tmp/
36
+
37
+ sequence_len: 2048
38
+ sample_packing: false
39
+
40
+ adapter:
41
+ lora_model_dir:
42
+ lora_r: 32
43
+ lora_alpha: 16
44
+ lora_dropout: 0.05
45
+ lora_target_linear: true
46
+ lora_fan_in_fan_out:
47
+
48
+ wandb_project: polka
49
+ wandb_entity:
50
+ wandb_watch:
51
+ wandb_name:
52
+ wandb_log_model:
53
+
54
+ gradient_accumulation_steps: 2
55
+ micro_batch_size: 4
56
+ num_epochs: 1
57
+ lr_scheduler:
58
+ learning_rate: 0.00005
59
+
60
+ optimizer: adamw_torch
61
+ adam_beta1: 0.9
62
+ adam_beta2: 0.95
63
+ adam_epsilon: 0.00001
64
+ max_grad_norm: 1.0
65
+
66
+ train_on_inputs: false
67
+ group_by_length: false
68
+ bf16: true
69
+ fp16: false
70
+ tf32: false
71
+
72
+ warmup_steps: 0
73
+ gradient_checkpointing: true
74
+ early_stopping_patience:
75
+ resume_from_checkpoint:
76
+ local_rank:
77
+ logging_steps: 1
78
+ xformers_attention:
79
+ flash_attention: true
80
+
81
+ eval_steps: 1000
82
+ save_steps: 1000
83
+ save_total_limit: 2
84
+
85
+ debug:
86
+ deepspeed:
87
+ fsdp:
88
+ fsdp_config:
89
+ special_tokens:
90
+ bos_token: "<s>"
91
+ eos_token: "</s>"
92
+ unk_token: "<unk>"
93
+
94
+ ```
95
+
96
+ </details><br>
97
+
98
+ # workspace/tmp/
99
+
100
+ This model is a fine-tuned version of [eryk-mazus/tinyllama-with-custom-tokenizer](https://huggingface.co/eryk-mazus/tinyllama-with-custom-tokenizer) on the None dataset.
101
+ It achieves the following results on the evaluation set:
102
+ - Loss: 1.8795
103
+
104
+ ## Model description
105
+
106
+ More information needed
107
+
108
+ ## Intended uses & limitations
109
+
110
+ More information needed
111
+
112
+ ## Training and evaluation data
113
+
114
+ More information needed
115
 
116
+ ## Training procedure
117
 
118
+ ### Training hyperparameters
119
 
120
+ The following hyperparameters were used during training:
121
+ - learning_rate: 5e-05
122
+ - train_batch_size: 4
123
+ - eval_batch_size: 4
124
+ - seed: 42
125
+ - distributed_type: multi-GPU
126
+ - num_devices: 8
127
+ - gradient_accumulation_steps: 2
128
+ - total_train_batch_size: 64
129
+ - total_eval_batch_size: 32
130
+ - optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-05
131
+ - lr_scheduler_type: cosine
132
+ - num_epochs: 1
133
 
134
+ ### Training results
135
 
136
+ | Training Loss | Epoch | Step | Validation Loss |
137
+ |:-------------:|:-----:|:-----:|:---------------:|
138
+ | 3.0469 | 0.01 | 1000 | 3.0497 |
139
+ | 2.664 | 0.02 | 2000 | 2.6586 |
140
+ | 2.5018 | 0.04 | 3000 | 2.4944 |
141
+ | 2.5955 | 0.05 | 4000 | 2.3988 |
142
+ | 2.2783 | 0.06 | 5000 | 2.3338 |
143
+ | 2.3171 | 0.07 | 6000 | 2.2852 |
144
+ | 2.189 | 0.08 | 7000 | 2.2459 |
145
+ | 2.3594 | 0.09 | 8000 | 2.2153 |
146
+ | 2.1882 | 0.11 | 9000 | 2.1882 |
147
+ | 2.2699 | 0.12 | 10000 | 2.1659 |
148
+ | 2.1273 | 0.13 | 11000 | 2.1469 |
149
+ | 2.1041 | 0.14 | 12000 | 2.1291 |
150
+ | 2.1698 | 0.15 | 13000 | 2.1138 |
151
+ | 2.2126 | 0.16 | 14000 | 2.1004 |
152
+ | 2.1065 | 0.18 | 15000 | 2.0886 |
153
+ | 2.0589 | 0.19 | 16000 | 2.0764 |
154
+ | 2.0537 | 0.2 | 17000 | 2.0663 |
155
+ | 1.9746 | 0.21 | 18000 | 2.0569 |
156
+ | 2.2128 | 0.22 | 19000 | 2.0477 |
157
+ | 2.1342 | 0.23 | 20000 | 2.0393 |
158
+ | 2.0643 | 0.25 | 21000 | 2.0312 |
159
+ | 2.2776 | 0.26 | 22000 | 2.0240 |
160
+ | 1.94 | 0.27 | 23000 | 2.0173 |
161
+ | 1.8249 | 0.28 | 24000 | 2.0111 |
162
+ | 1.966 | 0.29 | 25000 | 2.0049 |
163
+ | 1.9351 | 0.31 | 26000 | 1.9994 |
164
+ | 1.9563 | 0.32 | 27000 | 1.9947 |
165
+ | 1.9496 | 0.33 | 28000 | 1.9878 |
166
+ | 2.0127 | 0.34 | 29000 | 1.9835 |
167
+ | 2.0043 | 0.35 | 30000 | 1.9794 |
168
+ | 2.0227 | 0.36 | 31000 | 1.9748 |
169
+ | 1.9308 | 0.38 | 32000 | 1.9704 |
170
+ | 1.9183 | 0.39 | 33000 | 1.9655 |
171
+ | 1.9919 | 0.4 | 34000 | 1.9620 |
172
+ | 1.9351 | 0.41 | 35000 | 1.9580 |
173
+ | 1.9103 | 0.42 | 36000 | 1.9537 |
174
+ | 1.7521 | 0.43 | 37000 | 1.9512 |
175
+ | 1.9567 | 0.45 | 38000 | 1.9454 |
176
+ | 2.022 | 0.46 | 39000 | 1.9426 |
177
+ | 1.8526 | 0.47 | 40000 | 1.9398 |
178
+ | 1.8912 | 0.48 | 41000 | 1.9370 |
179
+ | 2.0546 | 0.49 | 42000 | 1.9334 |
180
+ | 2.0607 | 0.5 | 43000 | 1.9308 |
181
+ | 2.0078 | 0.52 | 44000 | 1.9279 |
182
+ | 1.889 | 0.53 | 45000 | 1.9253 |
183
+ | 1.8587 | 0.54 | 46000 | 1.9222 |
184
+ | 1.8571 | 0.55 | 47000 | 1.9199 |
185
+ | 1.8806 | 0.56 | 48000 | 1.9178 |
186
+ | 1.8483 | 0.58 | 49000 | 1.9150 |
187
+ | 1.7862 | 0.59 | 50000 | 1.9130 |
188
+ | 1.8989 | 0.6 | 51000 | 1.9102 |
189
+ | 1.9389 | 0.61 | 52000 | 1.9083 |
190
+ | 1.9301 | 0.62 | 53000 | 1.9065 |
191
+ | 1.9522 | 0.63 | 54000 | 1.9046 |
192
+ | 1.883 | 0.65 | 55000 | 1.9027 |
193
+ | 1.9647 | 0.66 | 56000 | 1.9002 |
194
+ | 1.9284 | 0.67 | 57000 | 1.8988 |
195
+ | 1.8836 | 0.68 | 58000 | 1.8974 |
196
+ | 1.8472 | 0.69 | 59000 | 1.8956 |
197
+ | 2.1232 | 0.7 | 60000 | 1.8945 |
198
+ | 1.8571 | 0.72 | 61000 | 1.8933 |
199
+ | 1.8043 | 0.73 | 62000 | 1.8918 |
200
+ | 1.9468 | 0.74 | 63000 | 1.8906 |
201
+ | 1.9173 | 0.75 | 64000 | 1.8896 |
202
+ | 1.7762 | 0.76 | 65000 | 1.8880 |
203
+ | 2.032 | 0.77 | 66000 | 1.8876 |
204
+ | 1.9362 | 0.79 | 67000 | 1.8867 |
205
+ | 1.8308 | 0.8 | 68000 | 1.8854 |
206
+ | 1.9289 | 0.81 | 69000 | 1.8847 |
207
+ | 1.9467 | 0.82 | 70000 | 1.8841 |
208
+ | 1.8798 | 0.83 | 71000 | 1.8835 |
209
+ | 1.8868 | 0.84 | 72000 | 1.8828 |
210
+ | 1.8905 | 0.86 | 73000 | 1.8820 |
211
+ | 1.9508 | 0.87 | 74000 | 1.8816 |
212
+ | 1.7983 | 0.88 | 75000 | 1.8813 |
213
+ | 1.7693 | 0.89 | 76000 | 1.8806 |
214
+ | 1.7371 | 0.9 | 77000 | 1.8804 |
215
+ | 1.8705 | 0.92 | 78000 | 1.8802 |
216
+ | 1.8707 | 0.93 | 79000 | 1.8799 |
217
+ | 1.9113 | 0.94 | 80000 | 1.8799 |
218
+ | 2.1314 | 0.95 | 81000 | 1.8797 |
219
+ | 1.9132 | 0.96 | 82000 | 1.8795 |
220
+ | 2.0349 | 0.97 | 83000 | 1.8796 |
221
+ | 1.7939 | 0.99 | 84000 | 1.8795 |
222
+ | 1.8357 | 1.0 | 85000 | 1.8795 |
223
 
 
224
 
225
+ ### Framework versions
226
 
227
+ - Transformers 4.36.2
228
+ - Pytorch 2.1.2+cu121
229
+ - Datasets 2.16.1
230
+ - Tokenizers 0.15.0
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "eryk-mazus/tinyllama-with-custom-tokenizer",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5632,
14
+ "max_position_embeddings": 2048,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 22,
18
+ "num_key_value_heads": 4,
19
+ "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-05,
21
+ "rope_scaling": null,
22
+ "rope_theta": 10000.0,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.36.2",
26
+ "use_cache": false,
27
+ "vocab_size": 43904
28
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.36.2"
6
+ }
pytorch_model-001.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa585b9221266e354bf136da9aab42bc6d22e1ba7fa6f295e910e8a48adf5cb3
3
+ size 2297641916
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "pad_token": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ }
29
+ },
30
+ "bos_token": "<s>",
31
+ "clean_up_tokenization_spaces": false,
32
+ "eos_token": "</s>",
33
+ "legacy": false,
34
+ "model_max_length": 1000000000000000019884624838656,
35
+ "pad_token": "</s>",
36
+ "padding_side": "right",
37
+ "sp_model_kwargs": {},
38
+ "tokenizer_class": "LlamaTokenizer",
39
+ "unk_token": "<unk>",
40
+ "use_default_system_prompt": false
41
+ }