drishanarora commited on
Commit
3452f7e
·
verified ·
1 Parent(s): 224791e

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. README.md +254 -0
  2. chat_template.jinja +111 -0
  3. config.json +107 -0
  4. configuration_deepseek.py +210 -0
  5. generation_config.json +6 -0
  6. model-00001-of-00135.safetensors +3 -0
  7. model-00002-of-00135.safetensors +3 -0
  8. model-00003-of-00135.safetensors +3 -0
  9. model-00007-of-00135.safetensors +3 -0
  10. model-00010-of-00135.safetensors +3 -0
  11. model-00011-of-00135.safetensors +3 -0
  12. model-00012-of-00135.safetensors +3 -0
  13. model-00014-of-00135.safetensors +3 -0
  14. model-00016-of-00135.safetensors +3 -0
  15. model-00031-of-00135.safetensors +3 -0
  16. model-00032-of-00135.safetensors +3 -0
  17. model-00040-of-00135.safetensors +3 -0
  18. model-00042-of-00135.safetensors +3 -0
  19. model-00043-of-00135.safetensors +3 -0
  20. model-00046-of-00135.safetensors +3 -0
  21. model-00048-of-00135.safetensors +3 -0
  22. model-00049-of-00135.safetensors +3 -0
  23. model-00055-of-00135.safetensors +3 -0
  24. model-00058-of-00135.safetensors +3 -0
  25. model-00060-of-00135.safetensors +3 -0
  26. model-00063-of-00135.safetensors +3 -0
  27. model-00064-of-00135.safetensors +3 -0
  28. model-00071-of-00135.safetensors +3 -0
  29. model-00072-of-00135.safetensors +3 -0
  30. model-00079-of-00135.safetensors +3 -0
  31. model-00080-of-00135.safetensors +3 -0
  32. model-00084-of-00135.safetensors +3 -0
  33. model-00090-of-00135.safetensors +3 -0
  34. model-00095-of-00135.safetensors +3 -0
  35. model-00099-of-00135.safetensors +3 -0
  36. model-00107-of-00135.safetensors +3 -0
  37. model-00111-of-00135.safetensors +3 -0
  38. model-00112-of-00135.safetensors +3 -0
  39. model-00117-of-00135.safetensors +3 -0
  40. model-00126-of-00135.safetensors +3 -0
  41. model-00128-of-00135.safetensors +3 -0
  42. model-00130-of-00135.safetensors +3 -0
  43. model-00132-of-00135.safetensors +3 -0
  44. model-00134-of-00135.safetensors +3 -0
  45. model-00135-of-00135.safetensors +3 -0
  46. model.safetensors.index.json +0 -0
  47. recipe.yaml +6 -0
  48. special_tokens_map.json +23 -0
  49. tokenizer.json +0 -0
  50. tokenizer_config.json +0 -0
README.md ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ base_model:
5
+ - deepseek-ai/DeepSeek-V3-Base
6
+ ---
7
+
8
+ <p align="center">
9
+ <img src="images/deep-cogito-logo.png" alt="Logo" width="40%">
10
+ </p>
11
+
12
+
13
+ # Cogito v2 preview - 671B MoE (FP8)
14
+
15
+ [Blog Post](https://www.deepcogito.com/research/cogito-v2-preview)
16
+
17
+ The Cogito v2 LLMs are instruction tuned generative models. All models are released under an open license for commercial use.
18
+
19
+ - Cogito v2 models are hybrid reasoning models. Each model can answer directly (standard LLM), or self-reflect before answering (like reasoning models).
20
+ - The LLMs are trained using **Iterated Distillation and Amplification (IDA)** - an scalable and efficient alignment strategy for superintelligence using iterative self-improvement.
21
+ - The models have been optimized for coding, STEM, instruction following and general helpfulness, and have significantly higher multilingual, coding and tool calling capabilities than size equivalent counterparts.
22
+ - In both standard and reasoning modes, Cogito v2-preview models outperform their size equivalent counterparts on common industry benchmarks.
23
+ - This model is trained in over 30 languages and supports a context length of 128k.
24
+
25
+ # Evaluations
26
+ For detailed evaluations, please refer to the [Blog Post](https://www.deepcogito.com/research/cogito-v2-preview).
27
+
28
+
29
+ # Usage
30
+ Here is a snippet below for usage with Transformers:
31
+
32
+ ```python
33
+ import transformers
34
+ import torch
35
+
36
+ model_id = "deepcogito/cogito-v2-preview-llama-671B-MoE-FP8"
37
+
38
+ pipeline = transformers.pipeline(
39
+ "text-generation",
40
+ model=model_id,
41
+ model_kwargs={"torch_dtype": torch.bfloat16},
42
+ device_map="auto",
43
+ )
44
+
45
+ messages = [
46
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
47
+ {"role": "user", "content": "Give me a short introduction to LLMs."},
48
+ ]
49
+
50
+ outputs = pipeline(
51
+ messages,
52
+ max_new_tokens=512,
53
+ )
54
+
55
+ print(outputs[0]["generated_text"][-1])
56
+ ```
57
+
58
+
59
+
60
+ ## Implementing extended thinking
61
+ - By default, the model will answer in the standard mode.
62
+ - To enable thinking, you can do any one of the two methods:
63
+ - Set `enable_thinking=True` while applying the chat template.
64
+ - Add a specific system prompt, along with prefilling the response with "\<think\>\n".
65
+
66
+ **NOTE: Unlike Cogito v1 models, we initiate the response with "\<think\>\n" at the beginning of every output when reasoning is enabled. This is because hybrid models can be brittle at times (<0.1% of the cases), and adding a "\<think\>\n" ensures that the model does indeed respect thinking.**
67
+
68
+ ### Method 1 - Set enable_thinking=True in the tokenizer
69
+ If you are using Huggingface tokenizers, then you can simply use add the argument `enable_thinking=True` to the tokenization (this option is added to the chat template).
70
+
71
+ Here is an example -
72
+ ```python
73
+ from transformers import AutoModelForCausalLM, AutoTokenizer
74
+
75
+ model_name = "deepcogito/cogito-v2-preview-llama-671B-MoE-FP8"
76
+
77
+ model = AutoModelForCausalLM.from_pretrained(
78
+ model_name,
79
+ torch_dtype="auto",
80
+ device_map="auto"
81
+ )
82
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
83
+
84
+ prompt = "Give me a short introduction to LLMs."
85
+ messages = [
86
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
87
+ {"role": "user", "content": prompt}
88
+ ]
89
+
90
+ text = tokenizer.apply_chat_template(
91
+ messages,
92
+ tokenize=False,
93
+ add_generation_prompt=True,
94
+ enable_thinking=True
95
+ )
96
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
97
+
98
+ generated_ids = model.generate(
99
+ **model_inputs,
100
+ max_new_tokens=512
101
+ )
102
+ generated_ids = [
103
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
104
+ ]
105
+
106
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
107
+ print(response)
108
+ ```
109
+
110
+ ### Method 2 - Add a specific system prompt, along with prefilling the response with "\<think\>\n".
111
+ To enable thinking using this method, you need to do two parts -
112
+
113
+
114
+ Step 1 - Simply use this in the system prompt `system_instruction = 'Enable deep thinking subroutine.'`
115
+
116
+ If you already have a system_instruction, then use `system_instruction = 'Enable deep thinking subroutine.' + '\n\n' + system_instruction`.
117
+
118
+ Step 2 - Prefil the response with the tokens `"<think>\n"`.
119
+
120
+ Here is an example -
121
+
122
+ ```python
123
+ import transformers
124
+ import torch
125
+
126
+ model_name = "deepcogito/cogito-v2-preview-llama-109B-MoE"
127
+
128
+ model = AutoModelForCausalLM.from_pretrained(
129
+ model_name,
130
+ torch_dtype="auto",
131
+ device_map="auto"
132
+ )
133
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
134
+
135
+ # Step 1 - Add deep thinking instruction.
136
+ DEEP_THINKING_INSTRUCTION = "Enable deep thinking subroutine."
137
+
138
+ messages = [
139
+ {"role": "system", "content": DEEP_THINKING_INSTRUCTION},
140
+ {"role": "user", "content": "Write a bash script that takes a matrix represented as a string with format '[1,2],[3,4],[5,6]' and prints the transpose in the same format."},
141
+ ]
142
+
143
+ text = tokenizer.apply_chat_template(
144
+ messages,
145
+ tokenize=False,
146
+ add_generation_prompt=True
147
+ )
148
+
149
+ # Step 2 - Prefill response with "<think>\n".
150
+ text += "<think>\n"
151
+
152
+ # Now, continue as usual.
153
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
154
+
155
+ generated_ids = model.generate(
156
+ **model_inputs,
157
+ max_new_tokens=512
158
+ )
159
+ generated_ids = [
160
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
161
+ ]
162
+
163
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
164
+ print(response)
165
+ ```
166
+
167
+
168
+ Similarly, if you have a system prompt, you can append the `DEEP_THINKING_INSTRUCTION` to the beginning in this way -
169
+
170
+ ```python
171
+ DEEP_THINKING_INSTRUCTION = "Enable deep thinking subroutine."
172
+
173
+ system_prompt = "Reply to each prompt with only the actual code - no explanations."
174
+ prompt = "Write a bash script that takes a matrix represented as a string with format '[1,2],[3,4],[5,6]' and prints the transpose in the same format."
175
+
176
+ messages = [
177
+ {"role": "system", "content": DEEP_THINKING_INSTRUCTION + '\n\n' + system_prompt},
178
+ {"role": "user", "content": prompt}
179
+ ]
180
+ ```
181
+
182
+
183
+ # Tool Calling
184
+ Cogito models support tool calling (single, parallel, multiple and parallel_multiple) both in standard and extended thinking mode.
185
+
186
+ Here is a snippet -
187
+
188
+ ```python
189
+ # First, define a tool
190
+ def get_current_temperature(location: str) -> float:
191
+ """
192
+ Get the current temperature at a location.
193
+
194
+ Args:
195
+ location: The location to get the temperature for, in the format "City, Country"
196
+ Returns:
197
+ The current temperature at the specified location in the specified units, as a float.
198
+ """
199
+ return 22. # A real function should probably actually get the temperature!
200
+
201
+ # Next, create a chat and apply the chat template
202
+ messages = [
203
+ {"role": "user", "content": "Hey, what's the temperature in Paris right now?"}
204
+ ]
205
+
206
+ model_inputs = tokenizer.apply_chat_template(messages, tools=[get_current_temperature], add_generation_prompt=True)
207
+
208
+ text = tokenizer.apply_chat_template(messages, tools=[get_current_temperature], add_generation_prompt=True, tokenize=False)
209
+ inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False).to(model.device)
210
+ outputs = model.generate(**inputs, max_new_tokens=512)
211
+ output_text = tokenizer.batch_decode(outputs)[0][len(text):]
212
+ print(output_text)
213
+ ```
214
+
215
+ This will result in the output -
216
+ ```
217
+ <|tool▁calls▁begin|><|tool▁call▁begin|>function<|tool▁sep|>get_current_temperature
218
+ ```json
219
+ {"location":"Paris, France"}
220
+ ```<|tool▁call▁end|><|tool▁calls▁end|><|end▁of▁sentence|>
221
+ ```
222
+
223
+ You can then generate text from this input as normal. If the model generates a tool call, you should add it to the chat like so:
224
+
225
+ ```python
226
+ tool_call = {"name": "get_current_temperature", "arguments": {"location": "Paris, France"}}
227
+ messages.append({"role": "assistant", "tool_calls": [{"type": "function", "function": tool_call}]})
228
+ ```
229
+
230
+ and then call the tool and append the result, with the `tool` role, like so:
231
+
232
+ ```python
233
+ messages.append({"role": "tool", "name": "get_current_temperature", "content": "22.0"})
234
+ ```
235
+
236
+ After that, you can `generate()` again to let the model use the tool result in the chat:
237
+
238
+ ```python
239
+ text = tokenizer.apply_chat_template(messages, tools=[get_current_temperature], add_generation_prompt=True, tokenize=False)
240
+ inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False).to(model.device)
241
+ outputs = model.generate(**inputs, max_new_tokens=512)
242
+ output_text = tokenizer.batch_decode(outputs)[0][len(text):]
243
+ ```
244
+
245
+ This should result in the string -
246
+ ```
247
+ 'The current temperature in Paris is 22.0 degrees.<|end▁of▁sentence|>'
248
+ ```
249
+
250
+ ## License
251
+ This repository and the model weights are licensed under **MIT License**.
252
+
253
+ ## Contact
254
+ If you would like to reach out to our team, send an email to [contact@deepcogito.com](contact@deepcogito.com).
chat_template.jinja ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {# ==================================================================== #}
2
+ {# Deepseek v3 template with enable_thinking and tools support #}
3
+ {# ==================================================================== #}
4
+ {%- if not enable_thinking is defined %}{% set enable_thinking = false %}{% endif -%}
5
+ {%- if not tools is defined %}{% set tools = none %}{% endif -%}
6
+ {%- if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif -%}
7
+
8
+ {# --------------------------- Collect system prompt -------------------- #}
9
+ {%- set ns = namespace(system_prompt='', is_last_user=false, outputs_open=false, first_output=true) -%}
10
+
11
+ {%- if messages and messages[0].role == 'system' -%}
12
+ {%- set raw = messages[0].content -%}
13
+ {%- set ns.system_prompt = raw if raw is string else raw[0].text -%}
14
+ {%- set messages = messages[1:] -%}
15
+ {%- endif -%}
16
+
17
+ {# --------------------------- Inject deep thinking --------------------- #}
18
+ {%- if enable_thinking -%}
19
+ {%- set ns.system_prompt = ns.system_prompt and 'Enable deep thinking subroutine.
20
+
21
+ ' ~ ns.system_prompt or 'Enable deep thinking subroutine.' -%}
22
+ {%- endif -%}
23
+
24
+ {# --------------------------- Append tools block ----------------------- #}
25
+ {%- if tools is not none -%}
26
+ {%- if ns.system_prompt -%}
27
+ {%- set ns.system_prompt = ns.system_prompt ~ '
28
+
29
+ You have the following functions available:
30
+
31
+ ' -%}
32
+ {%- else -%}
33
+ {%- set ns.system_prompt = 'You have the following functions available:
34
+
35
+ ' -%}
36
+ {%- endif -%}
37
+ {%- for t in tools -%}
38
+ {%- set ns.system_prompt = ns.system_prompt ~ "```json
39
+ " ~ (t | tojson(indent=4)) ~ "
40
+ ```
41
+
42
+ " -%}
43
+ {%- endfor -%}
44
+ {%- endif -%}
45
+
46
+ {{- bos_token -}}{{- ns.system_prompt -}}
47
+
48
+ {# --------------------------- Iterate conversation --------------------- #}
49
+ {%- for m in messages -%}
50
+ {# --------------------------- USER ---------------------------------- #}
51
+ {%- if m.role == 'user' -%}
52
+ {%- set ns.is_last_user = true -%}
53
+ {%- set txt = m.content if m.content is string else m.content | selectattr('type','equalto','text') | map(attribute='text') | join('') -%}
54
+ {{- "<|User|>" -}}{{- txt -}}{{- "<|Assistant|>" -}}
55
+ {%- endif -%}
56
+
57
+ {# --------------------------- ASSISTANT with TOOL CALLS -------------- #}
58
+ {%- if m.role == 'assistant' and m.tool_calls is defined and m.tool_calls -%}
59
+ {%- set ns.is_last_user = false -%}
60
+ {%- set lead = m.content is string and m.content|trim or (m.content and m.content | selectattr('type','equalto','text') | map(attribute='text') | join('')) or '' -%}
61
+ {{- lead -}}{{- "<|tool▁calls▁begin|>" -}}
62
+ {%- for call in m.tool_calls -%}
63
+ {{- "<|tool▁call▁begin|>" -}}{{- call.type -}}{{- "<|tool▁sep|>" -}}{{- call.function.name -}}
64
+ {{- "
65
+ ```json
66
+ " -}}{{- call.function.arguments -}}{{- "
67
+ ```" -}}{{- "<|tool▁call▁end|>" -}}
68
+ {%- if not loop.last -%}{{- "
69
+ " -}}{%- endif -%}
70
+ {%- endfor -%}
71
+ {{- "<|tool▁calls▁end|>" -}}{{- "<|end▁of▁sentence|>" -}}
72
+ {%- endif -%}
73
+
74
+ {# --------------------------- ASSISTANT plain ------------------------ #}
75
+ {%- if m.role == 'assistant' and (m.tool_calls is not defined or not m.tool_calls) -%}
76
+ {%- set ns.is_last_user = false -%}
77
+ {%- set txt = m.content if m.content is string else m.content | selectattr('type','equalto','text') | map(attribute='text') | join('') -%}
78
+ {{- txt -}}{{- "<|end▁of▁sentence|>" -}}
79
+ {%- endif -%}
80
+
81
+ {# --------------------------- TOOL output ---------------------------- #}
82
+ {%- if m.role == 'tool' -%}
83
+ {%- set ns.is_last_user = false -%}
84
+ {%- set out_txt = m.content if m.content is string else m.content | selectattr('type','equalto','text') | map(attribute='text') | join('') -%}
85
+ {%- if not ns.outputs_open -%}
86
+ {{- "<|tool▁outputs▁begin|>" -}}
87
+ {%- set ns.outputs_open = true -%}
88
+ {%- endif -%}
89
+ {{- "<|tool▁output▁begin|>" -}}{{- out_txt -}}{{- "<|tool▁output▁end|>" -}}
90
+ {%- if loop.nextitem is defined and loop.nextitem.role == 'tool' -%}
91
+ {{- "
92
+ " -}}
93
+ {%- endif -%}
94
+ {%- if loop.nextitem is undefined or loop.nextitem.role != 'tool' -%}
95
+ {{- "<|tool▁outputs▁end|>" -}}
96
+ {%- set ns.outputs_open = false -%}
97
+ {%- endif -%}
98
+ {%- endif -%}
99
+ {%- endfor -%}
100
+
101
+ {%- if ns.outputs_open -%}
102
+ {{- "<|tool▁outputs▁end|>" -}}
103
+ {%- endif -%}
104
+
105
+ {%- if add_generation_prompt and not ns.is_last_user -%}
106
+ {{- "<|Assistant|>" -}}
107
+ {%- endif -%}
108
+
109
+ {%- if add_generation_prompt and enable_thinking -%}
110
+ {{- '<think>\n' -}}
111
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DeepseekV3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_deepseek.DeepseekV3Config",
9
+ "AutoModel": "modeling_deepseek.DeepseekV3Model",
10
+ "AutoModelForCausalLM": "modeling_deepseek.DeepseekV3ForCausalLM"
11
+ },
12
+ "aux_loss_alpha": 0.001,
13
+ "bos_token_id": 0,
14
+ "eos_token_id": 1,
15
+ "ep_size": 1,
16
+ "first_k_dense_replace": 3,
17
+ "head_dim": 64,
18
+ "hidden_act": "silu",
19
+ "hidden_size": 7168,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 18432,
22
+ "kv_lora_rank": 512,
23
+ "max_position_embeddings": 163840,
24
+ "model_type": "deepseek_v3",
25
+ "moe_intermediate_size": 2048,
26
+ "moe_layer_freq": 1,
27
+ "n_group": 8,
28
+ "n_routed_experts": 256,
29
+ "n_shared_experts": 1,
30
+ "norm_topk_prob": true,
31
+ "num_attention_heads": 128,
32
+ "num_experts_per_tok": 8,
33
+ "num_hidden_layers": 61,
34
+ "num_key_value_heads": 128,
35
+ "num_nextn_predict_layers": 1,
36
+ "pretraining_tp": 1,
37
+ "q_lora_rank": 1536,
38
+ "qk_head_dim": 192,
39
+ "qk_nope_head_dim": 128,
40
+ "qk_rope_head_dim": 64,
41
+ "quantization_config": {
42
+ "config_groups": {
43
+ "group_0": {
44
+ "input_activations": {
45
+ "actorder": null,
46
+ "block_structure": null,
47
+ "dynamic": true,
48
+ "group_size": null,
49
+ "num_bits": 8,
50
+ "observer": null,
51
+ "observer_kwargs": {},
52
+ "strategy": "token",
53
+ "symmetric": true,
54
+ "type": "float"
55
+ },
56
+ "output_activations": null,
57
+ "targets": [
58
+ "Linear"
59
+ ],
60
+ "weights": {
61
+ "actorder": null,
62
+ "block_structure": null,
63
+ "dynamic": false,
64
+ "group_size": null,
65
+ "num_bits": 8,
66
+ "observer": "minmax",
67
+ "observer_kwargs": {},
68
+ "strategy": "channel",
69
+ "symmetric": true,
70
+ "type": "float"
71
+ }
72
+ }
73
+ },
74
+ "format": "float-quantized",
75
+ "global_compression_ratio": null,
76
+ "ignore": [
77
+ "lm_head"
78
+ ],
79
+ "kv_cache_scheme": null,
80
+ "quant_method": "compressed-tensors",
81
+ "quantization_status": "compressed"
82
+ },
83
+ "rms_norm_eps": 1e-06,
84
+ "rope_interleave": true,
85
+ "rope_scaling": {
86
+ "beta_fast": 32.0,
87
+ "beta_slow": 1.0,
88
+ "factor": 40.0,
89
+ "mscale": 1.0,
90
+ "mscale_all_dim": 1.0,
91
+ "original_max_position_embeddings": 4096,
92
+ "rope_type": "yarn",
93
+ "type": "yarn"
94
+ },
95
+ "rope_theta": 10000,
96
+ "routed_scaling_factor": 2.5,
97
+ "scoring_func": "sigmoid",
98
+ "seq_aux": true,
99
+ "tie_word_embeddings": false,
100
+ "topk_group": 4,
101
+ "topk_method": "noaux_tc",
102
+ "torch_dtype": "bfloat16",
103
+ "transformers_version": "4.53.0",
104
+ "use_cache": true,
105
+ "v_head_dim": 128,
106
+ "vocab_size": 128815
107
+ }
configuration_deepseek.py ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers.configuration_utils import PretrainedConfig
2
+ from transformers.utils import logging
3
+
4
+ logger = logging.get_logger(__name__)
5
+
6
+ DEEPSEEK_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
7
+ class DeepseekV3Config(PretrainedConfig):
8
+ r"""
9
+ This is the configuration class to store the configuration of a [`DeepseekV3Model`]. It is used to instantiate an DeepSeek
10
+ model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
11
+ defaults will yield a similar configuration to that of the DeepSeek-V3.
12
+
13
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
14
+ documentation from [`PretrainedConfig`] for more information.
15
+
16
+
17
+ Args:
18
+ vocab_size (`int`, *optional*, defaults to 129280):
19
+ Vocabulary size of the Deep model. Defines the number of different tokens that can be represented by the
20
+ `inputs_ids` passed when calling [`DeepseekV3Model`]
21
+ hidden_size (`int`, *optional*, defaults to 4096):
22
+ Dimension of the hidden representations.
23
+ intermediate_size (`int`, *optional*, defaults to 11008):
24
+ Dimension of the MLP representations.
25
+ moe_intermediate_size (`int`, *optional*, defaults to 1407):
26
+ Dimension of the MoE representations.
27
+ num_hidden_layers (`int`, *optional*, defaults to 32):
28
+ Number of hidden layers in the Transformer decoder.
29
+ num_nextn_predict_layers (`int`, *optional*, defaults to 1):
30
+ Number of nextn predict layers in the DeepSeekV3 Model.
31
+ num_attention_heads (`int`, *optional*, defaults to 32):
32
+ Number of attention heads for each attention layer in the Transformer decoder.
33
+ n_shared_experts (`int`, *optional*, defaults to None):
34
+ Number of shared experts, None means dense model.
35
+ n_routed_experts (`int`, *optional*, defaults to None):
36
+ Number of routed experts, None means dense model.
37
+ routed_scaling_factor (`float`, *optional*, defaults to 1.0):
38
+ Scaling factor or routed experts.
39
+ topk_method (`str`, *optional*, defaults to `gready`):
40
+ Topk method used in routed gate.
41
+ n_group (`int`, *optional*, defaults to None):
42
+ Number of groups for routed experts.
43
+ topk_group (`int`, *optional*, defaults to None):
44
+ Number of selected groups for each token(for each token, ensuring the selected experts is only within `topk_group` groups).
45
+ num_experts_per_tok (`int`, *optional*, defaults to None):
46
+ Number of selected experts, None means dense model.
47
+ moe_layer_freq (`int`, *optional*, defaults to 1):
48
+ The frequency of the MoE layer: one expert layer for every `moe_layer_freq - 1` dense layers.
49
+ first_k_dense_replace (`int`, *optional*, defaults to 0):
50
+ Number of dense layers in shallow layers(embed->dense->dense->...->dense->moe->moe...->lm_head).
51
+ \--k dense layers--/
52
+ norm_topk_prob (`bool`, *optional*, defaults to False):
53
+ Whether to normalize the weights of the routed experts.
54
+ scoring_func (`str`, *optional*, defaults to 'softmax'):
55
+ Method of computing expert weights.
56
+ aux_loss_alpha (`float`, *optional*, defaults to 0.001):
57
+ Auxiliary loss weight coefficient.
58
+ seq_aux = (`bool`, *optional*, defaults to True):
59
+ Whether to compute the auxiliary loss for each individual sample.
60
+ num_key_value_heads (`int`, *optional*):
61
+ This is the number of key_value heads that should be used to implement Grouped Query Attention. If
62
+ `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
63
+ `num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
64
+ converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
65
+ by meanpooling all the original heads within that group. For more details checkout [this
66
+ paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
67
+ `num_attention_heads`.
68
+ hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
69
+ The non-linear activation function (function or string) in the decoder.
70
+ max_position_embeddings (`int`, *optional*, defaults to 2048):
71
+ The maximum sequence length that this model might ever be used with.
72
+ initializer_range (`float`, *optional*, defaults to 0.02):
73
+ The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
74
+ rms_norm_eps (`float`, *optional*, defaults to 1e-06):
75
+ The epsilon used by the rms normalization layers.
76
+ use_cache (`bool`, *optional*, defaults to `True`):
77
+ Whether or not the model should return the last key/values attentions (not used by all models). Only
78
+ relevant if `config.is_decoder=True`.
79
+ pad_token_id (`int`, *optional*):
80
+ Padding token id.
81
+ bos_token_id (`int`, *optional*, defaults to 1):
82
+ Beginning of stream token id.
83
+ eos_token_id (`int`, *optional*, defaults to 2):
84
+ End of stream token id.
85
+ pretraining_tp (`int`, *optional*, defaults to 1):
86
+ Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
87
+ document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
88
+ necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
89
+ issue](https://github.com/pytorch/pytorch/issues/76232).
90
+ tie_word_embeddings (`bool`, *optional*, defaults to `False`):
91
+ Whether to tie weight embeddings
92
+ rope_theta (`float`, *optional*, defaults to 10000.0):
93
+ The base period of the RoPE embeddings.
94
+ rope_scaling (`Dict`, *optional*):
95
+ Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
96
+ strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
97
+ `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
98
+ `max_position_embeddings` to the expected new maximum.
99
+ attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
100
+ Whether to use a bias in the query, key, value and output projection layers during self-attention.
101
+ attention_dropout (`float`, *optional*, defaults to 0.0):
102
+ The dropout ratio for the attention probabilities.
103
+
104
+ ```python
105
+ >>> from transformers import DeepseekV3Model, DeepseekV3Config
106
+
107
+ >>> # Initializing a Deepseek-V3 style configuration
108
+ >>> configuration = DeepseekV3Config()
109
+
110
+ >>> # Accessing the model configuration
111
+ >>> configuration = model.config
112
+ ```"""
113
+
114
+ model_type = "deepseek_v3"
115
+ keys_to_ignore_at_inference = ["past_key_values"]
116
+
117
+ def __init__(
118
+ self,
119
+ vocab_size=129280,
120
+ hidden_size=7168,
121
+ intermediate_size=18432,
122
+ moe_intermediate_size = 2048,
123
+ num_hidden_layers=61,
124
+ num_nextn_predict_layers=1,
125
+ num_attention_heads=128,
126
+ num_key_value_heads=128,
127
+ n_shared_experts = 1,
128
+ n_routed_experts = 256,
129
+ ep_size = 1,
130
+ routed_scaling_factor = 2.5,
131
+ kv_lora_rank = 512,
132
+ q_lora_rank = 1536,
133
+ qk_rope_head_dim = 64,
134
+ v_head_dim = 128,
135
+ qk_nope_head_dim = 128,
136
+ topk_method = 'noaux_tc',
137
+ n_group = 8,
138
+ topk_group = 4,
139
+ num_experts_per_tok = 8,
140
+ moe_layer_freq = 1,
141
+ first_k_dense_replace = 3,
142
+ norm_topk_prob = True,
143
+ scoring_func = 'sigmoid',
144
+ aux_loss_alpha = 0.001,
145
+ seq_aux = True,
146
+ hidden_act="silu",
147
+ max_position_embeddings=4096,
148
+ initializer_range=0.02,
149
+ rms_norm_eps=1e-6,
150
+ use_cache=True,
151
+ pad_token_id=None,
152
+ bos_token_id=0,
153
+ eos_token_id=1,
154
+ pretraining_tp=1,
155
+ tie_word_embeddings=False,
156
+ rope_theta=10000.0,
157
+ rope_scaling=None,
158
+ attention_bias=False,
159
+ attention_dropout=0.0,
160
+ **kwargs,
161
+ ):
162
+ self.vocab_size = vocab_size
163
+ self.max_position_embeddings = max_position_embeddings
164
+ self.hidden_size = hidden_size
165
+ self.intermediate_size = intermediate_size
166
+ self.moe_intermediate_size = moe_intermediate_size
167
+ self.num_hidden_layers = num_hidden_layers
168
+ self.num_nextn_predict_layers = num_nextn_predict_layers
169
+ self.num_attention_heads = num_attention_heads
170
+ self.n_shared_experts = n_shared_experts
171
+ self.n_routed_experts = n_routed_experts
172
+ self.ep_size = ep_size
173
+ self.routed_scaling_factor = routed_scaling_factor
174
+ self.kv_lora_rank = kv_lora_rank
175
+ self.q_lora_rank = q_lora_rank
176
+ self.qk_rope_head_dim = qk_rope_head_dim
177
+ self.v_head_dim = v_head_dim
178
+ self.qk_nope_head_dim = qk_nope_head_dim
179
+ self.topk_method = topk_method
180
+ self.n_group = n_group
181
+ self.topk_group = topk_group
182
+ self.num_experts_per_tok = num_experts_per_tok
183
+ self.moe_layer_freq = moe_layer_freq
184
+ self.first_k_dense_replace = first_k_dense_replace
185
+ self.norm_topk_prob = norm_topk_prob
186
+ self.scoring_func = scoring_func
187
+ self.aux_loss_alpha = aux_loss_alpha
188
+ self.seq_aux = seq_aux
189
+ # for backward compatibility
190
+ if num_key_value_heads is None:
191
+ num_key_value_heads = num_attention_heads
192
+
193
+ self.num_key_value_heads = num_key_value_heads
194
+ self.hidden_act = hidden_act
195
+ self.initializer_range = initializer_range
196
+ self.rms_norm_eps = rms_norm_eps
197
+ self.pretraining_tp = pretraining_tp
198
+ self.use_cache = use_cache
199
+ self.rope_theta = rope_theta
200
+ self.rope_scaling = rope_scaling
201
+ self.attention_bias = attention_bias
202
+ self.attention_dropout = attention_dropout
203
+
204
+ super().__init__(
205
+ pad_token_id=pad_token_id,
206
+ bos_token_id=bos_token_id,
207
+ eos_token_id=eos_token_id,
208
+ tie_word_embeddings=tie_word_embeddings,
209
+ **kwargs,
210
+ )
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 1,
5
+ "transformers_version": "4.53.0"
6
+ }
model-00001-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d7bb74d1f02537f496cb82bdfd2056dd7ed89b10140c59a872a15e31d1792f
3
+ size 4989505008
model-00002-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1f1cca90647254846a50de1215c43ae8381f3ef22e4b2e0741fd13e20a3b57e
3
+ size 4993855904
model-00003-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d520e4dd1cadcf7bf4c29e61327581fc6cf614aff11adf96f09f1fd941b75ae8
3
+ size 4993866592
model-00007-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:065af7fe792a792f847c45cd6aabfdf7b3dc113e8e3508a18c40666fe15bb8b6
3
+ size 4993856176
model-00010-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc54c84d60133cb7a3c8aaa9a0386eed0bb4807614df2648eca43f2627124925
3
+ size 4993861744
model-00011-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e98396d46e049b8774b7fddc3843cb5b06bc8b478235c2729f2f0c5ba8a95ff0
3
+ size 4993855712
model-00012-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75c1a9f889cf3ef9fdcd3ed1faa5c16b28ad97def38c7c0959a7553e3235852a
3
+ size 4993856352
model-00014-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd9fd84e4cf22ecfaa3f3160fb9a012c323cbb668ad3a8918695c23c4de45cdd
3
+ size 4993866472
model-00016-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22d772e564b84999c6ebeac28ac0e7dc5f5ff61a2bad84f6c3a6f56ffc3c7c44
3
+ size 4993856024
model-00031-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28360c7e425c31eea25c36998f4d08772108af978356cca0fbc3bc81ac2076df
3
+ size 4993862192
model-00032-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5ffc41db9d08b624230d1b8c86479ce521c3f10a17a41b9029e08f99f8b304b
3
+ size 4993856608
model-00040-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc7e584539a35601527f15ba76b340a78c2c9af174fd534b1bbf48ab1ba76529
3
+ size 4993862376
model-00042-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:faa3df45d5f7ee90fec7da68050e3b59bf4f31ffdd05fbac6a1af714543d9120
3
+ size 4993857032
model-00043-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc554ea5ec1e5dafaaed4e302841dee4ee26aa6689f69feadb81f6d38a54c158
3
+ size 4993861984
model-00046-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef85409808b9c5a095b6d1119d8f8e87e26eed0aa71e5b019112c8cda907583b
3
+ size 4993866960
model-00048-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20045452dfd6398a358ddc1fb54412fe3d2b4ada9ea05f3ee74d02629e5b6f26
3
+ size 4993856512
model-00049-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15b07911e0fb80c01bdd09e1f93aae78865f52d5cefd4e3fed235557270f3464
3
+ size 4993857032
model-00055-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb53d1bb43669ab85b19b14f43b27e64f0160b9f4f0f1256acdb8c29ad23d85c
3
+ size 4993856560
model-00058-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb9edcb6e48608540eee80076f0f3120052521fd041842d3ab33847aa0636dfb
3
+ size 4993857032
model-00060-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c05568c53c226911bcdbab0f0e5c8bc8d5fb9728a7461759495e614a6ced76bd
3
+ size 4993856832
model-00063-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b459449fee2cb54b90c3ed4d1dd6c7811097d2eb95dbc2b603b27fb2987dbdcf
3
+ size 4964534304
model-00064-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54921ff672a942a3e16c78caa24c6e69d3738a9e6e6e74966a532fde19201118
3
+ size 4993805424
model-00071-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77962f002abbcdc4af6d554403f9396349673c9e21c7b6a58f3daaa28bf08f89
3
+ size 4993866688
model-00072-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05fb152e3823e0421b256f8b1f703366574935810bfdc4de386bb13998459d6d
3
+ size 4993857032
model-00079-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44eb49ee6bd4674b5b5b866124e6b4535792f7f535aed44857206f7930ad2817
3
+ size 4993857032
model-00080-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e308c88f7b61ac6241d602e11a3b74cf43a3b577de886f88a87820c2c2a70a4a
3
+ size 4993861984
model-00084-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a221b09968605bf9796e7889a662c0fc2674b1e4ee98a51cbe7f89fbc12a9c6
3
+ size 4993862224
model-00090-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ce0afb7b5e419175d6a829c4ec69fa44e44b72b73f91d8e7f6c46604bf1f37d
3
+ size 4993856840
model-00095-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ece1ccb5fa55e9910c9bec1ebb41d6a159784d511d837c67f6e1bc30734c663c
3
+ size 4993857032
model-00099-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3654c3c895b8a25e8c2a45e2abac0973674bfae051902c44df52a56303d0b525
3
+ size 4993856696
model-00107-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:171a04e26d70d3281369c5c1364b98647908066257a05a92a1242adb1cb98814
3
+ size 4993862264
model-00111-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c8ff905d747f3ff91e6cd0c235ed12ed26c9d1fb20e9c3505ef019dda1acee7
3
+ size 4993857008
model-00112-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:314e4165a976c71a7842d9522da3acf83bc92f0e37d52f255782eebe38b43116
3
+ size 4993862000
model-00117-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7707ecbf184f8d14eb6ce2417f42527f071fcfada9ec5e0698ae4bab73b9354a
3
+ size 4993862032
model-00126-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb82c6b60cc68b01b0181c7f4a2fa6a0ee0ebf2d73162a85800fac6e5dd0228f
3
+ size 4993861984
model-00128-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14ba895c088d2334a75ef65a51b12e36fda82245e5078f5903273ab8970aeeb5
3
+ size 4993862096
model-00130-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:166b10be78bcb8cb9c0a5b4157880e8c4688672ac13709551556b0eac9aea0d5
3
+ size 4993862304
model-00132-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4e3c717253042a1d2ae43b850c1bb558bf4e7f6860581e33b90e4b894bf4ab4
3
+ size 4993857032
model-00134-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef233e025de65e86d73ddc08d531d27a338724b19339d453ba538ace8e508004
3
+ size 4993867216
model-00135-of-00135.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c1b8d17dc2cb1055088e76568eebd068cd57282297ec01c0d580564bb1f9aab
3
+ size 4185771368
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
recipe.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ QuantizationModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head]
6
+ scheme: FP8_DYNAMIC
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|begin▁of▁sentence|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|end▁of▁sentence|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|▁pad▁|>",
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
The diff for this file is too large to render. See raw diff