0xSero commited on
Commit
450c429
·
verified ·
1 Parent(s): c69703c

Fix config: use wrapper form with text_config for vLLM compatibility

Browse files

Previous flat-form commit (c69703c) changed model_type to qwen3_5_moe but left fields at top level. Qwen3_5MoeConfig.__init__ expects a text_config dict; when absent it defaults num_experts to 256, causing IndexError on the 205-expert REAP checkpoint. This commit uses the proper wrapper structure with text_config carrying num_experts=205.

Files changed (1) hide show
  1. config.json +82 -85
config.json CHANGED
@@ -2,94 +2,91 @@
2
  "architectures": [
3
  "Qwen3_5MoeForCausalLM"
4
  ],
5
- "attention_bias": false,
6
- "attention_dropout": 0.0,
7
- "attn_output_gate": true,
8
  "bos_token_id": 248044,
9
- "dtype": "bfloat16",
10
  "eos_token_id": 248044,
11
- "full_attention_interval": 4,
12
- "head_dim": 256,
13
- "hidden_act": "silu",
14
- "hidden_size": 2048,
15
- "initializer_range": 0.02,
16
- "layer_types": [
17
- "linear_attention",
18
- "linear_attention",
19
- "linear_attention",
20
- "full_attention",
21
- "linear_attention",
22
- "linear_attention",
23
- "linear_attention",
24
- "full_attention",
25
- "linear_attention",
26
- "linear_attention",
27
- "linear_attention",
28
- "full_attention",
29
- "linear_attention",
30
- "linear_attention",
31
- "linear_attention",
32
- "full_attention",
33
- "linear_attention",
34
- "linear_attention",
35
- "linear_attention",
36
- "full_attention",
37
- "linear_attention",
38
- "linear_attention",
39
- "linear_attention",
40
- "full_attention",
41
- "linear_attention",
42
- "linear_attention",
43
- "linear_attention",
44
- "full_attention",
45
- "linear_attention",
46
- "linear_attention",
47
- "linear_attention",
48
- "full_attention",
49
- "linear_attention",
50
- "linear_attention",
51
- "linear_attention",
52
- "full_attention",
53
- "linear_attention",
54
- "linear_attention",
55
- "linear_attention",
56
- "full_attention"
57
- ],
58
- "linear_conv_kernel_dim": 4,
59
- "linear_key_head_dim": 128,
60
- "linear_num_key_heads": 16,
61
- "linear_num_value_heads": 32,
62
- "linear_value_head_dim": 128,
63
- "mamba_ssm_dtype": "float32",
64
- "max_position_embeddings": 262144,
65
  "model_type": "qwen3_5_moe",
66
- "moe_intermediate_size": 512,
67
- "mtp_num_hidden_layers": 1,
68
- "mtp_use_dedicated_embeddings": false,
69
- "num_attention_heads": 16,
70
- "num_experts": 205,
71
- "num_experts_per_tok": 8,
72
- "num_hidden_layers": 40,
73
- "num_key_value_heads": 2,
74
- "output_router_logits": false,
75
- "pad_token_id": null,
76
- "partial_rotary_factor": 0.25,
77
- "rms_norm_eps": 0.000001,
78
- "rope_parameters": {
79
- "mrope_interleaved": true,
80
- "mrope_section": [
81
- 11,
82
- 11,
83
- 10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  "partial_rotary_factor": 0.25,
86
- "rope_theta": 10000000,
87
- "rope_type": "default"
88
- },
89
- "router_aux_loss_coef": 0.001,
90
- "shared_expert_intermediate_size": 512,
91
- "tie_word_embeddings": false,
92
- "transformers_version": "5.5.4",
93
- "use_cache": true,
94
- "vocab_size": 248320
 
 
 
 
 
95
  }
 
2
  "architectures": [
3
  "Qwen3_5MoeForCausalLM"
4
  ],
 
 
 
5
  "bos_token_id": 248044,
 
6
  "eos_token_id": 248044,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  "model_type": "qwen3_5_moe",
8
+ "tie_word_embeddings": false,
9
+ "text_config": {
10
+ "attention_bias": false,
11
+ "attention_dropout": 0.0,
12
+ "attn_output_gate": true,
13
+ "full_attention_interval": 4,
14
+ "head_dim": 256,
15
+ "hidden_act": "silu",
16
+ "hidden_size": 2048,
17
+ "initializer_range": 0.02,
18
+ "layer_types": [
19
+ "linear_attention",
20
+ "linear_attention",
21
+ "linear_attention",
22
+ "full_attention",
23
+ "linear_attention",
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "full_attention",
27
+ "linear_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "full_attention",
31
+ "linear_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "full_attention",
35
+ "linear_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "full_attention",
39
+ "linear_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "full_attention",
43
+ "linear_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "full_attention",
47
+ "linear_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "full_attention",
51
+ "linear_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "full_attention",
55
+ "linear_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "full_attention"
59
  ],
60
+ "linear_conv_kernel_dim": 4,
61
+ "linear_key_head_dim": 128,
62
+ "linear_num_key_heads": 16,
63
+ "linear_num_value_heads": 32,
64
+ "linear_value_head_dim": 128,
65
+ "mamba_ssm_dtype": "float32",
66
+ "max_position_embeddings": 262144,
67
+ "moe_intermediate_size": 512,
68
+ "mtp_num_hidden_layers": 1,
69
+ "mtp_use_dedicated_embeddings": false,
70
+ "num_attention_heads": 16,
71
+ "num_experts": 205,
72
+ "num_experts_per_tok": 8,
73
+ "num_hidden_layers": 40,
74
+ "num_key_value_heads": 2,
75
+ "output_router_logits": false,
76
+ "pad_token_id": null,
77
  "partial_rotary_factor": 0.25,
78
+ "rms_norm_eps": 1e-06,
79
+ "rope_parameters": {
80
+ "mrope_interleaved": true,
81
+ "mrope_section": [11, 11, 10],
82
+ "partial_rotary_factor": 0.25,
83
+ "rope_theta": 10000000,
84
+ "rope_type": "default"
85
+ },
86
+ "router_aux_loss_coef": 0.001,
87
+ "shared_expert_intermediate_size": 512,
88
+ "use_cache": true,
89
+ "vocab_size": 248320,
90
+ "model_type": "qwen3_5_moe_text"
91
+ }
92
  }