DataSnake commited on
Commit
e89e09e
·
verified ·
1 Parent(s): a75b8d6

Upload 11 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if messages[0]["role"] == "system" %}
2
+ {%- set system_message = messages[0]["content"] %}
3
+ {%- set loop_messages = messages[1:] %}
4
+ {%- else %}
5
+ {%- set loop_messages = messages %}
6
+ {%- endif %}
7
+ {%- if not tools is defined %}
8
+ {%- set tools = none %}
9
+ {%- endif %}
10
+ {%- set user_messages = loop_messages | selectattr("role", "equalto", "user") | list %}
11
+
12
+ {#- This block checks for alternating user/assistant messages, skipping tool calling messages #}
13
+ {%- set ns = namespace() %}
14
+ {%- set ns.index = 0 %}
15
+ {%- for message in loop_messages %}
16
+ {%- if not (message.role == "tool" or message.role == "tool_results" or (message.tool_calls is defined and message.tool_calls is not none)) %}
17
+ {%- if (message["role"] == "user") != (ns.index % 2 == 0) %}
18
+ {{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") }}
19
+ {%- endif %}
20
+ {%- set ns.index = ns.index + 1 %}
21
+ {%- endif %}
22
+ {%- endfor %}
23
+
24
+ {{- bos_token }}
25
+ {%- for message in loop_messages %}
26
+ {%- if message["role"] == "user" %}
27
+ {%- if tools is not none and (message == user_messages[-1]) %}
28
+ {{- "[AVAILABLE_TOOLS][" }}
29
+ {%- for tool in tools %}
30
+ {%- set tool = tool.function %}
31
+ {{- '{"type": "function", "function": {' }}
32
+ {%- for key, val in tool.items() if key != "return" %}
33
+ {%- if val is string %}
34
+ {{- '"' + key + '": "' + val + '"' }}
35
+ {%- else %}
36
+ {{- '"' + key + '": ' + val|tojson }}
37
+ {%- endif %}
38
+ {%- if not loop.last %}
39
+ {{- ", " }}
40
+ {%- endif %}
41
+ {%- endfor %}
42
+ {{- "}}" }}
43
+ {%- if not loop.last %}
44
+ {{- ", " }}
45
+ {%- else %}
46
+ {{- "]" }}
47
+ {%- endif %}
48
+ {%- endfor %}
49
+ {{- "[/AVAILABLE_TOOLS]" }}
50
+ {%- endif %}
51
+ {%- if loop.last and system_message is defined %}
52
+ {{- "[INST]" + system_message + "\n\n" + message["content"] + "[/INST]" }}
53
+ {%- else %}
54
+ {{- "[INST]" + message["content"] + "[/INST]" }}
55
+ {%- endif %}
56
+ {%- elif (message.tool_calls is defined and message.tool_calls is not none) %}
57
+ {{- "[TOOL_CALLS][" }}
58
+ {%- for tool_call in message.tool_calls %}
59
+ {%- set out = tool_call.function|tojson %}
60
+ {{- out[:-1] }}
61
+ {%- if not tool_call.id is defined or tool_call.id|length != 9 %}
62
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
63
+ {%- endif %}
64
+ {{- ', "id": "' + tool_call.id + '"}' }}
65
+ {%- if not loop.last %}
66
+ {{- ", " }}
67
+ {%- else %}
68
+ {{- "]" + eos_token }}
69
+ {%- endif %}
70
+ {%- endfor %}
71
+ {%- elif message["role"] == "assistant" %}
72
+ {{- message["content"] + eos_token}}
73
+ {%- elif message["role"] == "tool_results" or message["role"] == "tool" %}
74
+ {%- if message.content is defined and message.content.content is defined %}
75
+ {%- set content = message.content.content %}
76
+ {%- else %}
77
+ {%- set content = message.content %}
78
+ {%- endif %}
79
+ {{- '[TOOL_RESULTS]{"content": ' + content|string + ", " }}
80
+ {%- if not message.tool_call_id is defined or message.tool_call_id|length != 9 %}
81
+ {{- raise_exception("Tool call IDs should be alphanumeric strings with length 9!") }}
82
+ {%- endif %}
83
+ {{- '"call_id": "' + message.tool_call_id + '"}[/TOOL_RESULTS]' }}
84
+ {%- else %}
85
+ {{- raise_exception("Only user and assistant roles are supported, with the exception of an initial optional system message!") }}
86
+ {%- endif %}
87
+ {%- endfor %}
config.json ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MistralForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 1,
7
+ "dtype": "bfloat16",
8
+ "eos_token_id": 2,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 5120,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 14336,
14
+ "max_position_embeddings": 131072,
15
+ "model_type": "mistral",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 40,
18
+ "num_key_value_heads": 8,
19
+ "quantization_config": {
20
+ "config_groups": {
21
+ "group_0": {
22
+ "format": "nvfp4-pack-quantized",
23
+ "input_activations": {
24
+ "actorder": null,
25
+ "block_structure": null,
26
+ "dynamic": "local",
27
+ "group_size": 16,
28
+ "num_bits": 4,
29
+ "observer": "static_minmax",
30
+ "observer_kwargs": {},
31
+ "scale_dtype": "torch.float8_e4m3fn",
32
+ "strategy": "tensor_group",
33
+ "symmetric": true,
34
+ "type": "float",
35
+ "zp_dtype": null
36
+ },
37
+ "output_activations": null,
38
+ "targets": [
39
+ "re:.*gate_proj.*",
40
+ "re:.*up_proj.*",
41
+ "re:.*self_attn.k_proj.*",
42
+ "re:.*self_attn.o_proj.*",
43
+ "re:.*self_attn.q_proj.*",
44
+ "re:.*self_attn.v_proj.*"
45
+ ],
46
+ "weights": {
47
+ "actorder": null,
48
+ "block_structure": null,
49
+ "dynamic": false,
50
+ "group_size": 16,
51
+ "num_bits": 4,
52
+ "observer": "memoryless_minmax",
53
+ "observer_kwargs": {},
54
+ "scale_dtype": "torch.float8_e4m3fn",
55
+ "strategy": "tensor_group",
56
+ "symmetric": true,
57
+ "type": "float",
58
+ "zp_dtype": null
59
+ }
60
+ },
61
+ "group_1": {
62
+ "format": "float-quantized",
63
+ "input_activations": {
64
+ "actorder": null,
65
+ "block_structure": null,
66
+ "dynamic": true,
67
+ "group_size": null,
68
+ "num_bits": 8,
69
+ "observer": null,
70
+ "observer_kwargs": {},
71
+ "scale_dtype": null,
72
+ "strategy": "token",
73
+ "symmetric": true,
74
+ "type": "float",
75
+ "zp_dtype": null
76
+ },
77
+ "output_activations": null,
78
+ "targets": [
79
+ "re:.*down_proj.*"
80
+ ],
81
+ "weights": {
82
+ "actorder": null,
83
+ "block_structure": null,
84
+ "dynamic": false,
85
+ "group_size": null,
86
+ "num_bits": 8,
87
+ "observer": "memoryless_minmax",
88
+ "observer_kwargs": {},
89
+ "scale_dtype": null,
90
+ "strategy": "channel",
91
+ "symmetric": true,
92
+ "type": "float",
93
+ "zp_dtype": null
94
+ }
95
+ }
96
+ },
97
+ "format": "mixed-precision",
98
+ "global_compression_ratio": null,
99
+ "ignore": [
100
+ "lm_head"
101
+ ],
102
+ "kv_cache_scheme": null,
103
+ "quant_method": "compressed-tensors",
104
+ "quantization_status": "compressed",
105
+ "sparsity_config": {},
106
+ "transform_config": {},
107
+ "version": "0.14.0"
108
+ },
109
+ "rms_norm_eps": 1e-05,
110
+ "rope_theta": 1000000.0,
111
+ "sliding_window": null,
112
+ "tie_word_embeddings": false,
113
+ "transformers_version": "4.57.3",
114
+ "use_cache": true,
115
+ "vocab_size": 131072
116
+ }
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.57.3"
6
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:380df276906e241f6fa891b875f175bb6d7be97544e01bc4f24f89f8ce752e2c
3
+ size 4978763056
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff99c465e671de0ce26cefc1439a3b990cb7c75fbaebd7a38d415961f1bab6cf
3
+ size 3783458632
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b985a941f8c64cb523a7c057ee7155dcb4084d8f88e9b01b287b31c6a720b93
3
+ size 1342177408
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
recipe.yaml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ QuantizationModifier:
4
+ config_groups:
5
+ group_0:
6
+ targets: ['re:.*gate_proj.*', 're:.*up_proj.*', 're:.*self_attn.k_proj.*', 're:.*self_attn.o_proj.*',
7
+ 're:.*self_attn.q_proj.*', 're:.*self_attn.v_proj.*']
8
+ weights:
9
+ num_bits: 4
10
+ type: float
11
+ symmetric: true
12
+ group_size: 16
13
+ strategy: tensor_group
14
+ block_structure: null
15
+ dynamic: false
16
+ actorder: null
17
+ scale_dtype: torch.float8_e4m3fn
18
+ zp_dtype: null
19
+ observer: memoryless_minmax
20
+ observer_kwargs: {}
21
+ input_activations:
22
+ num_bits: 4
23
+ type: float
24
+ symmetric: true
25
+ group_size: 16
26
+ strategy: tensor_group
27
+ block_structure: null
28
+ dynamic: local
29
+ actorder: null
30
+ scale_dtype: torch.float8_e4m3fn
31
+ zp_dtype: null
32
+ observer: static_minmax
33
+ observer_kwargs: {}
34
+ output_activations: null
35
+ format: null
36
+ group_1:
37
+ targets: ['re:.*down_proj.*']
38
+ weights:
39
+ num_bits: 8
40
+ type: float
41
+ symmetric: true
42
+ group_size: null
43
+ strategy: channel
44
+ block_structure: null
45
+ dynamic: false
46
+ actorder: null
47
+ scale_dtype: null
48
+ zp_dtype: null
49
+ observer: memoryless_minmax
50
+ observer_kwargs: {}
51
+ input_activations:
52
+ num_bits: 8
53
+ type: float
54
+ symmetric: true
55
+ group_size: null
56
+ strategy: token
57
+ block_structure: null
58
+ dynamic: true
59
+ actorder: null
60
+ scale_dtype: null
61
+ zp_dtype: null
62
+ observer: null
63
+ observer_kwargs: {}
64
+ output_activations: null
65
+ format: null
66
+ targets: [Linear]
67
+ ignore: [lm_head]
68
+ bypass_divisibility_checks: false
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0240ce510f08e6c2041724e9043e33be9d251d1e4a4d94eb68cd47b954b61d2
3
+ size 17078292
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff