en2zmax revised this gist . Go to revision
1 file changed, 151 insertions
config.json(file created)
| @@ -0,0 +1,151 @@ | |||
| 1 | + | { | |
| 2 | + | "architectures": ["Qwen3_5MoeForConditionalGeneration"], | |
| 3 | + | "image_token_id": 248056, | |
| 4 | + | "model_type": "qwen3_5_moe", | |
| 5 | + | "text_config": { | |
| 6 | + | "attention_bias": false, | |
| 7 | + | "attention_dropout": 0.0, | |
| 8 | + | "attn_output_gate": true, | |
| 9 | + | "bos_token_id": 248044, | |
| 10 | + | "dtype": "bfloat16", | |
| 11 | + | "eos_token_id": 248044, | |
| 12 | + | "full_attention_interval": 4, | |
| 13 | + | "head_dim": 256, | |
| 14 | + | "hidden_act": "silu", | |
| 15 | + | "hidden_size": 2048, | |
| 16 | + | "initializer_range": 0.02, | |
| 17 | + | "layer_types": [ | |
| 18 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 19 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 20 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 21 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 22 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 23 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 24 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 25 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 26 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention", | |
| 27 | + | "linear_attention", "linear_attention", "linear_attention", "full_attention" | |
| 28 | + | ], | |
| 29 | + | "linear_conv_kernel_dim": 4, | |
| 30 | + | "linear_key_head_dim": 128, | |
| 31 | + | "linear_num_key_heads": 16, | |
| 32 | + | "linear_num_value_heads": 32, | |
| 33 | + | "linear_value_head_dim": 128, | |
| 34 | + | "mamba_ssm_dtype": "float32", | |
| 35 | + | "max_position_embeddings": 262144, | |
| 36 | + | "model_type": "qwen3_5_moe_text", | |
| 37 | + | "moe_intermediate_size": 512, | |
| 38 | + | "mtp_num_hidden_layers": 1, | |
| 39 | + | "mtp_use_dedicated_embeddings": false, | |
| 40 | + | "num_attention_heads": 16, | |
| 41 | + | "num_experts": 256, | |
| 42 | + | "num_experts_per_tok": 8, | |
| 43 | + | "num_hidden_layers": 40, | |
| 44 | + | "num_key_value_heads": 2, | |
| 45 | + | "output_router_logits": false, | |
| 46 | + | "pad_token_id": null, | |
| 47 | + | "partial_rotary_factor": 0.25, | |
| 48 | + | "rms_norm_eps": 1e-06, | |
| 49 | + | "rope_parameters": { | |
| 50 | + | "mrope_interleaved": true, | |
| 51 | + | "mrope_section": [11, 11, 10], | |
| 52 | + | "partial_rotary_factor": 0.25, | |
| 53 | + | "rope_theta": 10000000, | |
| 54 | + | "rope_type": "default" | |
| 55 | + | }, | |
| 56 | + | "router_aux_loss_coef": 0.001, | |
| 57 | + | "shared_expert_intermediate_size": 512, | |
| 58 | + | "tie_word_embeddings": false, | |
| 59 | + | "use_cache": true, | |
| 60 | + | "vocab_size": 248320 | |
| 61 | + | }, | |
| 62 | + | "tie_word_embeddings": false, | |
| 63 | + | "transformers_version": "4.57.1", | |
| 64 | + | "video_token_id": 248057, | |
| 65 | + | "vision_config": { | |
| 66 | + | "deepstack_visual_indexes": [], | |
| 67 | + | "depth": 27, | |
| 68 | + | "hidden_act": "gelu_pytorch_tanh", | |
| 69 | + | "hidden_size": 1152, | |
| 70 | + | "in_channels": 3, | |
| 71 | + | "initializer_range": 0.02, | |
| 72 | + | "intermediate_size": 4304, | |
| 73 | + | "model_type": "qwen3_5_moe", | |
| 74 | + | "num_heads": 16, | |
| 75 | + | "num_position_embeddings": 2304, | |
| 76 | + | "out_hidden_size": 2048, | |
| 77 | + | "patch_size": 16, | |
| 78 | + | "spatial_merge_size": 2, | |
| 79 | + | "temporal_patch_size": 2 | |
| 80 | + | }, | |
| 81 | + | "vision_end_token_id": 248054, | |
| 82 | + | "vision_start_token_id": 248053, | |
| 83 | + | "quantization_config": { | |
| 84 | + | "activation_scheme": "dynamic", | |
| 85 | + | "fmt": "e4m3", | |
| 86 | + | "quant_method": "fp8", | |
| 87 | + | "modules_to_not_convert": [ | |
| 88 | + | "model.visual.blocks.0.attn.proj", "model.visual.blocks.0.attn.qkv", | |
| 89 | + | "model.visual.blocks.0.mlp.linear_fc1", "model.visual.blocks.0.mlp.linear_fc2", | |
| 90 | + | "visual.blocks.0.attn.proj", "visual.blocks.0.attn.qkv_proj", | |
| 91 | + | "visual.blocks.0.mlp.linear_fc1", "visual.blocks.0.mlp.linear_fc2", | |
| 92 | + | "model.visual.blocks.1.attn.proj", "model.visual.blocks.1.attn.qkv", | |
| 93 | + | "model.visual.blocks.1.mlp.linear_fc1", "model.visual.blocks.1.mlp.linear_fc2", | |
| 94 | + | "visual.blocks.1.attn.proj", "visual.blocks.1.attn.qkv_proj", | |
| 95 | + | "visual.blocks.1.mlp.linear_fc1", "visual.blocks.1.mlp.linear_fc2", | |
| 96 | + | ... (блоки 2..26 — по тому же шаблону: model.visual.blocks.N.attn.proj/qkv, .mlp.linear_fc1/fc2, visual.blocks.N.attn.proj/qkv_proj, .mlp.linear_fc1/fc2), | |
| 97 | + | "model.visual.deepstack_merger_list.0.linear_fc1", | |
| 98 | + | "model.visual.deepstack_merger_list.0.linear_fc2", | |
| 99 | + | "model.visual.deepstack_merger_list.0.norm", | |
| 100 | + | "visual.deepstack_merger_list.0.linear_fc1", | |
| 101 | + | "visual.deepstack_merger_list.0.linear_fc2", | |
| 102 | + | "visual.deepstack_merger_list.0.norm", | |
| 103 | + | "model.visual.deepstack_merger_list.1.linear_fc1", | |
| 104 | + | "model.visual.deepstack_merger_list.1.linear_fc2", | |
| 105 | + | "model.visual.deepstack_merger_list.1.norm", | |
| 106 | + | "visual.deepstack_merger_list.1.linear_fc1", | |
| 107 | + | "visual.deepstack_merger_list.1.linear_fc2", | |
| 108 | + | "visual.deepstack_merger_list.1.norm", | |
| 109 | + | "model.visual.deepstack_merger_list.2.linear_fc1", | |
| 110 | + | "model.visual.deepstack_merger_list.2.linear_fc2", | |
| 111 | + | "model.visual.deepstack_merger_list.2.norm", | |
| 112 | + | "visual.deepstack_merger_list.2.linear_fc1", | |
| 113 | + | "visual.deepstack_merger_list.2.linear_fc2", | |
| 114 | + | "visual.deepstack_merger_list.2.norm", | |
| 115 | + | "model.visual.merger.linear_fc1", "model.visual.merger.linear_fc2", "model.visual.merger.norm", | |
| 116 | + | "model.visual.patch_embed.proj", "model.visual.pos_embed", | |
| 117 | + | "visual.merger.linear_fc1", "visual.merger.linear_fc2", "visual.merger.norm", | |
| 118 | + | "visual.patch_embed.proj", "visual.pos_embed", | |
| 119 | + | "visual", "model.visual", "lm_head", "model.embed_tokens", | |
| 120 | + | "model.language_model.layers.0.input_layernorm", | |
| 121 | + | "model.language_model.layers.0.mlp.shared_expert_gate", | |
| 122 | + | "model.language_model.layers.0.post_attention_layernorm", | |
| 123 | + | "model.language_model.layers.0.mlp.gate", | |
| 124 | + | "model.language_model.layers.0.linear_attn.A_log", | |
| 125 | + | "model.language_model.layers.0.linear_attn.conv1d", | |
| 126 | + | "model.language_model.layers.0.linear_attn.dt_bias", | |
| 127 | + | "model.language_model.layers.0.linear_attn.in_proj_ba", | |
| 128 | + | "model.language_model.layers.0.linear_attn.in_proj_b", | |
| 129 | + | "model.language_model.layers.0.linear_attn.in_proj_a", | |
| 130 | + | "model.language_model.layers.0.linear_attn.norm", | |
| 131 | + | "model.language_model.layers.1.input_layernorm", | |
| 132 | + | "model.language_model.layers.1.mlp.shared_expert_gate", | |
| 133 | + | "model.language_model.layers.1.post_attention_layernorm", | |
| 134 | + | "model.language_model.layers.1.mlp.gate", | |
| 135 | + | "model.language_model.layers.1.linear_attn.A_log", | |
| 136 | + | "model.language_model.layers.1.linear_attn.conv1d", | |
| 137 | + | "model.language_model.layers.1.linear_attn.dt_bias", | |
| 138 | + | "model.language_model.layers.1.linear_attn.in_proj_ba", | |
| 139 | + | "model.language_model.layers.1.linear_attn.in_proj_b", | |
| 140 | + | "model.language_model.layers.1.linear_attn.in_proj_a", | |
| 141 | + | "model.language_model.layers.1.linear_attn.norm", | |
| 142 | + | ... (слои 2..39 — по тому же шаблону; на слоях-«full_attention» добавляются "self_attn.k_norm" и "self_attn.q_norm"), | |
| 143 | + | "model.language_model.layers.39.self_attn.q_norm", | |
| 144 | + | "mtp.layers.0.input_layernorm", "mtp.layers.0.mlp.gate", | |
| 145 | + | "mtp.layers.0.mlp.shared_expert_gate", "mtp.layers.0.post_attention_layernorm", | |
| 146 | + | "mtp.layers.0.self_attn.k_norm", "mtp.layers.0.self_attn.q_norm", | |
| 147 | + | "mtp.fc", "mtp.norm", "mtp.pre_fc_norm_embedding", "mtp.pre_fc_norm_hidden" | |
| 148 | + | ], | |
| 149 | + | "weight_block_size": [128, 128] | |
| 150 | + | } | |
| 151 | + | } | |
Newer
Older