{ "architectures": [ "Qwen4ExpForConditionalGeneration" ], "image_token_id": 248056, "language_model_only": false, "model_type": "qwen4_exp", "text_config": { "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 248044, "dtype": "bfloat16", "eos_token_id": 248044, "full_attention_interval": 4, "hc_count": 4, "hc_lowrank": 320, "head_dim": 256, "heads_per_ngram": 8, "hidden_act": "silu", "hidden_size": 2560, "indexer_budget": 2048, "indexer_compress_ratio": 4, "indexer_head_dim": 128, "indexer_kv_heads": 1, "indexer_n_heads": 4, "initializer_range": 0.02, "layer_types": [ "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention" ], "linear_conv_kernel_dim": 4, "linear_key_head_dim": 128, "linear_num_key_heads": 16, "linear_num_value_heads": 48, "linear_value_head_dim": 128, "make_ngram_vocab_size_divisible_by": 128, "mamba_ssm_dtype": "bfloat16", "max_position_embeddings": 262144, "model_type": "qwen4_exp_text", "moe_intermediate_size": 640, "mtp": { "hybrid": true, "layer_types": [ "full_attention" ], "mtp_use_hidden_state_from_layer": null, "num_hidden_layers": 1, "rope_theta": 10000000 }, "mtp_num_hidden_layers": 1, "mtp_use_dedicated_embeddings": false, "ngram_size": 3, "ngram_vocab_size_base": 20000000, "num_attention_heads": 24, "num_experts": 512, "num_experts_per_tok": 10, "num_hidden_layers": 48, "num_key_value_heads": 2, "output_gate_type": "sigmoid", "output_router_logits": false, "pad_token_id": null, "partial_rotary_factor": 0.25, "ple_conv_kernel_size": 4, "ple_embed_dim": 2560, "ple_layer_ids": [ 2 ], "rms_norm_eps": 1e-06, "rope_parameters": { "mrope_interleaved": true, "mrope_section": [ 11, 11, 10 ], "partial_rotary_factor": 0.25, "rope_theta": 10000000, "rope_type": "default" }, "router_aux_loss_coef": 0.001, "shared_expert_intermediate_size": 640, "split_ngram_parts": 128, "tie_word_embeddings": false, "use_cache": true, "vocab_size": 248320 }, "tie_word_embeddings": false, "transformers_version": "5.8.0.dev0", "video_token_id": 248057, "vision_config": { "deepstack_visual_indexes": [], "depth": 27, "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 4304, "model_type": "qwen4_exp", "num_heads": 16, "num_position_embeddings": 2304, "out_hidden_size": 2560, "patch_size": 16, "spatial_merge_size": 2, "temporal_patch_size": 2 }, "vision_end_token_id": 248054, "vision_start_token_id": 248053, "quantization_config": { "quant_method": "compressed-tensors", "format": "mxfp4-pack-quantized", "quantization_status": "compressed", "config_groups": { "group_0": { "targets": [ "Linear" ], "weights": { "num_bits": 4, "type": "float", "symmetric": true, "strategy": "group", "group_size": 32, "dynamic": false, "block_structure": null, "observer": "minmax", "observer_kwargs": {}, "actorder": null }, "input_activations": null, "output_activations": null }, "group_1": { "targets": [ "re:.*\\.self_attn\\.(q_proj|k_proj|v_proj|o_proj)$", "re:.*\\.linear_attn\\.(in_proj_qkv|in_proj_z|out_proj)$" ], "weights": { "num_bits": 8, "type": "float", "symmetric": true, "strategy": "block", "block_structure": [ 128, 128 ], "dynamic": false, "observer": "minmax", "observer_kwargs": {}, "actorder": null }, "input_activations": { "num_bits": 8, "type": "float", "symmetric": true, "strategy": "group", "group_size": 128, "dynamic": true, "observer": null, "observer_kwargs": {}, "actorder": null }, "output_activations": null } }, "ignore": [ "re:(?:^|\\.)visual\\.", "re:.*\\.indexer\\..*", "re:.*\\.linear_attn\\.conv1d.*", "re:.*\\.linear_attn\\.in_proj_a.*", "re:.*\\.linear_attn\\.in_proj_b.*", "re:.*\\.linear_attn\\.in_proj_ba.*", "re:.*\\.ple\\..*", "re:.*hyper_connection.*", "re:.*\\.mlp\\.gate\\.weight$", "re:.*\\.shared_expert_gate\\.weight$", "re:^lm_head", "re:^mtp\\.fc_embedding\\.", "re:^mtp\\.fc_hidden\\.", "lm_head", "re:.*\\.mlp\\.gate$", "re:.*block_inject.*", "re:.*embed_tokens.*", "re:.*fc_embedding$", "re:.*fc_hidden$", "re:.*indexer.*", "re:.*input_mix.*", "re:.*linear_attn\\.conv1d.*", "re:.*linear_attn\\.in_proj_a.*", "re:.*linear_attn\\.in_proj_b.*", "re:.*linear_attn\\.in_proj_ba.*", "re:.*norm.*", "re:.*shared_expert_gate$", "re:.*visual.*" ], "kv_cache_scheme": null }, "mtp_quantization_config": { "config_groups": { "group_0": { "format": "rfa-pack-quantized", "input_activations": null, "output_activations": null, "targets": [ "Linear" ], "weights": { "num_bits": 4, "type": "float", "group_size": 16, "grid": "iq4_nl", "codebook": [ -127, -104, -83, -65, -49, -35, -22, -10, 1, 13, 25, 38, 53, 69, 89, 113 ], "scale_dtype": "torch.int8", "scale_exp_dtype": "torch.int8", "scale_encoding": "block_float_i8m_i8e", "symmetric": false, "rotation": "hadamard16" } }, "group_1": { "format": "float-quantized", "input_activations": null, "output_activations": null, "targets": [ "re:.*\\.self_attn\\.(q_proj|k_proj|v_proj|o_proj)$", "re:.*\\.linear_attn\\.(in_proj_qkv|in_proj_z|out_proj)$" ], "weights": { "num_bits": 8, "type": "float", "strategy": "block", "block_structure": [ 128, 128 ], "symmetric": true, "dynamic": false, "scale_dtype": "torch.float32", "scale_name": "weight_scale_inv", "fp8_max": 448.0, "dequant": "W = weight.float() * weight_scale_inv (per block)" } } }, "format": "rfa-pack-quantized", "quant_method": "rfa", "quantization_status": "compressed", "version": "rfa-1.0", "modules": { "mtp.fc_embedding": { "scheme": "dense" }, "mtp.fc_hidden": { "scheme": "dense" }, "mtp.hyper_connection_mixer.input_mix_weight_down": { "scheme": "dense" }, "mtp.hyper_connection_mixer.input_mix_weight_up": { "scheme": "dense" }, "mtp.layers.0.attn_hyper_connection.block_inject_weight": { "scheme": "dense" }, "mtp.layers.0.attn_hyper_connection.input_mix_weight_down": { "scheme": "dense" }, "mtp.layers.0.attn_hyper_connection.input_mix_weight_up": { "scheme": "dense" }, "mtp.layers.0.mlp.experts": { "scheme": "rfa" }, "mtp.layers.0.mlp.gate": { "scheme": "dense" }, "mtp.layers.0.mlp.shared_expert.down_proj": { "scheme": "rfa" }, "mtp.layers.0.mlp.shared_expert.gate_proj": { "scheme": "rfa" }, "mtp.layers.0.mlp.shared_expert.up_proj": { "scheme": "rfa" }, "mtp.layers.0.mlp.shared_expert_gate": { "scheme": "dense" }, "mtp.layers.0.mlp_hyper_connection.block_inject_weight": { "scheme": "dense" }, "mtp.layers.0.mlp_hyper_connection.input_mix_weight_down": { "scheme": "dense" }, "mtp.layers.0.mlp_hyper_connection.input_mix_weight_up": { "scheme": "dense" }, "mtp.layers.0.self_attn.indexer.index_qk_proj": { "scheme": "dense" }, "mtp.layers.0.self_attn.k_proj": { "scheme": "fp8" }, "mtp.layers.0.self_attn.q_proj": { "scheme": "fp8" }, "mtp.layers.0.self_attn.v_proj": { "scheme": "fp8" }, "mtp.layers.0.self_attn.o_proj": { "scheme": "fp8" } } } }