kylesayrs commited on
Commit
0a1dd46
·
verified ·
1 Parent(s): 8ce26ed

Upload folder using huggingface_hub

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,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set effort_map = {"none": 0.0, "minimal": 0.1, "low": 0.2, "medium": 0.7, "high": 0.9, "max": 0.99} -%}
2
+ {%- set role_token = {"user": "<|message_user|>", "assistant": "<|message_model|>", "system": "<|message_system|>", "tool": "<|message_tool|>"} -%}
3
+
4
+ {%- macro emit_thinking_effort() -%}
5
+ {%- set eff = reasoning_effort if reasoning_effort is defined and reasoning_effort is not none else 0.9 -%}
6
+ {%- if eff is string -%}
7
+ {%- set key = eff | trim -%}
8
+ {%- if key not in effort_map -%}
9
+ {{- raise_exception("Unknown reasoning_effort: " ~ eff) -}}
10
+ {%- endif -%}
11
+ {%- set num = effort_map[key] -%}
12
+ {%- else -%}
13
+ {%- set num = eff | float -%}
14
+ {%- endif -%}
15
+ {%- if num < 0.0 or num > 0.99 -%}
16
+ {{- raise_exception("reasoning_effort must be in [0.0, 0.99]") -}}
17
+ {%- endif -%}
18
+ {{- "<|message_system|><|content_text|>Thinking effort level: " -}}
19
+ {%- if num == 0.0 -%}0{%- else -%}{{ num }}{%- endif -%}
20
+ {{- "<|end_message|>" -}}
21
+ {%- endmacro -%}
22
+
23
+ {%- if tools -%}
24
+ {%- set tool_state = namespace(specs=[]) -%}
25
+ {%- for tool in tools -%}
26
+ {%- set fn = tool.function if tool.function is defined else tool -%}
27
+ {%- set spec = {
28
+ "description": (fn.description if fn.description is defined and fn.description else ""),
29
+ "name": fn.name,
30
+ "parameters": (fn.parameters if fn.parameters is defined and fn.parameters else {}),
31
+ "type": (tool.type if tool.type is defined and tool.type else "function"),
32
+ } -%}
33
+ {%- set tool_state.specs = tool_state.specs + [spec] -%}
34
+ {%- endfor -%}
35
+ {{- "<|message_system|>tool_declare<|content_xml|>" -}}
36
+ {{- tool_state.specs | tojson(sort_keys=true, separators=(",", ":")) -}}
37
+ {{- "<|end_message|>" -}}
38
+ {%- endif -%}
39
+
40
+ {%- set state = namespace(effort_emitted=false) -%}
41
+ {%- for message in messages -%}
42
+ {%- if message.role not in role_token -%}
43
+ {{- raise_exception("Unknown message role: " ~ message.role) -}}
44
+ {%- endif -%}
45
+ {%- if not state.effort_emitted and message.role != "system" -%}
46
+ {{- emit_thinking_effort() -}}
47
+ {%- set state.effort_emitted = true -%}
48
+ {%- endif -%}
49
+
50
+ {%- set rtok = role_token[message.role] -%}
51
+
52
+ {%- if message.role == "tool" -%}
53
+ {%- set tool_name_state = namespace(name="") -%}
54
+ {%- if message.name is defined and message.name -%}
55
+ {%- set tool_name_state.name = message.name -%}
56
+ {%- elif message.tool_call_id is defined and message.tool_call_id -%}
57
+ {%- for prev in messages -%}
58
+ {%- if prev.role == "assistant" and prev.tool_calls -%}
59
+ {%- for tc in prev.tool_calls -%}
60
+ {%- if tc.id is defined and tc.id == message.tool_call_id and tc.function.name is defined -%}
61
+ {%- set tool_name_state.name = tc.function.name -%}
62
+ {%- endif -%}
63
+ {%- endfor -%}
64
+ {%- endif -%}
65
+ {%- endfor -%}
66
+ {%- endif -%}
67
+ {{- rtok -}}
68
+ {%- if tool_name_state.name -%}{{- tool_name_state.name -}}{%- endif -%}
69
+ {{- "<|content_text|>" -}}
70
+ {%- if message.content is string -%}{{- message.content -}}{%- endif -%}
71
+ {{- "<|end_message|>" -}}
72
+
73
+ {%- else -%}
74
+ {%- if message.role == "assistant" and message.reasoning_content is defined and message.reasoning_content -%}
75
+ {{- "<|message_model|><|content_thinking|>" ~ message.reasoning_content ~ "<|end_message|>" -}}
76
+ {%- endif -%}
77
+
78
+ {%- if message.content is string -%}
79
+ {{- rtok ~ "<|content_text|>" ~ message.content ~ "<|end_message|>" -}}
80
+ {%- elif message.content -%}
81
+ {%- for part in message.content -%}
82
+ {%- if part is string -%}
83
+ {{- rtok ~ "<|content_text|>" ~ part ~ "<|end_message|>" -}}
84
+ {%- elif part.type is not defined or part.type in ("text", "input_text") -%}
85
+ {%- set text_part = (part.text if part.text is defined and part.text is string else "") -%}
86
+ {{- rtok ~ "<|content_text|>" ~ text_part ~ "<|end_message|>" -}}
87
+ {%- elif part.type in ("image", "input_image", "image_url") -%}
88
+ {{- rtok ~ "<|content_image|><|unused_200054|><|end_message|>" -}}
89
+ {%- elif part.type in ("audio", "input_audio", "audio_url") -%}
90
+ {{- rtok ~ "<|content_audio_input|><|unused_200053|><|audio_end|><|end_message|>" -}}
91
+ {%- else -%}
92
+ {{- raise_exception("Unsupported content part type: " ~ part.type) -}}
93
+ {%- endif -%}
94
+ {%- endfor -%}
95
+ {%- endif -%}
96
+
97
+ {%- if message.role == "assistant" and message.tool_calls -%}
98
+ {%- for tc in message.tool_calls -%}
99
+ {%- set fn = tc.function -%}
100
+ {%- if fn.name is not defined or fn.name is not string -%}
101
+ {{- raise_exception("tool call function name must be a string") -}}
102
+ {%- endif -%}
103
+ {%- set args = fn.arguments if fn.arguments is defined and fn.arguments else {} -%}
104
+ {%- if args is string -%}
105
+ {{- raise_exception("tool call arguments must be a parsed object, not a JSON string; canonicalize upstream") -}}
106
+ {%- endif -%}
107
+ {%- if args is not mapping -%}
108
+ {{- raise_exception("tool call arguments must be an object") -}}
109
+ {%- endif -%}
110
+ {{- "<|message_model|>" ~ fn.name ~ "<|content_invoke_tool_json|>" -}}
111
+ {{- '{"name":' ~ (fn.name | tojson(sort_keys=true, separators=(",", ":"))) ~ ',"args":' -}}
112
+ {{- (args | tojson(sort_keys=true, separators=(",", ":"))) -}}
113
+ {{- "}<|end_message|>" -}}
114
+ {%- endfor -%}
115
+ {%- endif -%}
116
+
117
+ {%- if message.role == "assistant" -%}
118
+ {{- "<|content_model_end_sampling|>" -}}
119
+ {%- endif -%}
120
+ {%- endif -%}
121
+ {%- endfor -%}
122
+
123
+ {%- if not state.effort_emitted -%}
124
+ {{- emit_thinking_effort() -}}
125
+ {%- endif -%}
126
+
127
+ {%- if add_generation_prompt -%}
128
+ {{- "<|message_model|>" -}}
129
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "InklingForConditionalGeneration"
4
+ ],
5
+ "audio_bos_token_id": 200020,
6
+ "audio_config": {
7
+ "audio_mode": "dmel",
8
+ "bias": false,
9
+ "decoder_dmodel": 1024,
10
+ "dmel_max_value": 2.0,
11
+ "dmel_min_value": -7.0,
12
+ "dtype": "float32",
13
+ "initializer_range": 0.02,
14
+ "mel_vocab_size": 16,
15
+ "model_type": "inkling_audio",
16
+ "n_mel_bins": 80,
17
+ "rms_norm_eps": 1e-06,
18
+ "text_hidden_size": 1024,
19
+ "use_audio_norm": true
20
+ },
21
+ "audio_token_id": 200053,
22
+ "dtype": "float32",
23
+ "eos_token_id": 200006,
24
+ "image_bos_token_id": 200005,
25
+ "image_token_id": 200054,
26
+ "model_type": "inkling_mm_model",
27
+ "mtp_config": {
28
+ "chain_hidden_post_norm": false,
29
+ "local_layer_ids": [
30
+ 0
31
+ ],
32
+ "num_nextn_predict_layers": 1
33
+ },
34
+ "text_config": {
35
+ "attention_dropout": 0.0,
36
+ "bos_token_id": 1,
37
+ "chain_hidden_post_norm": false,
38
+ "conv_kernel_size": 4,
39
+ "d_rel": 16,
40
+ "dtype": "float32",
41
+ "eos_token_id": 2,
42
+ "final_logit_softcapping": null,
43
+ "gate_activation": "sigmoid",
44
+ "head_dim": 128,
45
+ "hidden_act": "silu",
46
+ "hidden_size": 1024,
47
+ "initializer_range": 0.02,
48
+ "intermediate_size": 4096,
49
+ "layer_types": [
50
+ "hybrid_sliding",
51
+ "hybrid_sliding",
52
+ "hybrid_sliding",
53
+ "hybrid_sliding",
54
+ "hybrid_sliding",
55
+ "hybrid",
56
+ "hybrid_sliding",
57
+ "hybrid_sliding",
58
+ "hybrid_sliding",
59
+ "hybrid_sliding",
60
+ "hybrid_sliding",
61
+ "hybrid"
62
+ ],
63
+ "local_layer_ids": [
64
+ 0,
65
+ 1,
66
+ 2,
67
+ 3,
68
+ 4,
69
+ 6,
70
+ 7,
71
+ 8,
72
+ 9,
73
+ 10
74
+ ],
75
+ "log_scaling_alpha": 0.1,
76
+ "log_scaling_n_floor": 128000,
77
+ "logits_mup_width_multiplier": 24.0,
78
+ "max_position_embeddings": 1048576,
79
+ "mlp_layer_types": [
80
+ "dense",
81
+ "dense",
82
+ "sparse",
83
+ "sparse",
84
+ "sparse",
85
+ "sparse",
86
+ "sparse",
87
+ "sparse",
88
+ "sparse",
89
+ "sparse",
90
+ "sparse",
91
+ "sparse"
92
+ ],
93
+ "model_type": "inkling_text",
94
+ "moe_intermediate_size": 512,
95
+ "mtp_hidden_states_first": true,
96
+ "mtp_local_layer_ids": [
97
+ 0
98
+ ],
99
+ "n_routed_experts": 8,
100
+ "n_shared_experts": 2,
101
+ "norm_after_topk": true,
102
+ "num_attention_heads": 8,
103
+ "num_experts_per_tok": 4,
104
+ "num_hidden_layers": 12,
105
+ "num_key_value_heads": 2,
106
+ "num_mtp_layers": 1,
107
+ "number_of_conv_states": 4,
108
+ "o_bias": false,
109
+ "pad_token_id": null,
110
+ "q_bias": false,
111
+ "rel_extent": 1024,
112
+ "rms_norm_eps": 1e-06,
113
+ "rms_norm_eps_moe_gate": 1e-06,
114
+ "route_scale": 8.0,
115
+ "shared_expert_sink": true,
116
+ "sliding_window_size": 512,
117
+ "swa_head_dim": 128,
118
+ "swa_num_attention_heads": 8,
119
+ "swa_num_key_value_heads": 4,
120
+ "unpadded_vocab_size": 200058,
121
+ "use_embed_norm": true,
122
+ "use_gate_bias": true,
123
+ "use_global_scale": true,
124
+ "use_sconv": true,
125
+ "vocab_size": 201024
126
+ },
127
+ "transformers_version": "5.15.0.dev0",
128
+ "vision_config": {
129
+ "decoder_dmodel": 1024,
130
+ "dtype": "float32",
131
+ "hidden_size": 256,
132
+ "initializer_range": 0.02,
133
+ "model_type": "inkling_vision",
134
+ "n_channels": 3,
135
+ "n_layers": 1,
136
+ "num_attention_heads": 4,
137
+ "num_channels": 3,
138
+ "patch_size": 40,
139
+ "rms_norm_eps": 1e-06,
140
+ "temporal_patch_size": 2,
141
+ "text_hidden_size": 1024,
142
+ "use_vision_norm": true,
143
+ "vision_encoder_type": "hmlp"
144
+ }
145
+ }
generation_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 200006,
4
+ "transformers_version": "5.15.0.dev0"
5
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76205f9e4f2db44e06b8d8bba1983b74fef807e99f1d096f8eb3f411cbd64528
3
+ size 2575851840
processor_config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_bos_token": "<|content_audio_input|>",
3
+ "audio_token": "<|unused_200053|>",
4
+ "dmel_max_value": 2.0,
5
+ "dmel_min_value": -7.0,
6
+ "feature_extractor": {
7
+ "audio_token_duration_s": 0.05,
8
+ "feature_extractor_type": "InklingFeatureExtractor",
9
+ "feature_size": 80,
10
+ "hop_length": 800,
11
+ "n_fft": 1600,
12
+ "padding_side": "right",
13
+ "padding_value": 0.0,
14
+ "return_attention_mask": true,
15
+ "sampling_rate": 16000,
16
+ "window_size": 1600,
17
+ "window_size_multiplier": 2.0
18
+ },
19
+ "image_bos_token": "<|content_image|>",
20
+ "image_processor": {
21
+ "do_convert_rgb": true,
22
+ "do_normalize": true,
23
+ "do_rescale": true,
24
+ "do_resize": true,
25
+ "image_mean": [
26
+ 0.48145466,
27
+ 0.4578275,
28
+ 0.40821073
29
+ ],
30
+ "image_processor_type": "InklingImageProcessor",
31
+ "image_std": [
32
+ 0.26862954,
33
+ 0.26130258,
34
+ 0.27577711
35
+ ],
36
+ "resample": 3,
37
+ "rescale_factor": 0.00392156862745098,
38
+ "rescale_image_max_upscaled_long_edge": 2048,
39
+ "size": {
40
+ "height": 40,
41
+ "width": 40
42
+ }
43
+ },
44
+ "image_token": "<|unused_200054|>",
45
+ "num_dmel_bins": 16,
46
+ "processor_class": "InklingProcessor"
47
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c470271fb7649eef922e660e757b5f076e2a94adc20df7fad7df85c46bc48eac
3
+ size 27875796
tokenizer_config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio": "<|audio|>",
3
+ "audio_end": "<|audio_end|>",
4
+ "backend": "tokenizers",
5
+ "begin_of_text": "<|begin_of_text|>",
6
+ "clean_up_tokenization_spaces": false,
7
+ "content_audio_input": "<|content_audio_input|>",
8
+ "content_image": "<|content_image|>",
9
+ "content_invoke_tool_json": "<|content_invoke_tool_json|>",
10
+ "content_invoke_tool_text": "<|content_invoke_tool_text|>",
11
+ "content_model_end_sampling": "<|content_model_end_sampling|>",
12
+ "content_text": "<|content_text|>",
13
+ "content_thinking": "<|content_thinking|>",
14
+ "content_tool_error": "<|content_tool_error|>",
15
+ "content_xml": "<|content_xml|>",
16
+ "end_message": "<|end_message|>",
17
+ "endoftext": "<|endoftext|>",
18
+ "fix_mistral_regex": false,
19
+ "is_local": false,
20
+ "local_files_only": false,
21
+ "message_model": "<|message_model|>",
22
+ "message_system": "<|message_system|>",
23
+ "message_tool": "<|message_tool|>",
24
+ "message_user": "<|message_user|>",
25
+ "model_max_length": 1000000000000000019884624838656,
26
+ "model_specific_special_tokens": {
27
+ "audio": "<|audio|>",
28
+ "audio_end": "<|audio_end|>",
29
+ "begin_of_text": "<|begin_of_text|>",
30
+ "content_audio_input": "<|content_audio_input|>",
31
+ "content_image": "<|content_image|>",
32
+ "content_invoke_tool_json": "<|content_invoke_tool_json|>",
33
+ "content_invoke_tool_text": "<|content_invoke_tool_text|>",
34
+ "content_model_end_sampling": "<|content_model_end_sampling|>",
35
+ "content_text": "<|content_text|>",
36
+ "content_thinking": "<|content_thinking|>",
37
+ "content_tool_error": "<|content_tool_error|>",
38
+ "content_xml": "<|content_xml|>",
39
+ "end_message": "<|end_message|>",
40
+ "endoftext": "<|endoftext|>",
41
+ "message_model": "<|message_model|>",
42
+ "message_system": "<|message_system|>",
43
+ "message_tool": "<|message_tool|>",
44
+ "message_user": "<|message_user|>"
45
+ },
46
+ "processor_class": "InklingProcessor",
47
+ "tokenizer_class": "TokenizersBackend"
48
+ }