jekunz commited on
Commit
2ee8d62
·
verified ·
1 Parent(s): 8be583d

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - jekunz/smollm-360m-cpt-fineweb-icelandic
4
+ - jekunz/smollm-360m-cpt-fineweb-swedish
5
+ - jekunz/smollm-360m-cpt-fineweb-danish
6
+ - jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal
7
+ - jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk
8
+ tags:
9
+ - merge
10
+ - mergekit
11
+ - lazymergekit
12
+ - jekunz/smollm-360m-cpt-fineweb-icelandic
13
+ - jekunz/smollm-360m-cpt-fineweb-swedish
14
+ - jekunz/smollm-360m-cpt-fineweb-danish
15
+ - jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal
16
+ - jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk
17
+ ---
18
+
19
+ # smollm360m-da1-is1-nno1-nob1-sv1-ties
20
+
21
+ smollm360m-da1-is1-nno1-nob1-sv1-ties is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
22
+ * [jekunz/smollm-360m-cpt-fineweb-icelandic](https://huggingface.co/jekunz/smollm-360m-cpt-fineweb-icelandic)
23
+ * [jekunz/smollm-360m-cpt-fineweb-swedish](https://huggingface.co/jekunz/smollm-360m-cpt-fineweb-swedish)
24
+ * [jekunz/smollm-360m-cpt-fineweb-danish](https://huggingface.co/jekunz/smollm-360m-cpt-fineweb-danish)
25
+ * [jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal](https://huggingface.co/jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal)
26
+ * [jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk](https://huggingface.co/jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk)
27
+
28
+ ## 🧩 Configuration
29
+
30
+ ```yaml
31
+ models:
32
+ - model: jekunz/smollm-360m-cpt-fineweb-icelandic
33
+ parameters:
34
+ density: 0.5
35
+ weight: 1.0
36
+ - model: jekunz/smollm-360m-cpt-fineweb-swedish
37
+ parameters:
38
+ density: 0.5
39
+ weight: 1.0
40
+ - model: jekunz/smollm-360m-cpt-fineweb-danish
41
+ parameters:
42
+ density: 0.5
43
+ weight: 1.0
44
+ - model: jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal
45
+ parameters:
46
+ density: 0.5
47
+ weight: 1.0
48
+ - model: jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk
49
+ parameters:
50
+ density: 0.5
51
+ weight: 1.0
52
+ merge_method: ties
53
+ base_model: HuggingFaceTB/SmolLM2-360M-Instruct
54
+ parameters:
55
+ normalize: true
56
+ dtype: float16
57
+ ```
58
+
59
+ ## 💻 Usage
60
+
61
+ ```python
62
+ !pip install -qU transformers accelerate
63
+
64
+ from transformers import AutoTokenizer
65
+ import transformers
66
+ import torch
67
+
68
+ model = "jekunz/smollm360m-da1-is1-nno1-nob1-sv1-ties"
69
+ messages = [{"role": "user", "content": "What is a large language model?"}]
70
+
71
+ tokenizer = AutoTokenizer.from_pretrained(model)
72
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
73
+ pipeline = transformers.pipeline(
74
+ "text-generation",
75
+ model=model,
76
+ torch_dtype=torch.float16,
77
+ device_map="auto",
78
+ )
79
+
80
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
81
+ print(outputs[0]["generated_text"])
82
+ ```
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "head_dim": 64,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 960,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 2560,
14
+ "is_llama_config": true,
15
+ "max_position_embeddings": 8192,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 15,
19
+ "num_hidden_layers": 32,
20
+ "num_key_value_heads": 5,
21
+ "pad_token_id": 2,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_interleaved": false,
25
+ "rope_scaling": null,
26
+ "rope_theta": 100000,
27
+ "tie_word_embeddings": true,
28
+ "torch_dtype": "float16",
29
+ "transformers.js_config": {
30
+ "kv_cache_dtype": {
31
+ "fp16": "float16",
32
+ "q4f16": "float16"
33
+ }
34
+ },
35
+ "transformers_version": "4.51.1",
36
+ "use_cache": true,
37
+ "vocab_size": 49152
38
+ }
mergekit_config.yml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ models:
3
+ - model: jekunz/smollm-360m-cpt-fineweb-icelandic
4
+ parameters:
5
+ density: 0.5
6
+ weight: 1.0
7
+ - model: jekunz/smollm-360m-cpt-fineweb-swedish
8
+ parameters:
9
+ density: 0.5
10
+ weight: 1.0
11
+ - model: jekunz/smollm-360m-cpt-fineweb-danish
12
+ parameters:
13
+ density: 0.5
14
+ weight: 1.0
15
+ - model: jekunz/smollm-360m-cpt-fineweb-norwegian-bokmaal
16
+ parameters:
17
+ density: 0.5
18
+ weight: 1.0
19
+ - model: jekunz/smollm-360m-cpt-fineweb-norwegian-nynorsk
20
+ parameters:
21
+ density: 0.5
22
+ weight: 1.0
23
+ merge_method: ties
24
+ base_model: HuggingFaceTB/SmolLM2-360M-Instruct
25
+ parameters:
26
+ normalize: true
27
+ dtype: float16
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d08c8e640c1515aecc73a08cf283d3924c5da5d2b2cd9dde85c5b3f85be477
3
+ size 723674624
special_tokens_map.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "<|im_start|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "eos_token": {
14
+ "content": "<|im_end|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "pad_token": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "unk_token": {
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<repo_name>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<reponame>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "5": {
45
+ "content": "<file_sep>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "6": {
53
+ "content": "<filename>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "7": {
61
+ "content": "<gh_stars>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "8": {
69
+ "content": "<issue_start>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "9": {
77
+ "content": "<issue_comment>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "10": {
85
+ "content": "<issue_closed>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "11": {
93
+ "content": "<jupyter_start>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "12": {
101
+ "content": "<jupyter_text>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "13": {
109
+ "content": "<jupyter_code>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "14": {
117
+ "content": "<jupyter_output>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": true
123
+ },
124
+ "15": {
125
+ "content": "<jupyter_script>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": true
131
+ },
132
+ "16": {
133
+ "content": "<empty_output>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": true
139
+ }
140
+ },
141
+ "additional_special_tokens": [
142
+ "<|im_start|>",
143
+ "<|im_end|>"
144
+ ],
145
+ "bos_token": "<|im_start|>",
146
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
147
+ "clean_up_tokenization_spaces": false,
148
+ "eos_token": "<|im_end|>",
149
+ "model_max_length": 8192,
150
+ "pad_token": "<|im_end|>",
151
+ "tokenizer_class": "GPT2Tokenizer",
152
+ "unk_token": "<|endoftext|>",
153
+ "vocab_size": 49152
154
+ }