Upload folder using huggingface_hub
Browse files- chat_template.jinja +31 -0
- config.json +92 -0
- generation_config.json +10 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +41 -0
- tiktoken.model +3 -0
- tokenizer_config.json +133 -0
chat_template.jinja
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{%- for message in messages -%}
|
2 |
+
{%- if loop.first and messages[0]['role'] != 'system' -%}
|
3 |
+
{{'<|im_system|>system<|im_middle|>You are a helpful assistant<|im_end|>'}}
|
4 |
+
{%- endif -%}
|
5 |
+
{%- if message['role'] == 'system' -%}
|
6 |
+
{{'<|im_system|>'}}
|
7 |
+
{%- endif -%}
|
8 |
+
{%- if message['role'] == 'user' -%}
|
9 |
+
{{'<|im_user|>'}}
|
10 |
+
{%- endif -%}
|
11 |
+
{%- if message['role'] == 'assistant' -%}
|
12 |
+
{{'<|im_assistant|>'}}
|
13 |
+
{%- endif -%}
|
14 |
+
{{- message['role'] -}}
|
15 |
+
{{'<|im_middle|>'}}
|
16 |
+
{%- if message['content'] is string -%}
|
17 |
+
{{- message['content'] + '<|im_end|>' -}}
|
18 |
+
{%- else -%}
|
19 |
+
{%- for content in message['content'] -%}
|
20 |
+
{%- if content['type'] == 'image' or 'image' in content or 'image_url' in content -%}
|
21 |
+
{{'<|media_start|>image<|media_content|><|media_pad|><|media_end|>'}}
|
22 |
+
{%- else -%}
|
23 |
+
{{content['text']}}
|
24 |
+
{%- endif -%}
|
25 |
+
{%- endfor -%}
|
26 |
+
{{'<|im_end|>'}}
|
27 |
+
{%- endif -%}
|
28 |
+
{%- endfor -%}
|
29 |
+
{%- if add_generation_prompt -%}
|
30 |
+
{{'<|im_assistant|>assistant<|im_middle|>'}}
|
31 |
+
{%- endif -%}
|
config.json
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"KimiVLForConditionalGeneration"
|
4 |
+
],
|
5 |
+
"auto_map": {
|
6 |
+
"AutoConfig": "moonshotai/Kimi-VL-A3B-Thinking-2506--configuration_kimi_vl.KimiVLConfig",
|
7 |
+
"AutoModel": "moonshotai/Kimi-VL-A3B-Thinking-2506--modeling_kimi_vl.KimiVLForConditionalGeneration",
|
8 |
+
"AutoModelForCausalLM": "moonshotai/Kimi-VL-A3B-Thinking-2506--modeling_kimi_vl.KimiVLForConditionalGeneration"
|
9 |
+
},
|
10 |
+
"ignore_index": -100,
|
11 |
+
"media_placeholder_token_id": 163605,
|
12 |
+
"model_type": "kimi_vl",
|
13 |
+
"pad_token_id": 0,
|
14 |
+
"quantization_config": {
|
15 |
+
"_load_in_4bit": true,
|
16 |
+
"_load_in_8bit": false,
|
17 |
+
"bnb_4bit_compute_dtype": "float16",
|
18 |
+
"bnb_4bit_quant_storage": "uint8",
|
19 |
+
"bnb_4bit_quant_type": "nf4",
|
20 |
+
"bnb_4bit_use_double_quant": true,
|
21 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
22 |
+
"llm_int8_has_fp16_weight": false,
|
23 |
+
"llm_int8_skip_modules": null,
|
24 |
+
"llm_int8_threshold": 6.0,
|
25 |
+
"load_in_4bit": true,
|
26 |
+
"load_in_8bit": false,
|
27 |
+
"quant_method": "bitsandbytes"
|
28 |
+
},
|
29 |
+
"text_config": {
|
30 |
+
"attention_bias": false,
|
31 |
+
"attention_dropout": 0.0,
|
32 |
+
"aux_loss_alpha": 0.001,
|
33 |
+
"bos_token_id": 163584,
|
34 |
+
"eos_token_id": 163585,
|
35 |
+
"ep_size": 1,
|
36 |
+
"first_k_dense_replace": 1,
|
37 |
+
"hidden_act": "silu",
|
38 |
+
"hidden_size": 2048,
|
39 |
+
"initializer_range": 0.02,
|
40 |
+
"intermediate_size": 11264,
|
41 |
+
"kv_lora_rank": 512,
|
42 |
+
"max_position_embeddings": 131072,
|
43 |
+
"model_type": "deepseek_v3",
|
44 |
+
"moe_intermediate_size": 1408,
|
45 |
+
"moe_layer_freq": 1,
|
46 |
+
"n_group": 1,
|
47 |
+
"n_routed_experts": 64,
|
48 |
+
"n_shared_experts": 2,
|
49 |
+
"norm_topk_prob": true,
|
50 |
+
"num_attention_heads": 16,
|
51 |
+
"num_experts_per_tok": 6,
|
52 |
+
"num_hidden_layers": 27,
|
53 |
+
"num_key_value_heads": 16,
|
54 |
+
"num_nextn_predict_layers": 1,
|
55 |
+
"pad_token_id": 163839,
|
56 |
+
"pretraining_tp": 1,
|
57 |
+
"q_lora_rank": null,
|
58 |
+
"qk_nope_head_dim": 128,
|
59 |
+
"qk_rope_head_dim": 64,
|
60 |
+
"rms_norm_eps": 1e-05,
|
61 |
+
"rope_scaling": null,
|
62 |
+
"rope_theta": 800000.0,
|
63 |
+
"routed_scaling_factor": 2.446,
|
64 |
+
"scoring_func": "sigmoid",
|
65 |
+
"seq_aux": true,
|
66 |
+
"topk_group": 1,
|
67 |
+
"topk_method": "noaux_tc",
|
68 |
+
"torch_dtype": "bfloat16",
|
69 |
+
"use_cache": true,
|
70 |
+
"v_head_dim": 128,
|
71 |
+
"vocab_size": 163840
|
72 |
+
},
|
73 |
+
"tie_word_embeddings": false,
|
74 |
+
"torch_dtype": "float16",
|
75 |
+
"transformers_version": "4.52.4",
|
76 |
+
"vision_config": {
|
77 |
+
"hidden_size": 1152,
|
78 |
+
"init_pos_emb_height": 64,
|
79 |
+
"init_pos_emb_width": 64,
|
80 |
+
"intermediate_size": 4304,
|
81 |
+
"merge_kernel_size": [
|
82 |
+
2,
|
83 |
+
2
|
84 |
+
],
|
85 |
+
"model_type": "moonvit",
|
86 |
+
"num_attention_heads": 16,
|
87 |
+
"num_hidden_layers": 27,
|
88 |
+
"patch_size": 14,
|
89 |
+
"torch_dtype": "bfloat16"
|
90 |
+
},
|
91 |
+
"vocab_size": 163840
|
92 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 163584,
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": [
|
5 |
+
163585
|
6 |
+
],
|
7 |
+
"pad_token_id": 163838,
|
8 |
+
"temperature": 0.6,
|
9 |
+
"transformers_version": "4.52.4"
|
10 |
+
}
|
model-00001-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d91b6675095f1e591b0c7c53d02f925c152353403d44266a8671bcf512e4198c
|
3 |
+
size 5001262096
|
model-00002-of-00002.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba007c5c6f266f34e6f637bdc0a1c4ea366a8739a4cf82175f63e03c03f4086d
|
3 |
+
size 4484025285
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_end|>",
|
4 |
+
"<|im_user|>",
|
5 |
+
"<|im_assistant|>",
|
6 |
+
"<|im_system|>",
|
7 |
+
"<|im_middle|>",
|
8 |
+
"<|media_start|>",
|
9 |
+
"<|media_content|>",
|
10 |
+
"<|media_end|>",
|
11 |
+
"<|media_pad|>"
|
12 |
+
],
|
13 |
+
"bos_token": {
|
14 |
+
"content": "[BOS]",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
},
|
20 |
+
"eos_token": {
|
21 |
+
"content": "[EOS]",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false
|
26 |
+
},
|
27 |
+
"pad_token": {
|
28 |
+
"content": "[PAD]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false
|
33 |
+
},
|
34 |
+
"unk_token": {
|
35 |
+
"content": "[UNK]",
|
36 |
+
"lstrip": false,
|
37 |
+
"normalized": false,
|
38 |
+
"rstrip": false,
|
39 |
+
"single_word": false
|
40 |
+
}
|
41 |
+
}
|
tiktoken.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6c497a7469b33ced9c38afb1ad6e47f03f5e5dc05f15930799210ec050c5103
|
3 |
+
size 2795286
|
tokenizer_config.json
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"163584": {
|
4 |
+
"content": "[BOS]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"163585": {
|
12 |
+
"content": "[EOS]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"163586": {
|
20 |
+
"content": "<|im_end|>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"163587": {
|
28 |
+
"content": "<|im_user|>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"163588": {
|
36 |
+
"content": "<|im_assistant|>",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"163594": {
|
44 |
+
"content": "<|im_system|>",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"163601": {
|
52 |
+
"content": "<|im_middle|>",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": false,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": false,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"163602": {
|
60 |
+
"content": "<|media_start|>",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": false,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": false,
|
65 |
+
"special": true
|
66 |
+
},
|
67 |
+
"163603": {
|
68 |
+
"content": "<|media_content|>",
|
69 |
+
"lstrip": false,
|
70 |
+
"normalized": false,
|
71 |
+
"rstrip": false,
|
72 |
+
"single_word": false,
|
73 |
+
"special": true
|
74 |
+
},
|
75 |
+
"163604": {
|
76 |
+
"content": "<|media_end|>",
|
77 |
+
"lstrip": false,
|
78 |
+
"normalized": false,
|
79 |
+
"rstrip": false,
|
80 |
+
"single_word": false,
|
81 |
+
"special": true
|
82 |
+
},
|
83 |
+
"163605": {
|
84 |
+
"content": "<|media_pad|>",
|
85 |
+
"lstrip": false,
|
86 |
+
"normalized": false,
|
87 |
+
"rstrip": false,
|
88 |
+
"single_word": false,
|
89 |
+
"special": true
|
90 |
+
},
|
91 |
+
"163838": {
|
92 |
+
"content": "[PAD]",
|
93 |
+
"lstrip": false,
|
94 |
+
"normalized": false,
|
95 |
+
"rstrip": false,
|
96 |
+
"single_word": false,
|
97 |
+
"special": true
|
98 |
+
},
|
99 |
+
"163839": {
|
100 |
+
"content": "[UNK]",
|
101 |
+
"lstrip": false,
|
102 |
+
"normalized": false,
|
103 |
+
"rstrip": false,
|
104 |
+
"single_word": false,
|
105 |
+
"special": true
|
106 |
+
}
|
107 |
+
},
|
108 |
+
"additional_special_tokens": [
|
109 |
+
"<|im_end|>",
|
110 |
+
"<|im_user|>",
|
111 |
+
"<|im_assistant|>",
|
112 |
+
"<|im_system|>",
|
113 |
+
"<|im_middle|>",
|
114 |
+
"<|media_start|>",
|
115 |
+
"<|media_content|>",
|
116 |
+
"<|media_end|>",
|
117 |
+
"<|media_pad|>"
|
118 |
+
],
|
119 |
+
"auto_map": {
|
120 |
+
"AutoTokenizer": [
|
121 |
+
"moonshotai/Kimi-VL-A3B-Thinking-2506--tokenization_moonshot.TikTokenTokenizer",
|
122 |
+
null
|
123 |
+
]
|
124 |
+
},
|
125 |
+
"bos_token": "[BOS]",
|
126 |
+
"clean_up_tokenization_spaces": false,
|
127 |
+
"eos_token": "[EOS]",
|
128 |
+
"extra_special_tokens": {},
|
129 |
+
"model_max_length": 1048576,
|
130 |
+
"pad_token": "[PAD]",
|
131 |
+
"tokenizer_class": "TikTokenTokenizer",
|
132 |
+
"unk_token": "[UNK]"
|
133 |
+
}
|