mhenrichsen
commited on
Commit
•
cb20077
1
Parent(s):
05c5675
Upload folder using huggingface_hub
Browse files- README.md +163 -0
- added_tokens.json +4 -0
- config.json +28 -0
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +30 -0
- tokenizer.model +3 -0
- tokenizer_config.json +61 -0
README.md
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: mhenrichsen/danskgpt-tiny
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
model-index:
|
7 |
+
- name: tiny-chat
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
[<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)
|
15 |
+
<details><summary>See axolotl config</summary>
|
16 |
+
|
17 |
+
axolotl version: `0.3.0`
|
18 |
+
```yaml
|
19 |
+
base_model: mhenrichsen/danskgpt-tiny
|
20 |
+
|
21 |
+
model_type: LlamaForCausalLM
|
22 |
+
tokenizer_type: LlamaTokenizer
|
23 |
+
is_llama_derived_model: true
|
24 |
+
|
25 |
+
load_in_8bit: false
|
26 |
+
load_in_4bit: false
|
27 |
+
strict: false
|
28 |
+
|
29 |
+
#pretraining_dataset: mhenrichsen/terra
|
30 |
+
|
31 |
+
datasets:
|
32 |
+
- path: mhenrichsen/rag-qa-sharegpt
|
33 |
+
type: sharegpt
|
34 |
+
conversation: chatml
|
35 |
+
- path: mhenrichsen/creator
|
36 |
+
type: sharegpt
|
37 |
+
conversation: chatml
|
38 |
+
- path: mhenrichsen/puffin-sharegpt-fix
|
39 |
+
type: sharegpt
|
40 |
+
conversation: chatml
|
41 |
+
- path: mhenrichsen/orcaslim-sharegpt-fix
|
42 |
+
type: sharegpt
|
43 |
+
conversation: chatml
|
44 |
+
- path: mhenrichsen/dansk-tekst-sharegpt
|
45 |
+
type: sharegpt
|
46 |
+
conversation: chatml
|
47 |
+
|
48 |
+
chat_template: chatml
|
49 |
+
|
50 |
+
dataset_prepared_path:
|
51 |
+
val_set_size: 0.001
|
52 |
+
output_dir: ./tiny-chat
|
53 |
+
|
54 |
+
sequence_len: 2048
|
55 |
+
sample_packing: true
|
56 |
+
pad_to_sequence_len: true
|
57 |
+
|
58 |
+
wandb_project: tiny-danskgpt-chat
|
59 |
+
wandb_entity:
|
60 |
+
wandb_watch:
|
61 |
+
wandb_name:
|
62 |
+
wandb_log_model:
|
63 |
+
|
64 |
+
gradient_accumulation_steps: 4
|
65 |
+
micro_batch_size: 16
|
66 |
+
num_epochs: 3
|
67 |
+
optimizer: adamw_bnb_8bit
|
68 |
+
lr_scheduler: cosine
|
69 |
+
learning_rate: 0.00005
|
70 |
+
|
71 |
+
train_on_inputs: false
|
72 |
+
group_by_length: false
|
73 |
+
bf16: true
|
74 |
+
fp16: false
|
75 |
+
tf32: false
|
76 |
+
|
77 |
+
gradient_checkpointing: true
|
78 |
+
early_stopping_patience:
|
79 |
+
resume_from_checkpoint:
|
80 |
+
local_rank:
|
81 |
+
logging_steps: 1
|
82 |
+
xformers_attention:
|
83 |
+
flash_attention: true
|
84 |
+
|
85 |
+
warmup_steps: 10
|
86 |
+
evals_per_epoch: 4
|
87 |
+
eval_table_size:
|
88 |
+
saves_per_epoch: 2
|
89 |
+
debug:
|
90 |
+
deepspeed: deepspeed/zero2.json
|
91 |
+
weight_decay: 0.1
|
92 |
+
fsdp:
|
93 |
+
fsdp_config:
|
94 |
+
special_tokens:
|
95 |
+
eos_token: "<|im_end|>"
|
96 |
+
tokens:
|
97 |
+
- "<|im_start|>"
|
98 |
+
|
99 |
+
```
|
100 |
+
|
101 |
+
</details><br>
|
102 |
+
|
103 |
+
# tiny-chat
|
104 |
+
|
105 |
+
This model is a fine-tuned version of [mhenrichsen/danskgpt-tiny](https://huggingface.co/mhenrichsen/danskgpt-tiny) on the None dataset.
|
106 |
+
It achieves the following results on the evaluation set:
|
107 |
+
- Loss: 0.7168
|
108 |
+
|
109 |
+
## Model description
|
110 |
+
|
111 |
+
More information needed
|
112 |
+
|
113 |
+
## Intended uses & limitations
|
114 |
+
|
115 |
+
More information needed
|
116 |
+
|
117 |
+
## Training and evaluation data
|
118 |
+
|
119 |
+
More information needed
|
120 |
+
|
121 |
+
## Training procedure
|
122 |
+
|
123 |
+
### Training hyperparameters
|
124 |
+
|
125 |
+
The following hyperparameters were used during training:
|
126 |
+
- learning_rate: 5e-05
|
127 |
+
- train_batch_size: 16
|
128 |
+
- eval_batch_size: 16
|
129 |
+
- seed: 42
|
130 |
+
- distributed_type: multi-GPU
|
131 |
+
- num_devices: 4
|
132 |
+
- gradient_accumulation_steps: 4
|
133 |
+
- total_train_batch_size: 256
|
134 |
+
- total_eval_batch_size: 64
|
135 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
136 |
+
- lr_scheduler_type: cosine
|
137 |
+
- lr_scheduler_warmup_steps: 10
|
138 |
+
- num_epochs: 3
|
139 |
+
|
140 |
+
### Training results
|
141 |
+
|
142 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
143 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
144 |
+
| 1.3599 | 0.0 | 1 | 1.4118 |
|
145 |
+
| 0.7896 | 0.25 | 136 | 0.7813 |
|
146 |
+
| 0.7339 | 0.5 | 272 | 0.7490 |
|
147 |
+
| 0.7378 | 0.75 | 408 | 0.7285 |
|
148 |
+
| 0.7112 | 1.0 | 544 | 0.7146 |
|
149 |
+
| 0.6377 | 1.23 | 680 | 0.7135 |
|
150 |
+
| 0.6192 | 1.49 | 816 | 0.7133 |
|
151 |
+
| 0.5985 | 1.74 | 952 | 0.7073 |
|
152 |
+
| 0.6067 | 1.99 | 1088 | 0.7026 |
|
153 |
+
| 0.5139 | 2.22 | 1224 | 0.7167 |
|
154 |
+
| 0.5099 | 2.47 | 1360 | 0.7193 |
|
155 |
+
| 0.5217 | 2.72 | 1496 | 0.7168 |
|
156 |
+
|
157 |
+
|
158 |
+
### Framework versions
|
159 |
+
|
160 |
+
- Transformers 4.37.0.dev0
|
161 |
+
- Pytorch 2.0.1+cu118
|
162 |
+
- Datasets 2.16.1
|
163 |
+
- Tokenizers 0.15.0
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|im_end|>": 32000,
|
3 |
+
"<|im_start|>": 32001
|
4 |
+
}
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "mhenrichsen/danskgpt-tiny",
|
3 |
+
"architectures": [
|
4 |
+
"LlamaForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": false,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 1,
|
9 |
+
"eos_token_id": 32000,
|
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.37.0.dev0",
|
26 |
+
"use_cache": false,
|
27 |
+
"vocab_size": 32002
|
28 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 1,
|
3 |
+
"eos_token_id": 2,
|
4 |
+
"max_length": 2048,
|
5 |
+
"pad_token_id": 0,
|
6 |
+
"transformers_version": "4.37.0.dev0"
|
7 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4fc2b5e0d65c3aa53dd58c384a423ea64d2aa79263d9610b7004533c6a9efa99
|
3 |
+
size 2200140157
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "<|im_end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
tokenizer_config.json
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"32000": {
|
30 |
+
"content": "<|im_end|>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"32001": {
|
38 |
+
"content": "<|im_start|>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": false
|
44 |
+
}
|
45 |
+
},
|
46 |
+
"bos_token": "<s>",
|
47 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
48 |
+
"clean_up_tokenization_spaces": false,
|
49 |
+
"eos_token": "<|im_end|>",
|
50 |
+
"legacy": false,
|
51 |
+
"model_max_length": 1000000000000000019884624838656,
|
52 |
+
"pad_token": "</s>",
|
53 |
+
"padding_side": "right",
|
54 |
+
"sp_model_kwargs": {},
|
55 |
+
"spaces_between_special_tokens": false,
|
56 |
+
"tokenizer_class": "LlamaTokenizer",
|
57 |
+
"trust_remote_code": false,
|
58 |
+
"unk_token": "<unk>",
|
59 |
+
"use_default_system_prompt": false,
|
60 |
+
"use_fast": true
|
61 |
+
}
|