guygrigsby
/

Kimi-K3 / config.json
guygrigsby's picture
Duplicate from moonshotai/Kimi-K3
d342d3e
Raw
History Blame Contribute Delete
7.01 kB
{
"architectures": [
"KimiK3ForConditionalGeneration"
],
"auto_map": {
"AutoConfig": "configuration_kimi_k3.KimiK3Config",
"AutoModel": "modeling_kimi_k3.KimiK3ForConditionalGeneration",
"AutoModelForCausalLM": "modeling_kimi_k3.KimiK3ForConditionalGeneration"
},
"bos_token_id": 163584,
"dtype": "bfloat16",
"eos_token_id": 163586,
"ignore_index": -100,
"image_placeholder": "<|kimi_image_placeholder|>",
"media_placeholder_token_id": 163605,
"model_type": "kimi_k3",
"pad_token_id": 163839,
"text_config": {
"_name_or_path": "",
"activation_situ_beta": 4.0,
"activation_situ_linear_beta": 25.0,
"add_cross_attention": false,
"architectures": [
"KimiLinearForCausalLM"
],
"attn_res_block_size": 12,
"auto_map": {
"AutoConfig": "configuration_kimi_k3.KimiLinearConfig",
"AutoModel": "modeling_kimi_linear.KimiLinearModel",
"AutoModelForCausalLM": "modeling_kimi_linear.KimiLinearForCausalLM"
},
"bad_words_ids": null,
"begin_suppress_tokens": null,
"bos_token_id": 163584,
"chunk_size_feed_forward": 0,
"cross_attention_hidden_size": null,
"decoder_start_token_id": null,
"diversity_penalty": 0.0,
"do_sample": false,
"dtype": "bfloat16",
"early_stopping": false,
"encoder_no_repeat_ngram_size": 0,
"eos_token_id": 163586,
"exponential_decay_length_penalty": null,
"finetuning_task": null,
"first_k_dense_replace": 1,
"forced_bos_token_id": null,
"forced_eos_token_id": null,
"hidden_act": "situ",
"hidden_size": 7168,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"initializer_range": 0.02,
"intermediate_size": 33792,
"is_decoder": false,
"is_encoder_decoder": false,
"kv_lora_rank": 512,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"latent_moe_use_norm": true,
"length_penalty": 1.0,
"linear_attn_config": {
"full_attn_layers": [
4,
8,
12,
16,
20,
24,
28,
32,
36,
40,
44,
48,
52,
56,
60,
64,
68,
72,
76,
80,
84,
88,
92,
93
],
"gate_lower_bound": -5.0,
"head_dim": 128,
"kda_layers": [
1,
2,
3,
5,
6,
7,
9,
10,
11,
13,
14,
15,
17,
18,
19,
21,
22,
23,
25,
26,
27,
29,
30,
31,
33,
34,
35,
37,
38,
39,
41,
42,
43,
45,
46,
47,
49,
50,
51,
53,
54,
55,
57,
58,
59,
61,
62,
63,
65,
66,
67,
69,
70,
71,
73,
74,
75,
77,
78,
79,
81,
82,
83,
85,
86,
87,
89,
90,
91
],
"num_heads": 96,
"short_conv_kernel_size": 4,
"use_full_rank_gate": true
},
"max_length": 20,
"max_position_embeddings": 1048576,
"min_length": 0,
"mla_use_nope": true,
"mla_use_output_gate": true,
"model_type": "kimi_linear",
"moe_intermediate_size": 3072,
"moe_layer_freq": 1,
"moe_renormalize": true,
"moe_router_activation_func": "sigmoid",
"no_repeat_ngram_size": 0,
"num_attention_heads": 96,
"num_beam_groups": 1,
"num_beams": 1,
"num_expert_group": 1,
"num_experts": 896,
"num_experts_per_token": 16,
"num_hidden_layers": 93,
"num_key_value_heads": 96,
"num_nextn_predict_layers": 0,
"num_return_sequences": 1,
"num_shared_experts": 2,
"output_attentions": false,
"output_hidden_states": false,
"output_scores": false,
"pad_token_id": 163839,
"prefix": null,
"problem_type": null,
"pruned_heads": {},
"q_lora_rank": 1536,
"qk_nope_head_dim": 128,
"qk_rope_head_dim": 64,
"quantization_config": {
"config_groups": {
"group_0": {
"format": "mxfp4-pack-quantized",
"input_activations": null,
"output_activations": null,
"targets": [
"Linear"
],
"weights": {
"actorder": null,
"block_structure": null,
"dynamic": false,
"group_size": 32,
"num_bits": 4,
"observer": "minmax",
"observer_kwargs": {},
"scale_dtype": "torch.uint8",
"strategy": "group",
"symmetric": true,
"type": "float",
"zp_dtype": null
}
}
},
"format": "mxfp4-pack-quantized",
"global_compression_ratio": null,
"ignore": [
"re:.*self_attn.*",
"re:.*shared_experts.*",
"re:.*mlp\\.(gate|up|gate_up|down)_proj.*",
"re:.*lm_head.*",
"re:.*vision_tower.*",
"re:.*mm_projector.*"
],
"kv_cache_scheme": null,
"quant_method": "compressed-tensors",
"quantization_status": "compressed"
},
"remove_invalid_values": false,
"repetition_penalty": 1.0,
"return_dict": true,
"return_dict_in_generate": false,
"rms_norm_eps": 1e-05,
"routed_expert_hidden_size": 3584,
"routed_scaling_factor": 1.0,
"sep_token_id": null,
"suppress_tokens": null,
"task_specific_params": null,
"temperature": 1.0,
"tf_legacy_loss": false,
"tie_encoder_decoder": false,
"tie_word_embeddings": false,
"tokenizer_class": null,
"top_k": 50,
"top_p": 1.0,
"topk_group": 1,
"topk_method": "noaux_tc",
"torchscript": false,
"transformers_version": "4.56.2",
"typical_p": 1.0,
"use_bfloat16": false,
"use_cache": true,
"use_grouped_topk": true,
"v_head_dim": 128,
"vocab_size": 163840
},
"tie_word_embeddings": false,
"vision_config": {
"_attn_implementation": "flash_attention_2",
"activation_func": "gelu_pytorch_tanh",
"attn_bias": false,
"init_pos_emb_height": 64,
"init_pos_emb_time": 4,
"init_pos_emb_width": 64,
"linear_bias": false,
"merge_kernel_size": [
2,
2
],
"merge_type": "sd2_tpool",
"mlp_type": "mlp2",
"mm_hidden_size": 1024,
"mm_projector_type": "patchmergerv2",
"norm_type": "rmsnorm",
"patch_embed_proj_bias": false,
"patch_size": 14,
"pos_emb_interpolation_mode": "bilinear",
"pos_emb_type": "divided_fixed",
"projector_hidden_act": "gelu",
"projector_ln_eps": 1e-05,
"qkv_hidden_size": 1536,
"text_hidden_size": 7168,
"vt_hidden_size": 1024,
"vt_intermediate_size": 4096,
"vt_num_attention_heads": 12,
"vt_num_hidden_layers": 27
}
}