Repository navigation
Expand file tree
/
Copy pathmodel_configs.json
More file actions
364 lines (364 loc) · 12.9 KB
/
Copy pathmodel_configs.json
File metadata and controls
364 lines (364 loc) · 12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
{
"dense_models": {
"Llama-2-7B": {
"source": "https://huggingface.co/meta-llama/Llama-2-7b/blob/main/config.json",
"seqlen": 4096,
"hidden_size": 4096,
"intermediate_size": 11008,
"num_attention_heads": 32,
"num_key_value_heads": 32,
"head_dim": 128
},
"Llama-2-70B": {
"source": "https://huggingface.co/meta-llama/Llama-2-70b/blob/main/config.json",
"seqlen": 4096,
"hidden_size": 8192,
"intermediate_size": 28672,
"num_attention_heads": 64,
"num_key_value_heads": 8,
"head_dim": 128
},
"Llama-3.1-8B": {
"source": "https://huggingface.co/meta-llama/Llama-3.1-8B/blob/main/config.json",
"seqlen": 8192,
"hidden_size": 4096,
"intermediate_size": 14336,
"num_attention_heads": 32,
"num_key_value_heads": 8,
"head_dim": 128
},
"Llama-3.1-405B": {
"source": "https://huggingface.co/meta-llama/Llama-3.1-405B/blob/main/config.json",
"seqlen": 8192,
"hidden_size": 16384,
"intermediate_size": 53248,
"num_attention_heads": 128,
"num_key_value_heads": 8,
"head_dim": 128
},
"Qwen2.5-7B": {
"source": "https://modelscope.cn/models/Qwen/Qwen2.5-7B-Instruct/file/view/master/config.json",
"seqlen": 8192,
"hidden_size": 3584,
"intermediate_size": 18944,
"num_attention_heads": 28,
"num_key_value_heads": 4,
"head_dim": 128
},
"Qwen2.5-72B": {
"source": "https://modelscope.cn/models/Qwen/Qwen2.5-72B-Instruct",
"seqlen": 8192,
"hidden_size": 8192,
"intermediate_size": 29568,
"num_attention_heads": 64,
"num_key_value_heads": 8,
"head_dim": 128
},
"Mistral-7B": {
"source": "https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1/blob/main/config.json",
"seqlen": 4096,
"hidden_size": 4096,
"intermediate_size": 14336,
"num_attention_heads": 32,
"num_key_value_heads": 8,
"head_dim": 128
}
},
"moe_models": {
"DeepSeek-V3": {
"source": "https://modelscope.cn/models/deepseek-ai/DeepSeek-V3/file/view/master/config.json",
"attention_type": "MLA",
"n_routed_experts": 256,
"moe_intermediate_size": 2048,
"hidden_size": 7168,
"num_attention_heads": 128,
"num_key_value_heads": 128,
"head_dim_qk": 192,
"head_dim_v": 128,
"seqlen": 4096,
"num_experts": 256,
"num_topk": 8
},
"DeepSeek-V2": {
"source": "https://modelscope.cn/models/deepseek-ai/DeepSeek-V2/file/view/master/config.json",
"attention_type": "MLA",
"n_routed_experts": 160,
"moe_intermediate_size": 1536,
"hidden_size": 5120,
"num_attention_heads": 128,
"num_key_value_heads": 128,
"head_dim_qk": 192,
"head_dim_v": 128,
"seqlen": 4096,
"num_experts": 160,
"num_topk": 6
},
"DeepSeek-V2-Lite": {
"source": "https://modelscope.cn/models/deepseek-ai/DeepSeek-V2-Lite/file/view/master/config.json",
"attention_type": "MLA",
"n_routed_experts": 64,
"moe_intermediate_size": 1408,
"hidden_size": 2048,
"num_attention_heads": 16,
"num_key_value_heads": 16,
"head_dim_qk": 192,
"head_dim_v": 128,
"seqlen": 4096,
"num_experts": 64,
"num_topk": 6
},
"DeepSeek-V4-Flash": {
"source": "https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash/blob/main/config.json",
"attention_type": "HybridSparse",
"n_routed_experts": 256,
"n_shared_experts": 1,
"moe_intermediate_size": 2048,
"hidden_size": 4096,
"num_attention_heads": 64,
"num_key_value_heads": 1,
"head_dim": 512,
"head_dim_qk": 576,
"head_dim_v": 512,
"qk_rope_head_dim": 64,
"q_lora_rank": 1024,
"o_lora_rank": 1024,
"o_groups": 8,
"num_hidden_layers": 43,
"num_hash_layers": 3,
"sliding_window": 128,
"index_n_heads": 64,
"index_head_dim": 128,
"index_topk": 512,
"max_position_embeddings": 1048576,
"seqlen": 4096,
"num_experts": 256,
"num_topk": 6
},
"DeepSeek-V4-Pro": {
"source": "https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/config.json",
"attention_type": "HybridSparse",
"n_routed_experts": 384,
"n_shared_experts": 1,
"moe_intermediate_size": 3072,
"hidden_size": 7168,
"num_attention_heads": 128,
"num_key_value_heads": 1,
"head_dim": 512,
"head_dim_qk": 576,
"head_dim_v": 512,
"qk_rope_head_dim": 64,
"q_lora_rank": 1536,
"o_lora_rank": 1024,
"o_groups": 16,
"num_hidden_layers": 61,
"num_hash_layers": 3,
"sliding_window": 128,
"index_n_heads": 64,
"index_head_dim": 128,
"index_topk": 1024,
"max_position_embeddings": 1048576,
"seqlen": 4096,
"num_experts": 384,
"num_topk": 6
},
"Grok-2": {
"source": "https://huggingface.co/xai-org/grok-2/blob/main/config.json",
"attention_type": "GQA",
"n_routed_experts": 8,
"moe_intermediate_size": 16384,
"hidden_size": 8192,
"num_attention_heads": 64,
"num_key_value_heads": 8,
"head_dim": 128,
"seqlen": 8192,
"num_experts": 8,
"num_topk": 2
},
"Qwen3-30B-A3B": {
"source": "https://modelscope.cn/models/Qwen/Qwen3-30B-A3B-Instruct-2507/file/view/master/config.json",
"attention_type": "GQA",
"n_routed_experts": 128,
"moe_intermediate_size": 768,
"hidden_size": 2048,
"num_attention_heads": 32,
"num_key_value_heads": 4,
"head_dim": 128,
"seqlen": 8192,
"num_experts": 128,
"num_topk": 8
},
"Qwen3-235B-A22B": {
"source": "https://modelscope.cn/models/Qwen/Qwen3-235B-A22B-Instruct-2507",
"attention_type": "GQA",
"n_routed_experts": 128,
"moe_intermediate_size": 1536,
"hidden_size": 4096,
"num_attention_heads": 64,
"num_key_value_heads": 4,
"head_dim": 128,
"seqlen": 8192,
"num_experts": 128,
"num_topk": 8
},
"Mixtral-8x7B": {
"source": "https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1/blob/main/config.json",
"attention_type": "GQA",
"n_routed_experts": 8,
"moe_intermediate_size": 14336,
"hidden_size": 4096,
"num_attention_heads": 32,
"num_key_value_heads": 8,
"head_dim": 128,
"seqlen": 4096,
"num_experts": 8,
"num_topk": 2
},
"Mixtral-8x22B": {
"source": "https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1/blob/main/config.json",
"attention_type": "GQA",
"n_routed_experts": 8,
"moe_intermediate_size": 16384,
"hidden_size": 6144,
"num_attention_heads": 48,
"num_key_value_heads": 8,
"head_dim": 128,
"seqlen": 8192,
"num_experts": 8,
"num_topk": 2
},
"Kimi-K2": {
"source": "https://huggingface.co/moonshotai/Kimi-K2-Instruct/blob/main/config.json",
"attention_type": "MLA",
"n_routed_experts": 384,
"moe_intermediate_size": 2048,
"hidden_size": 7168,
"num_attention_heads": 64,
"num_key_value_heads": 64,
"head_dim_qk": 192,
"head_dim_v": 128,
"seqlen": 4096,
"num_experts": 384,
"num_topk": 8
},
"MoE-1T": {
"source": "https://github.com/AMD-AGI/Primus/blob/main/primus/configs/models/megatron/moe_1T.yaml",
"attention_type": "GQA",
"n_routed_experts": 224,
"moe_intermediate_size": 1920,
"hidden_size": 8192,
"num_attention_heads": 64,
"num_key_value_heads": 8,
"head_dim": 128,
"seqlen": 4096,
"num_experts": 224,
"num_topk": 8
}
},
"attention_models": {
"Kimi-K2": {
"source": "https://huggingface.co/moonshotai/Kimi-K2-Instruct/raw/main/config.json",
"serve": {
"cookbook": "https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/Moonshotai/Kimi-K2.mdx",
"tp": 8,
"attention_backend": "auto",
"kv_cache_dtype": "fp8_e4m3",
"env": {"SGLANG_ROCM_FUSED_DECODE_MLA": "0"},
"notes": "AMD: MUST set SGLANG_ROCM_FUSED_DECODE_MLA=0 before launch. Cookbook recommends --kv-cache-dtype fp8_e4m3 (-50% KV mem). EP/DP: --ep / --dp 4 --enable-dp-attention. ROCm verified on MI300X. Attention auto-selects triton (kv-heads=64 not in {16,128})."
},
"attention_type": "MLA",
"architectures": "DeepseekV3ForCausalLM",
"hidden_size": 7168,
"num_attention_heads": 64,
"num_key_value_heads": 64,
"qk_nope_head_dim": 128,
"qk_rope_head_dim": 64,
"head_dim_qk": 192,
"v_head_dim": 128,
"kv_lora_rank": 512,
"q_lora_rank": 1536,
"rope_scaling": {"type": "yarn", "factor": 32.0, "mscale": 1.0, "mscale_all_dim": 1.0, "original_max_position_embeddings": 4096},
"num_hidden_layers": 61,
"max_position_embeddings": 131072
},
"DeepSeek-R1": {
"source": "https://huggingface.co/deepseek-ai/DeepSeek-R1/raw/main/config.json",
"serve": {
"cookbook": "https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/DeepSeek/DeepSeek-R1.mdx",
"tp": 8,
"attention_backend": "auto",
"kv_cache_dtype": "auto",
"quantization": "FP4 (nvidia/DeepSeek-R1-0528-FP4-v2) or amd/DeepSeek-R1-MXFP4 recommended on MI355X",
"env": {},
"notes": "Official FP8 ckpt is already FP8: do NOT pass --quantization fp8. High-throughput: --enable-dp-attention --tp 8 --dp 8. Attention auto-selects aiter on HIP (MLA absorbed decode)."
},
"attention_type": "MLA",
"architectures": "DeepseekV3ForCausalLM",
"hidden_size": 7168,
"num_attention_heads": 128,
"num_key_value_heads": 128,
"qk_nope_head_dim": 128,
"qk_rope_head_dim": 64,
"head_dim_qk": 192,
"v_head_dim": 128,
"kv_lora_rank": 512,
"q_lora_rank": 1536,
"rope_scaling": {"type": "yarn", "factor": 40, "mscale": 1.0, "mscale_all_dim": 1.0, "original_max_position_embeddings": 4096},
"num_hidden_layers": 61,
"max_position_embeddings": 163840
},
"MiniMax-M2": {
"source": "https://huggingface.co/MiniMaxAI/MiniMax-M2/raw/main/config.json",
"serve": {
"cookbook": "https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/MiniMax/MiniMax-M2.mdx",
"tp": 8,
"attention_backend": "auto",
"kv_cache_dtype": "auto",
"mem_fraction_static": 0.85,
"docker_image": "lmsysorg/sglang:v0.5.9-rocm720-mi30x",
"env": {},
"notes": "AMD docker mods: rename transformers.py -> hf_transformers_model.py; comment out @torch.compile in minimax_m2.py. GQA, attention auto-selects aiter. --mem-fraction-static 0.85."
},
"attention_type": "GQA",
"architectures": "MiniMaxM2ForCausalLM",
"attention_note": "full softmax attention on all 62 layers (attn_type_list all=1); use_qk_norm=true; NOT lightning/linear/hybrid (M2 abandoned MiniMax-Text-01 hybrid)",
"hidden_size": 3072,
"num_attention_heads": 48,
"num_key_value_heads": 8,
"head_dim": 128,
"num_hidden_layers": 62,
"max_position_embeddings": 196608
},
"GLM-5": {
"source": "https://huggingface.co/zai-org/GLM-5/raw/main/config.json",
"serve": {
"cookbook": "https://github.com/sgl-project/sglang/blob/main/docs_new/cookbook/autoregressive/GLM/GLM-5.mdx",
"tp": 8,
"attention_backend": "dsa",
"dsa_decode_backend": "tilelang",
"dsa_prefill_backend": "tilelang",
"kv_cache_dtype": "auto",
"extra_flags": ["--chunked-prefill-size 131072", "--watchdog-timeout 1200", "--mem-fraction-static 0.80"],
"env": {},
"notes": "AMD: --dsa-prefill-backend tilelang --dsa-decode-backend tilelang (aiter is decode-only and has NO fp8 KV kernel). EAGLE spec-decode NOT supported on AMD. Optional IndexCache via --json-model-override-args index_topk_pattern. Same structure as DeepSeek-V3.2."
},
"attention_type": "MLA",
"architectures": "GlmMoeDsaForCausalLM",
"attention_note": "model_type glm_moe_dsa = MLA + DeepSeek Sparse Attention (DSA). architectures+index_topk -> SGLang serves with the 'dsa' backend; this bench benchmarks the DENSE absorbed-MLA decode via triton (the sparse indexer index_n_heads=32/index_head_dim=128/index_topk=2048 is NOT benchmarked) and records real_backend=dsa. rope_type 'default' -> no yarn mscale.",
"hidden_size": 6144,
"num_attention_heads": 64,
"num_key_value_heads": 64,
"qk_nope_head_dim": 192,
"qk_rope_head_dim": 64,
"head_dim_qk": 256,
"v_head_dim": 256,
"kv_lora_rank": 512,
"q_lora_rank": 2048,
"rope_scaling": {"rope_type": "default", "rope_theta": 1000000},
"index_n_heads": 32,
"index_head_dim": 128,
"index_topk": 2048,
"num_hidden_layers": 78,
"max_position_embeddings": 202752
}
}
}