clejordan commited on
Commit
0b58cff
·
verified ·
1 Parent(s): 69566eb

Initial commit: MNLP M3 quantized model

Browse files
config.json CHANGED
@@ -17,14 +17,56 @@
17
  "num_attention_heads": 16,
18
  "num_hidden_layers": 28,
19
  "num_key_value_heads": 8,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  "rms_norm_eps": 1e-06,
21
  "rope_scaling": null,
22
  "rope_theta": 1000000,
23
  "sliding_window": null,
24
  "tie_word_embeddings": true,
25
  "torch_dtype": "float32",
26
- "transformers_version": "4.52.3",
27
  "use_cache": true,
28
  "use_sliding_window": false,
29
  "vocab_size": 151936
30
- }
 
17
  "num_attention_heads": 16,
18
  "num_hidden_layers": 28,
19
  "num_key_value_heads": 8,
20
+ "quantization_config": {
21
+ "config_groups": {
22
+ "group_0": {
23
+ "input_activations": {
24
+ "actorder": null,
25
+ "block_structure": null,
26
+ "dynamic": true,
27
+ "group_size": null,
28
+ "num_bits": 8,
29
+ "observer": null,
30
+ "observer_kwargs": {},
31
+ "strategy": "token",
32
+ "symmetric": true,
33
+ "type": "int"
34
+ },
35
+ "output_activations": null,
36
+ "targets": [
37
+ "Linear"
38
+ ],
39
+ "weights": {
40
+ "actorder": null,
41
+ "block_structure": null,
42
+ "dynamic": false,
43
+ "group_size": null,
44
+ "num_bits": 8,
45
+ "observer": "minmax",
46
+ "observer_kwargs": {},
47
+ "strategy": "channel",
48
+ "symmetric": true,
49
+ "type": "int"
50
+ }
51
+ }
52
+ },
53
+ "format": "int-quantized",
54
+ "global_compression_ratio": null,
55
+ "ignore": [
56
+ "lm_head"
57
+ ],
58
+ "kv_cache_scheme": null,
59
+ "quant_method": "compressed-tensors",
60
+ "quantization_status": "compressed"
61
+ },
62
  "rms_norm_eps": 1e-06,
63
  "rope_scaling": null,
64
  "rope_theta": 1000000,
65
  "sliding_window": null,
66
  "tie_word_embeddings": true,
67
  "torch_dtype": "float32",
68
+ "transformers_version": "4.51.3",
69
  "use_cache": true,
70
  "use_sliding_window": false,
71
  "vocab_size": 151936
72
+ }
generation_config.json CHANGED
@@ -2,5 +2,5 @@
2
  "bos_token_id": 151643,
3
  "eos_token_id": 151643,
4
  "max_new_tokens": 2048,
5
- "transformers_version": "4.52.3"
6
  }
 
2
  "bos_token_id": 151643,
3
  "eos_token_id": 151643,
4
  "max_new_tokens": 2048,
5
+ "transformers_version": "4.51.3"
6
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d1881eca1d5c57b04779f2c2755b1992d4064877f0f76ffaa79fe805b11808b9
3
- size 2384234968
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e4393914b846408a1d45dabc57c4c9918ada26bde04baacd796b7182587436a
3
+ size 1686758496
recipe.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ SmoothQuantModifier: {smoothing_strength: 0.8}
4
+ QuantizationModifier:
5
+ ignore: [lm_head]
6
+ targets: [Linear]
7
+ scheme: W8A8
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:574de68a0f63f2004784a421c7d42c2b2786c05cb38542d2ed3525757a1f7fde
3
- size 11422932
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
3
+ size 11422654
tokenizer_config.json CHANGED
@@ -227,6 +227,7 @@
227
  "<|video_pad|>"
228
  ],
229
  "bos_token": null,
 
230
  "clean_up_tokenization_spaces": false,
231
  "eos_token": "<|endoftext|>",
232
  "errors": "replace",
 
227
  "<|video_pad|>"
228
  ],
229
  "bos_token": null,
230
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\\n') %}\n {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
231
  "clean_up_tokenization_spaces": false,
232
  "eos_token": "<|endoftext|>",
233
  "errors": "replace",