vllm-cpu-avx512vnni 0.10.2.post2__cp312-cp312-manylinux_2_17_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vllm-cpu-avx512vnni might be problematic. Click here for more details.

Files changed (1395) hide show
  1. vllm/_C.abi3.so +0 -0
  2. vllm/__init__.py +220 -0
  3. vllm/_bc_linter.py +59 -0
  4. vllm/_custom_ops.py +2022 -0
  5. vllm/_ipex_ops.py +404 -0
  6. vllm/_version.py +34 -0
  7. vllm/adapter_commons/__init__.py +0 -0
  8. vllm/adapter_commons/layers.py +16 -0
  9. vllm/adapter_commons/models.py +106 -0
  10. vllm/adapter_commons/request.py +26 -0
  11. vllm/adapter_commons/utils.py +93 -0
  12. vllm/adapter_commons/worker_manager.py +39 -0
  13. vllm/assets/__init__.py +0 -0
  14. vllm/assets/audio.py +45 -0
  15. vllm/assets/base.py +41 -0
  16. vllm/assets/image.py +50 -0
  17. vllm/assets/video.py +138 -0
  18. vllm/attention/__init__.py +19 -0
  19. vllm/attention/backends/__init__.py +0 -0
  20. vllm/attention/backends/abstract.py +348 -0
  21. vllm/attention/backends/differential_flash_attn.py +935 -0
  22. vllm/attention/backends/dual_chunk_flash_attn.py +1499 -0
  23. vllm/attention/backends/flash_attn.py +933 -0
  24. vllm/attention/backends/flashmla.py +238 -0
  25. vllm/attention/backends/mla/__init__.py +0 -0
  26. vllm/attention/backends/mla/common.py +1310 -0
  27. vllm/attention/backends/placeholder_attn.py +340 -0
  28. vllm/attention/backends/rocm_aiter_mla.py +410 -0
  29. vllm/attention/backends/rocm_flash_attn.py +953 -0
  30. vllm/attention/backends/triton_mla.py +111 -0
  31. vllm/attention/backends/utils.py +610 -0
  32. vllm/attention/backends/xformers.py +805 -0
  33. vllm/attention/layer.py +552 -0
  34. vllm/attention/layers/__init__.py +0 -0
  35. vllm/attention/layers/chunked_local_attention.py +91 -0
  36. vllm/attention/layers/cross_attention.py +159 -0
  37. vllm/attention/layers/encoder_only_attention.py +86 -0
  38. vllm/attention/ops/__init__.py +0 -0
  39. vllm/attention/ops/chunked_prefill_paged_decode.py +405 -0
  40. vllm/attention/ops/common.py +139 -0
  41. vllm/attention/ops/flashmla.py +123 -0
  42. vllm/attention/ops/merge_attn_states.py +43 -0
  43. vllm/attention/ops/paged_attn.py +261 -0
  44. vllm/attention/ops/pallas_kv_cache_update.py +124 -0
  45. vllm/attention/ops/prefix_prefill.py +928 -0
  46. vllm/attention/ops/rocm_aiter_mla.py +104 -0
  47. vllm/attention/ops/rocm_aiter_paged_attn.py +102 -0
  48. vllm/attention/ops/triton_decode_attention.py +676 -0
  49. vllm/attention/ops/triton_flash_attention.py +984 -0
  50. vllm/attention/ops/triton_merge_attn_states.py +97 -0
  51. vllm/attention/ops/triton_unified_attention.py +854 -0
  52. vllm/attention/selector.py +243 -0
  53. vllm/attention/utils/__init__.py +0 -0
  54. vllm/attention/utils/fa_utils.py +85 -0
  55. vllm/attention/utils/kv_sharing_utils.py +33 -0
  56. vllm/beam_search.py +87 -0
  57. vllm/benchmarks/__init__.py +0 -0
  58. vllm/benchmarks/datasets.py +2651 -0
  59. vllm/benchmarks/latency.py +170 -0
  60. vllm/benchmarks/lib/__init__.py +3 -0
  61. vllm/benchmarks/lib/endpoint_request_func.py +510 -0
  62. vllm/benchmarks/lib/ready_checker.py +72 -0
  63. vllm/benchmarks/lib/utils.py +80 -0
  64. vllm/benchmarks/serve.py +1247 -0
  65. vllm/benchmarks/throughput.py +696 -0
  66. vllm/collect_env.py +823 -0
  67. vllm/compilation/__init__.py +0 -0
  68. vllm/compilation/activation_quant_fusion.py +193 -0
  69. vllm/compilation/backends.py +641 -0
  70. vllm/compilation/base_static_graph.py +51 -0
  71. vllm/compilation/collective_fusion.py +1190 -0
  72. vllm/compilation/compiler_interface.py +572 -0
  73. vllm/compilation/counter.py +47 -0
  74. vllm/compilation/cuda_graph.py +193 -0
  75. vllm/compilation/cuda_piecewise_backend.py +117 -0
  76. vllm/compilation/decorators.py +316 -0
  77. vllm/compilation/fix_functionalization.py +208 -0
  78. vllm/compilation/fusion.py +600 -0
  79. vllm/compilation/fusion_attn.py +303 -0
  80. vllm/compilation/fx_utils.py +84 -0
  81. vllm/compilation/inductor_pass.py +136 -0
  82. vllm/compilation/monitor.py +57 -0
  83. vllm/compilation/multi_output_match.py +109 -0
  84. vllm/compilation/noop_elimination.py +165 -0
  85. vllm/compilation/pass_manager.py +88 -0
  86. vllm/compilation/sequence_parallelism.py +484 -0
  87. vllm/compilation/torch25_custom_graph_pass.py +42 -0
  88. vllm/compilation/vllm_inductor_pass.py +50 -0
  89. vllm/compilation/wrapper.py +138 -0
  90. vllm/config/__init__.py +3921 -0
  91. vllm/config/cache.py +214 -0
  92. vllm/config/compilation.py +580 -0
  93. vllm/config/kv_events.py +50 -0
  94. vllm/config/kv_transfer.py +111 -0
  95. vllm/config/load.py +113 -0
  96. vllm/config/lora.py +132 -0
  97. vllm/config/parallel.py +446 -0
  98. vllm/config/scheduler.py +304 -0
  99. vllm/config/utils.py +29 -0
  100. vllm/connections.py +174 -0
  101. vllm/core/__init__.py +0 -0
  102. vllm/core/block/__init__.py +0 -0
  103. vllm/core/block/block_table.py +399 -0
  104. vllm/core/block/common.py +371 -0
  105. vllm/core/block/cpu_gpu_block_allocator.py +439 -0
  106. vllm/core/block/interfaces.py +319 -0
  107. vllm/core/block/naive_block.py +466 -0
  108. vllm/core/block/prefix_caching_block.py +1135 -0
  109. vllm/core/block/utils.py +28 -0
  110. vllm/core/block_manager.py +523 -0
  111. vllm/core/evictor.py +157 -0
  112. vllm/core/interfaces.py +139 -0
  113. vllm/core/placeholder_block_space_manager.py +103 -0
  114. vllm/core/scheduler.py +2028 -0
  115. vllm/device_allocator/__init__.py +0 -0
  116. vllm/device_allocator/cumem.py +286 -0
  117. vllm/distributed/__init__.py +6 -0
  118. vllm/distributed/communication_op.py +41 -0
  119. vllm/distributed/device_communicators/__init__.py +0 -0
  120. vllm/distributed/device_communicators/all2all.py +259 -0
  121. vllm/distributed/device_communicators/all_reduce_utils.py +292 -0
  122. vllm/distributed/device_communicators/base_device_communicator.py +277 -0
  123. vllm/distributed/device_communicators/cpu_communicator.py +201 -0
  124. vllm/distributed/device_communicators/cuda_communicator.py +294 -0
  125. vllm/distributed/device_communicators/cuda_wrapper.py +180 -0
  126. vllm/distributed/device_communicators/custom_all_reduce.py +311 -0
  127. vllm/distributed/device_communicators/pynccl.py +290 -0
  128. vllm/distributed/device_communicators/pynccl_wrapper.py +382 -0
  129. vllm/distributed/device_communicators/quick_all_reduce.py +278 -0
  130. vllm/distributed/device_communicators/ray_communicator.py +258 -0
  131. vllm/distributed/device_communicators/shm_broadcast.py +585 -0
  132. vllm/distributed/device_communicators/symm_mem.py +136 -0
  133. vllm/distributed/device_communicators/tpu_communicator.py +102 -0
  134. vllm/distributed/device_communicators/xpu_communicator.py +69 -0
  135. vllm/distributed/eplb/__init__.py +8 -0
  136. vllm/distributed/eplb/eplb_state.py +619 -0
  137. vllm/distributed/eplb/rebalance_algo.py +234 -0
  138. vllm/distributed/eplb/rebalance_execute.py +424 -0
  139. vllm/distributed/kv_events.py +362 -0
  140. vllm/distributed/kv_transfer/README.md +29 -0
  141. vllm/distributed/kv_transfer/__init__.py +13 -0
  142. vllm/distributed/kv_transfer/disagg_prefill_workflow.jpg +0 -0
  143. vllm/distributed/kv_transfer/kv_connector/__init__.py +0 -0
  144. vllm/distributed/kv_transfer/kv_connector/base.py +10 -0
  145. vllm/distributed/kv_transfer/kv_connector/factory.py +108 -0
  146. vllm/distributed/kv_transfer/kv_connector/utils.py +246 -0
  147. vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +6 -0
  148. vllm/distributed/kv_transfer/kv_connector/v1/base.py +356 -0
  149. vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +167 -0
  150. vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +266 -0
  151. vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +1319 -0
  152. vllm/distributed/kv_transfer/kv_connector/v1/p2p/__init__.py +0 -0
  153. vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py +484 -0
  154. vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +542 -0
  155. vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +266 -0
  156. vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +414 -0
  157. vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
  158. vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +175 -0
  159. vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +161 -0
  160. vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +237 -0
  161. vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
  162. vllm/distributed/kv_transfer/kv_pipe/base.py +67 -0
  163. vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +290 -0
  164. vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +280 -0
  165. vllm/distributed/kv_transfer/kv_transfer_state.py +73 -0
  166. vllm/distributed/parallel_state.py +1489 -0
  167. vllm/distributed/tpu_distributed_utils.py +178 -0
  168. vllm/distributed/utils.py +536 -0
  169. vllm/engine/__init__.py +0 -0
  170. vllm/engine/arg_utils.py +1857 -0
  171. vllm/engine/async_llm_engine.py +1044 -0
  172. vllm/engine/async_timeout.py +173 -0
  173. vllm/engine/llm_engine.py +1849 -0
  174. vllm/engine/metrics.py +577 -0
  175. vllm/engine/metrics_types.py +84 -0
  176. vllm/engine/multiprocessing/__init__.py +145 -0
  177. vllm/engine/multiprocessing/client.py +643 -0
  178. vllm/engine/multiprocessing/engine.py +470 -0
  179. vllm/engine/output_processor/__init__.py +0 -0
  180. vllm/engine/output_processor/interfaces.py +61 -0
  181. vllm/engine/output_processor/single_step.py +145 -0
  182. vllm/engine/output_processor/stop_checker.py +131 -0
  183. vllm/engine/output_processor/util.py +28 -0
  184. vllm/engine/protocol.py +343 -0
  185. vllm/entrypoints/__init__.py +0 -0
  186. vllm/entrypoints/api_server.py +178 -0
  187. vllm/entrypoints/chat_utils.py +1535 -0
  188. vllm/entrypoints/cli/__init__.py +12 -0
  189. vllm/entrypoints/cli/benchmark/__init__.py +0 -0
  190. vllm/entrypoints/cli/benchmark/base.py +25 -0
  191. vllm/entrypoints/cli/benchmark/latency.py +21 -0
  192. vllm/entrypoints/cli/benchmark/main.py +58 -0
  193. vllm/entrypoints/cli/benchmark/serve.py +21 -0
  194. vllm/entrypoints/cli/benchmark/throughput.py +21 -0
  195. vllm/entrypoints/cli/collect_env.py +36 -0
  196. vllm/entrypoints/cli/main.py +60 -0
  197. vllm/entrypoints/cli/openai.py +214 -0
  198. vllm/entrypoints/cli/run_batch.py +69 -0
  199. vllm/entrypoints/cli/serve.py +232 -0
  200. vllm/entrypoints/cli/types.py +29 -0
  201. vllm/entrypoints/constants.py +10 -0
  202. vllm/entrypoints/context.py +444 -0
  203. vllm/entrypoints/harmony_utils.py +431 -0
  204. vllm/entrypoints/launcher.py +168 -0
  205. vllm/entrypoints/llm.py +1579 -0
  206. vllm/entrypoints/logger.py +79 -0
  207. vllm/entrypoints/openai/__init__.py +0 -0
  208. vllm/entrypoints/openai/api_server.py +2011 -0
  209. vllm/entrypoints/openai/cli_args.py +281 -0
  210. vllm/entrypoints/openai/logits_processors.py +90 -0
  211. vllm/entrypoints/openai/protocol.py +2590 -0
  212. vllm/entrypoints/openai/run_batch.py +497 -0
  213. vllm/entrypoints/openai/serving_chat.py +1591 -0
  214. vllm/entrypoints/openai/serving_classification.py +176 -0
  215. vllm/entrypoints/openai/serving_completion.py +688 -0
  216. vllm/entrypoints/openai/serving_embedding.py +632 -0
  217. vllm/entrypoints/openai/serving_engine.py +996 -0
  218. vllm/entrypoints/openai/serving_models.py +288 -0
  219. vllm/entrypoints/openai/serving_pooling.py +277 -0
  220. vllm/entrypoints/openai/serving_responses.py +1690 -0
  221. vllm/entrypoints/openai/serving_score.py +479 -0
  222. vllm/entrypoints/openai/serving_tokenization.py +196 -0
  223. vllm/entrypoints/openai/serving_transcription.py +136 -0
  224. vllm/entrypoints/openai/speech_to_text.py +388 -0
  225. vllm/entrypoints/openai/tool_parsers/__init__.py +51 -0
  226. vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +164 -0
  227. vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +367 -0
  228. vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +370 -0
  229. vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +185 -0
  230. vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +259 -0
  231. vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +237 -0
  232. vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +418 -0
  233. vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +372 -0
  234. vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +216 -0
  235. vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +308 -0
  236. vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +377 -0
  237. vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +316 -0
  238. vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +269 -0
  239. vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +816 -0
  240. vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +369 -0
  241. vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +73 -0
  242. vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +112 -0
  243. vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +308 -0
  244. vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +707 -0
  245. vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +679 -0
  246. vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +296 -0
  247. vllm/entrypoints/openai/tool_parsers/utils.py +124 -0
  248. vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +524 -0
  249. vllm/entrypoints/renderer.py +395 -0
  250. vllm/entrypoints/score_utils.py +232 -0
  251. vllm/entrypoints/ssl.py +75 -0
  252. vllm/entrypoints/tool.py +139 -0
  253. vllm/entrypoints/tool_server.py +195 -0
  254. vllm/entrypoints/utils.py +328 -0
  255. vllm/env_override.py +23 -0
  256. vllm/envs.py +1354 -0
  257. vllm/executor/__init__.py +0 -0
  258. vllm/executor/executor_base.py +378 -0
  259. vllm/executor/mp_distributed_executor.py +244 -0
  260. vllm/executor/msgspec_utils.py +35 -0
  261. vllm/executor/multiproc_worker_utils.py +279 -0
  262. vllm/executor/ray_distributed_executor.py +699 -0
  263. vllm/executor/ray_utils.py +410 -0
  264. vllm/executor/uniproc_executor.py +152 -0
  265. vllm/forward_context.py +273 -0
  266. vllm/inputs/__init__.py +44 -0
  267. vllm/inputs/data.py +356 -0
  268. vllm/inputs/parse.py +151 -0
  269. vllm/inputs/preprocess.py +973 -0
  270. vllm/inputs/registry.py +251 -0
  271. vllm/logger.py +229 -0
  272. vllm/logging_utils/__init__.py +8 -0
  273. vllm/logging_utils/dump_input.py +81 -0
  274. vllm/logging_utils/formatter.py +79 -0
  275. vllm/logits_process.py +119 -0
  276. vllm/logprobs.py +28 -0
  277. vllm/lora/__init__.py +0 -0
  278. vllm/lora/layers/__init__.py +34 -0
  279. vllm/lora/layers/base.py +69 -0
  280. vllm/lora/layers/base_linear.py +184 -0
  281. vllm/lora/layers/column_parallel_linear.py +622 -0
  282. vllm/lora/layers/logits_processor.py +247 -0
  283. vllm/lora/layers/qkv_x_parallel_linear.py +8 -0
  284. vllm/lora/layers/replicated_linear.py +61 -0
  285. vllm/lora/layers/row_parallel_linear.py +201 -0
  286. vllm/lora/layers/utils.py +60 -0
  287. vllm/lora/layers/vocal_parallel_embedding.py +172 -0
  288. vllm/lora/lora.py +199 -0
  289. vllm/lora/models.py +792 -0
  290. vllm/lora/ops/__init__.py +0 -0
  291. vllm/lora/ops/ipex_ops/__init__.py +7 -0
  292. vllm/lora/ops/ipex_ops/lora_ops.py +44 -0
  293. vllm/lora/ops/torch_ops/__init__.py +16 -0
  294. vllm/lora/ops/torch_ops/lora_ops.py +119 -0
  295. vllm/lora/ops/triton_ops/__init__.py +12 -0
  296. vllm/lora/ops/triton_ops/kernel_utils.py +243 -0
  297. vllm/lora/ops/triton_ops/lora_expand_op.py +291 -0
  298. vllm/lora/ops/triton_ops/lora_kernel_metadata.py +148 -0
  299. vllm/lora/ops/triton_ops/lora_shrink_op.py +245 -0
  300. vllm/lora/ops/triton_ops/utils.py +126 -0
  301. vllm/lora/ops/xla_ops/__init__.py +7 -0
  302. vllm/lora/ops/xla_ops/lora_ops.py +145 -0
  303. vllm/lora/peft_helper.py +127 -0
  304. vllm/lora/punica_wrapper/__init__.py +10 -0
  305. vllm/lora/punica_wrapper/punica_base.py +458 -0
  306. vllm/lora/punica_wrapper/punica_cpu.py +349 -0
  307. vllm/lora/punica_wrapper/punica_gpu.py +279 -0
  308. vllm/lora/punica_wrapper/punica_selector.py +20 -0
  309. vllm/lora/punica_wrapper/punica_tpu.py +391 -0
  310. vllm/lora/punica_wrapper/punica_xpu.py +276 -0
  311. vllm/lora/punica_wrapper/utils.py +136 -0
  312. vllm/lora/request.py +99 -0
  313. vllm/lora/resolver.py +85 -0
  314. vllm/lora/utils.py +246 -0
  315. vllm/lora/worker_manager.py +256 -0
  316. vllm/model_executor/__init__.py +16 -0
  317. vllm/model_executor/custom_op.py +194 -0
  318. vllm/model_executor/layers/__init__.py +0 -0
  319. vllm/model_executor/layers/activation.py +575 -0
  320. vllm/model_executor/layers/attention_layer_base.py +23 -0
  321. vllm/model_executor/layers/fla/__init__.py +8 -0
  322. vllm/model_executor/layers/fla/ops/__init__.py +17 -0
  323. vllm/model_executor/layers/fla/ops/chunk.py +225 -0
  324. vllm/model_executor/layers/fla/ops/chunk_delta_h.py +290 -0
  325. vllm/model_executor/layers/fla/ops/chunk_o.py +177 -0
  326. vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +140 -0
  327. vllm/model_executor/layers/fla/ops/cumsum.py +226 -0
  328. vllm/model_executor/layers/fla/ops/fused_recurrent.py +366 -0
  329. vllm/model_executor/layers/fla/ops/index.py +39 -0
  330. vllm/model_executor/layers/fla/ops/l2norm.py +143 -0
  331. vllm/model_executor/layers/fla/ops/layernorm_guard.py +337 -0
  332. vllm/model_executor/layers/fla/ops/op.py +39 -0
  333. vllm/model_executor/layers/fla/ops/solve_tril.py +365 -0
  334. vllm/model_executor/layers/fla/ops/utils.py +180 -0
  335. vllm/model_executor/layers/fla/ops/wy_fast.py +114 -0
  336. vllm/model_executor/layers/fused_moe/__init__.py +80 -0
  337. vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +304 -0
  338. vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +164 -0
  339. vllm/model_executor/layers/fused_moe/config.py +497 -0
  340. vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  341. vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  342. vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  343. vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  344. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  345. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +218 -0
  346. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
  347. vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  348. vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  349. vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  350. vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  351. vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  352. vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
  353. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  354. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  355. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20-3e.json +146 -0
  356. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20.json +146 -0
  357. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
  358. vllm/model_executor/layers/fused_moe/configs/E=128,N=352,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +122 -0
  359. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  360. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  361. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  362. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  363. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  364. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e.json +146 -0
  365. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
  366. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  367. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
  368. vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  369. vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +146 -0
  370. vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +114 -0
  371. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  372. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  373. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  374. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  375. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  376. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
  377. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  378. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
  379. vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
  380. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
  381. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
  382. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200.json +146 -0
  383. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
  384. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  385. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  386. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  387. vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  388. vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  389. vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  390. vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  391. vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  392. vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  393. vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  394. vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
  395. vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  396. vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  397. vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  398. vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  399. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  400. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  401. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
  402. vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  403. vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  404. vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H20-3e.json +146 -0
  405. vllm/model_executor/layers/fused_moe/configs/E=160,N=320,device_name=NVIDIA_H20-3e.json +146 -0
  406. vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  407. vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  408. vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  409. vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  410. vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  411. vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  412. vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  413. vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
  414. vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
  415. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  416. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
  417. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  418. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
  419. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  420. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  421. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  422. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  423. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
  424. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
  425. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  426. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  427. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  428. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  429. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  430. vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  431. vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
  432. vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  433. vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  434. vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  435. vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  436. vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  437. vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  438. vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  439. vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  440. vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  441. vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  442. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_B200.json +146 -0
  443. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  444. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
  445. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
  446. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
  447. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  448. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
  449. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
  450. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_B200.json +146 -0
  451. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  452. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H20-3e.json +146 -0
  453. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H200.json +146 -0
  454. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_B200.json +146 -0
  455. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H20-3e.json +146 -0
  456. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
  457. vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
  458. vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
  459. vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
  460. vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
  461. vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  462. vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  463. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  464. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  465. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  466. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  467. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  468. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
  469. vllm/model_executor/layers/fused_moe/configs/E=64,N=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  470. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  471. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  472. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
  473. vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  474. vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20.json +146 -0
  475. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  476. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  477. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  478. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
  479. vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  480. vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20.json +146 -0
  481. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  482. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  483. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
  484. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  485. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  486. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  487. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
  488. vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  489. vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20.json +146 -0
  490. vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=NVIDIA_H20.json +146 -0
  491. vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  492. vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  493. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  494. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
  495. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  496. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
  497. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
  498. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  499. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
  500. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  501. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
  502. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  503. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
  504. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  505. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
  506. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  507. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
  508. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  509. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  510. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  511. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  512. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
  513. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  514. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
  515. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  516. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
  517. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  518. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  519. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  520. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +154 -0
  521. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  522. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
  523. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  524. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
  525. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  526. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
  527. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  528. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  529. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
  530. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  531. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  532. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  533. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
  534. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
  535. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  536. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
  537. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  538. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
  539. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  540. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  541. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  542. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  543. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
  544. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  545. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
  546. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  547. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
  548. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  549. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  550. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  551. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  552. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
  553. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  554. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
  555. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  556. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
  557. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  558. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  559. vllm/model_executor/layers/fused_moe/configs/README +12 -0
  560. vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +297 -0
  561. vllm/model_executor/layers/fused_moe/cutlass_moe.py +996 -0
  562. vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +370 -0
  563. vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +413 -0
  564. vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +280 -0
  565. vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +229 -0
  566. vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +243 -0
  567. vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +97 -0
  568. vllm/model_executor/layers/fused_moe/fused_batched_moe.py +1042 -0
  569. vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +240 -0
  570. vllm/model_executor/layers/fused_moe/fused_moe.py +2081 -0
  571. vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +247 -0
  572. vllm/model_executor/layers/fused_moe/layer.py +1951 -0
  573. vllm/model_executor/layers/fused_moe/modular_kernel.py +892 -0
  574. vllm/model_executor/layers/fused_moe/moe_align_block_size.py +87 -0
  575. vllm/model_executor/layers/fused_moe/moe_pallas.py +80 -0
  576. vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +205 -0
  577. vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
  578. vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +321 -0
  579. vllm/model_executor/layers/fused_moe/prepare_finalize.py +72 -0
  580. vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +431 -0
  581. vllm/model_executor/layers/fused_moe/routing_simulator.py +291 -0
  582. vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +146 -0
  583. vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +171 -0
  584. vllm/model_executor/layers/fused_moe/trtllm_moe.py +197 -0
  585. vllm/model_executor/layers/fused_moe/utils.py +270 -0
  586. vllm/model_executor/layers/layernorm.py +381 -0
  587. vllm/model_executor/layers/lightning_attn.py +661 -0
  588. vllm/model_executor/layers/linear.py +1567 -0
  589. vllm/model_executor/layers/logits_processor.py +199 -0
  590. vllm/model_executor/layers/mamba/__init__.py +0 -0
  591. vllm/model_executor/layers/mamba/abstract.py +45 -0
  592. vllm/model_executor/layers/mamba/linear_attn.py +432 -0
  593. vllm/model_executor/layers/mamba/mamba2_metadata.py +186 -0
  594. vllm/model_executor/layers/mamba/mamba_mixer.py +517 -0
  595. vllm/model_executor/layers/mamba/mamba_mixer2.py +803 -0
  596. vllm/model_executor/layers/mamba/mamba_utils.py +202 -0
  597. vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
  598. vllm/model_executor/layers/mamba/ops/causal_conv1d.py +982 -0
  599. vllm/model_executor/layers/mamba/ops/layernorm_gated.py +168 -0
  600. vllm/model_executor/layers/mamba/ops/mamba_ssm.py +414 -0
  601. vllm/model_executor/layers/mamba/ops/ssd_bmm.py +262 -0
  602. vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +574 -0
  603. vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +751 -0
  604. vllm/model_executor/layers/mamba/ops/ssd_combined.py +248 -0
  605. vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +248 -0
  606. vllm/model_executor/layers/mamba/short_conv.py +270 -0
  607. vllm/model_executor/layers/mla.py +158 -0
  608. vllm/model_executor/layers/pooler.py +732 -0
  609. vllm/model_executor/layers/quantization/__init__.py +157 -0
  610. vllm/model_executor/layers/quantization/auto_round.py +388 -0
  611. vllm/model_executor/layers/quantization/awq.py +228 -0
  612. vllm/model_executor/layers/quantization/awq_marlin.py +548 -0
  613. vllm/model_executor/layers/quantization/awq_triton.py +320 -0
  614. vllm/model_executor/layers/quantization/base_config.py +164 -0
  615. vllm/model_executor/layers/quantization/bitblas.py +464 -0
  616. vllm/model_executor/layers/quantization/bitsandbytes.py +621 -0
  617. vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +0 -0
  618. vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +795 -0
  619. vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +1651 -0
  620. vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +27 -0
  621. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +366 -0
  622. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
  623. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +160 -0
  624. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +105 -0
  625. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +161 -0
  626. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +169 -0
  627. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +135 -0
  628. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +121 -0
  629. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +156 -0
  630. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +111 -0
  631. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +201 -0
  632. vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +227 -0
  633. vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +135 -0
  634. vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/linear_qutlass_nvfp4.py +21 -0
  635. vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
  636. vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +206 -0
  637. vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
  638. vllm/model_executor/layers/quantization/deepgemm.py +81 -0
  639. vllm/model_executor/layers/quantization/deepspeedfp.py +196 -0
  640. vllm/model_executor/layers/quantization/experts_int8.py +215 -0
  641. vllm/model_executor/layers/quantization/fbgemm_fp8.py +172 -0
  642. vllm/model_executor/layers/quantization/fp8.py +1179 -0
  643. vllm/model_executor/layers/quantization/gguf.py +597 -0
  644. vllm/model_executor/layers/quantization/gptq.py +300 -0
  645. vllm/model_executor/layers/quantization/gptq_bitblas.py +448 -0
  646. vllm/model_executor/layers/quantization/gptq_marlin.py +700 -0
  647. vllm/model_executor/layers/quantization/gptq_marlin_24.py +297 -0
  648. vllm/model_executor/layers/quantization/hqq_marlin.py +333 -0
  649. vllm/model_executor/layers/quantization/inc.py +61 -0
  650. vllm/model_executor/layers/quantization/input_quant_fp8.py +103 -0
  651. vllm/model_executor/layers/quantization/ipex_quant.py +410 -0
  652. vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
  653. vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +91 -0
  654. vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +93 -0
  655. vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +116 -0
  656. vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +302 -0
  657. vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +92 -0
  658. vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +117 -0
  659. vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +92 -0
  660. vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +143 -0
  661. vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +144 -0
  662. vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +139 -0
  663. vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +67 -0
  664. vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +89 -0
  665. vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +163 -0
  666. vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +206 -0
  667. vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +137 -0
  668. vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +41 -0
  669. vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +104 -0
  670. vllm/model_executor/layers/quantization/kv_cache.py +139 -0
  671. vllm/model_executor/layers/quantization/modelopt.py +1548 -0
  672. vllm/model_executor/layers/quantization/moe_wna16.py +473 -0
  673. vllm/model_executor/layers/quantization/mxfp4.py +951 -0
  674. vllm/model_executor/layers/quantization/petit.py +306 -0
  675. vllm/model_executor/layers/quantization/ptpc_fp8.py +129 -0
  676. vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
  677. vllm/model_executor/layers/quantization/quark/quark.py +431 -0
  678. vllm/model_executor/layers/quantization/quark/quark_moe.py +434 -0
  679. vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
  680. vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
  681. vllm/model_executor/layers/quantization/quark/schemes/quark_w4a4_mxfp4.py +112 -0
  682. vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +163 -0
  683. vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +122 -0
  684. vllm/model_executor/layers/quantization/quark/utils.py +105 -0
  685. vllm/model_executor/layers/quantization/rtn.py +456 -0
  686. vllm/model_executor/layers/quantization/schema.py +86 -0
  687. vllm/model_executor/layers/quantization/torchao.py +214 -0
  688. vllm/model_executor/layers/quantization/tpu_int8.py +125 -0
  689. vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
  690. vllm/model_executor/layers/quantization/utils/allspark_utils.py +52 -0
  691. vllm/model_executor/layers/quantization/utils/bitblas_utils.py +210 -0
  692. vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  693. vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  694. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  695. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  696. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  697. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  698. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  699. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  700. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  701. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  702. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  703. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  704. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  705. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  706. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  707. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  708. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  709. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  710. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  711. vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  712. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  713. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  714. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  715. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  716. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  717. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  718. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  719. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  720. vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  721. vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  722. vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  723. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  724. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  725. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  726. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  727. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  728. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  729. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  730. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  731. vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  732. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  733. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  734. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  735. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  736. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  737. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  738. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  739. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  740. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  741. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  742. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  743. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  744. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  745. vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  746. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  747. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  748. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  749. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  750. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  751. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  752. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  753. vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  754. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  755. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  756. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  757. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  758. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  759. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  760. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  761. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  762. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  763. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  764. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  765. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  766. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  767. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  768. vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  769. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  770. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  771. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  772. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  773. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  774. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  775. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  776. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  777. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  778. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  779. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  780. vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  781. vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  782. vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  783. vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  784. vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  785. vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  786. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  787. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  788. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  789. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  790. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  791. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  792. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  793. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  794. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  795. vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  796. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  797. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  798. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  799. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  800. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  801. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  802. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  803. vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  804. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  805. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  806. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  807. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  808. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  809. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  810. vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  811. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  812. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  813. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  814. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  815. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  816. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  817. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  818. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  819. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  820. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  821. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +18 -0
  822. vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  823. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  824. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  825. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  826. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  827. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  828. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  829. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  830. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  831. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  832. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  833. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  834. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  835. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  836. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  837. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  838. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  839. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  840. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  841. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  842. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  843. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  844. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  845. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  846. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  847. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  848. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  849. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  850. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  851. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  852. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  853. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  854. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  855. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  856. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  857. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  858. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  859. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  860. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  861. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  862. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  863. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  864. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  865. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  866. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  867. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  868. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  869. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  870. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  871. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  872. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  873. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  874. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  875. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  876. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  877. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  878. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  879. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  880. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  881. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  882. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  883. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  884. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  885. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  886. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  887. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  888. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  889. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  890. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  891. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  892. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  893. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
  894. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
  895. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
  896. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  897. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  898. vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  899. vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  900. vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  901. vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
  902. vllm/model_executor/layers/quantization/utils/configs/README.md +3 -0
  903. vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +85 -0
  904. vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +258 -0
  905. vllm/model_executor/layers/quantization/utils/fp8_utils.py +795 -0
  906. vllm/model_executor/layers/quantization/utils/gptq_utils.py +96 -0
  907. vllm/model_executor/layers/quantization/utils/int8_utils.py +492 -0
  908. vllm/model_executor/layers/quantization/utils/layer_utils.py +40 -0
  909. vllm/model_executor/layers/quantization/utils/machete_utils.py +50 -0
  910. vllm/model_executor/layers/quantization/utils/marlin_utils.py +479 -0
  911. vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +396 -0
  912. vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +345 -0
  913. vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +165 -0
  914. vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +464 -0
  915. vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +132 -0
  916. vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +20 -0
  917. vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +137 -0
  918. vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +59 -0
  919. vllm/model_executor/layers/quantization/utils/petit_utils.py +122 -0
  920. vllm/model_executor/layers/quantization/utils/quant_utils.py +627 -0
  921. vllm/model_executor/layers/quantization/utils/w8a8_utils.py +458 -0
  922. vllm/model_executor/layers/resampler.py +270 -0
  923. vllm/model_executor/layers/rotary_embedding/__init__.py +190 -0
  924. vllm/model_executor/layers/rotary_embedding/base.py +156 -0
  925. vllm/model_executor/layers/rotary_embedding/common.py +105 -0
  926. vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +140 -0
  927. vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +197 -0
  928. vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +41 -0
  929. vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +67 -0
  930. vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +80 -0
  931. vllm/model_executor/layers/rotary_embedding/linear_scaling_rope.py +115 -0
  932. vllm/model_executor/layers/rotary_embedding/llama3_rope.py +54 -0
  933. vllm/model_executor/layers/rotary_embedding/llama4_vision_rope.py +81 -0
  934. vllm/model_executor/layers/rotary_embedding/mrope.py +1140 -0
  935. vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +42 -0
  936. vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +129 -0
  937. vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +68 -0
  938. vllm/model_executor/layers/sampler.py +1198 -0
  939. vllm/model_executor/layers/shared_fused_moe/__init__.py +6 -0
  940. vllm/model_executor/layers/shared_fused_moe/shared_fused_moe.py +56 -0
  941. vllm/model_executor/layers/utils.py +196 -0
  942. vllm/model_executor/layers/vocab_parallel_embedding.py +487 -0
  943. vllm/model_executor/model_loader/__init__.py +138 -0
  944. vllm/model_executor/model_loader/base_loader.py +52 -0
  945. vllm/model_executor/model_loader/bitsandbytes_loader.py +787 -0
  946. vllm/model_executor/model_loader/default_loader.py +278 -0
  947. vllm/model_executor/model_loader/dummy_loader.py +28 -0
  948. vllm/model_executor/model_loader/gguf_loader.py +155 -0
  949. vllm/model_executor/model_loader/runai_streamer_loader.py +104 -0
  950. vllm/model_executor/model_loader/sharded_state_loader.py +199 -0
  951. vllm/model_executor/model_loader/tensorizer.py +743 -0
  952. vllm/model_executor/model_loader/tensorizer_loader.py +143 -0
  953. vllm/model_executor/model_loader/tpu.py +114 -0
  954. vllm/model_executor/model_loader/utils.py +271 -0
  955. vllm/model_executor/model_loader/weight_utils.py +946 -0
  956. vllm/model_executor/models/__init__.py +30 -0
  957. vllm/model_executor/models/adapters.py +542 -0
  958. vllm/model_executor/models/aimv2.py +246 -0
  959. vllm/model_executor/models/apertus.py +582 -0
  960. vllm/model_executor/models/arcee.py +423 -0
  961. vllm/model_executor/models/arctic.py +560 -0
  962. vllm/model_executor/models/aria.py +662 -0
  963. vllm/model_executor/models/aya_vision.py +470 -0
  964. vllm/model_executor/models/baichuan.py +475 -0
  965. vllm/model_executor/models/bailing_moe.py +529 -0
  966. vllm/model_executor/models/bamba.py +582 -0
  967. vllm/model_executor/models/bart.py +1343 -0
  968. vllm/model_executor/models/bert.py +613 -0
  969. vllm/model_executor/models/bert_with_rope.py +687 -0
  970. vllm/model_executor/models/blip.py +339 -0
  971. vllm/model_executor/models/blip2.py +716 -0
  972. vllm/model_executor/models/bloom.py +374 -0
  973. vllm/model_executor/models/chameleon.py +1141 -0
  974. vllm/model_executor/models/chatglm.py +479 -0
  975. vllm/model_executor/models/clip.py +407 -0
  976. vllm/model_executor/models/cohere2_vision.py +484 -0
  977. vllm/model_executor/models/commandr.py +467 -0
  978. vllm/model_executor/models/config.py +434 -0
  979. vllm/model_executor/models/constant_size_cache.py +137 -0
  980. vllm/model_executor/models/dbrx.py +473 -0
  981. vllm/model_executor/models/deepseek.py +491 -0
  982. vllm/model_executor/models/deepseek_eagle.py +241 -0
  983. vllm/model_executor/models/deepseek_mtp.py +282 -0
  984. vllm/model_executor/models/deepseek_v2.py +1058 -0
  985. vllm/model_executor/models/deepseek_vl2.py +661 -0
  986. vllm/model_executor/models/donut.py +387 -0
  987. vllm/model_executor/models/dots1.py +547 -0
  988. vllm/model_executor/models/ernie45.py +43 -0
  989. vllm/model_executor/models/ernie45_moe.py +608 -0
  990. vllm/model_executor/models/ernie45_vl.py +1510 -0
  991. vllm/model_executor/models/ernie45_vl_moe.py +728 -0
  992. vllm/model_executor/models/ernie_mtp.py +287 -0
  993. vllm/model_executor/models/exaone.py +552 -0
  994. vllm/model_executor/models/exaone4.py +535 -0
  995. vllm/model_executor/models/fairseq2_llama.py +154 -0
  996. vllm/model_executor/models/falcon.py +511 -0
  997. vllm/model_executor/models/falcon_h1.py +739 -0
  998. vllm/model_executor/models/florence2.py +1107 -0
  999. vllm/model_executor/models/fuyu.py +401 -0
  1000. vllm/model_executor/models/gemma.py +428 -0
  1001. vllm/model_executor/models/gemma2.py +425 -0
  1002. vllm/model_executor/models/gemma3.py +542 -0
  1003. vllm/model_executor/models/gemma3_mm.py +723 -0
  1004. vllm/model_executor/models/gemma3n.py +830 -0
  1005. vllm/model_executor/models/gemma3n_mm.py +767 -0
  1006. vllm/model_executor/models/glm.py +23 -0
  1007. vllm/model_executor/models/glm4.py +305 -0
  1008. vllm/model_executor/models/glm4_1v.py +1669 -0
  1009. vllm/model_executor/models/glm4_moe.py +703 -0
  1010. vllm/model_executor/models/glm4_moe_mtp.py +306 -0
  1011. vllm/model_executor/models/glm4v.py +654 -0
  1012. vllm/model_executor/models/gpt2.py +383 -0
  1013. vllm/model_executor/models/gpt_bigcode.py +346 -0
  1014. vllm/model_executor/models/gpt_j.py +340 -0
  1015. vllm/model_executor/models/gpt_neox.py +333 -0
  1016. vllm/model_executor/models/gpt_oss.py +687 -0
  1017. vllm/model_executor/models/granite.py +498 -0
  1018. vllm/model_executor/models/granite_speech.py +799 -0
  1019. vllm/model_executor/models/granitemoe.py +541 -0
  1020. vllm/model_executor/models/granitemoehybrid.py +684 -0
  1021. vllm/model_executor/models/granitemoeshared.py +342 -0
  1022. vllm/model_executor/models/gritlm.py +262 -0
  1023. vllm/model_executor/models/grok1.py +550 -0
  1024. vllm/model_executor/models/h2ovl.py +536 -0
  1025. vllm/model_executor/models/hunyuan_v1.py +937 -0
  1026. vllm/model_executor/models/hyperclovax_vision.py +1206 -0
  1027. vllm/model_executor/models/idefics2_vision_model.py +416 -0
  1028. vllm/model_executor/models/idefics3.py +758 -0
  1029. vllm/model_executor/models/interfaces.py +854 -0
  1030. vllm/model_executor/models/interfaces_base.py +195 -0
  1031. vllm/model_executor/models/intern_vit.py +481 -0
  1032. vllm/model_executor/models/internlm2.py +453 -0
  1033. vllm/model_executor/models/internlm2_ve.py +148 -0
  1034. vllm/model_executor/models/interns1.py +832 -0
  1035. vllm/model_executor/models/interns1_vit.py +418 -0
  1036. vllm/model_executor/models/internvl.py +1423 -0
  1037. vllm/model_executor/models/jais.py +374 -0
  1038. vllm/model_executor/models/jamba.py +630 -0
  1039. vllm/model_executor/models/jina_vl.py +144 -0
  1040. vllm/model_executor/models/keye.py +1684 -0
  1041. vllm/model_executor/models/keye_vl1_5.py +601 -0
  1042. vllm/model_executor/models/kimi_vl.py +620 -0
  1043. vllm/model_executor/models/lfm2.py +558 -0
  1044. vllm/model_executor/models/llama.py +671 -0
  1045. vllm/model_executor/models/llama4.py +732 -0
  1046. vllm/model_executor/models/llama4_eagle.py +241 -0
  1047. vllm/model_executor/models/llama_eagle.py +171 -0
  1048. vllm/model_executor/models/llama_eagle3.py +292 -0
  1049. vllm/model_executor/models/llava.py +872 -0
  1050. vllm/model_executor/models/llava_next.py +572 -0
  1051. vllm/model_executor/models/llava_next_video.py +479 -0
  1052. vllm/model_executor/models/llava_onevision.py +945 -0
  1053. vllm/model_executor/models/mamba.py +310 -0
  1054. vllm/model_executor/models/mamba2.py +346 -0
  1055. vllm/model_executor/models/mamba_cache.py +83 -0
  1056. vllm/model_executor/models/medusa.py +219 -0
  1057. vllm/model_executor/models/midashenglm.py +788 -0
  1058. vllm/model_executor/models/mimo.py +191 -0
  1059. vllm/model_executor/models/mimo_mtp.py +273 -0
  1060. vllm/model_executor/models/minicpm.py +593 -0
  1061. vllm/model_executor/models/minicpm3.py +230 -0
  1062. vllm/model_executor/models/minicpm_eagle.py +391 -0
  1063. vllm/model_executor/models/minicpmo.py +804 -0
  1064. vllm/model_executor/models/minicpmv.py +1786 -0
  1065. vllm/model_executor/models/minimax_cache.py +36 -0
  1066. vllm/model_executor/models/minimax_text_01.py +1027 -0
  1067. vllm/model_executor/models/minimax_vl_01.py +431 -0
  1068. vllm/model_executor/models/mistral3.py +628 -0
  1069. vllm/model_executor/models/mixtral.py +494 -0
  1070. vllm/model_executor/models/mllama.py +1697 -0
  1071. vllm/model_executor/models/mllama4.py +1079 -0
  1072. vllm/model_executor/models/mlp_speculator.py +206 -0
  1073. vllm/model_executor/models/modernbert.py +374 -0
  1074. vllm/model_executor/models/module_mapping.py +72 -0
  1075. vllm/model_executor/models/molmo.py +1569 -0
  1076. vllm/model_executor/models/moonvit.py +663 -0
  1077. vllm/model_executor/models/motif.py +345 -0
  1078. vllm/model_executor/models/mpt.py +332 -0
  1079. vllm/model_executor/models/nano_nemotron_vl.py +1395 -0
  1080. vllm/model_executor/models/nemotron.py +509 -0
  1081. vllm/model_executor/models/nemotron_h.py +633 -0
  1082. vllm/model_executor/models/nemotron_nas.py +484 -0
  1083. vllm/model_executor/models/nemotron_vl.py +655 -0
  1084. vllm/model_executor/models/nvlm_d.py +203 -0
  1085. vllm/model_executor/models/olmo.py +406 -0
  1086. vllm/model_executor/models/olmo2.py +428 -0
  1087. vllm/model_executor/models/olmoe.py +485 -0
  1088. vllm/model_executor/models/opt.py +413 -0
  1089. vllm/model_executor/models/orion.py +350 -0
  1090. vllm/model_executor/models/ovis.py +572 -0
  1091. vllm/model_executor/models/ovis2_5.py +644 -0
  1092. vllm/model_executor/models/paligemma.py +414 -0
  1093. vllm/model_executor/models/persimmon.py +345 -0
  1094. vllm/model_executor/models/phi.py +357 -0
  1095. vllm/model_executor/models/phi3.py +19 -0
  1096. vllm/model_executor/models/phi3v.py +701 -0
  1097. vllm/model_executor/models/phi4_multimodal.py +1478 -0
  1098. vllm/model_executor/models/phi4flash.py +737 -0
  1099. vllm/model_executor/models/phi4mm.py +1281 -0
  1100. vllm/model_executor/models/phi4mm_audio.py +1254 -0
  1101. vllm/model_executor/models/phi4mm_utils.py +1875 -0
  1102. vllm/model_executor/models/phimoe.py +681 -0
  1103. vllm/model_executor/models/pixtral.py +1348 -0
  1104. vllm/model_executor/models/plamo2.py +1126 -0
  1105. vllm/model_executor/models/qwen.py +363 -0
  1106. vllm/model_executor/models/qwen2.py +526 -0
  1107. vllm/model_executor/models/qwen2_5_omni_thinker.py +985 -0
  1108. vllm/model_executor/models/qwen2_5_vl.py +1256 -0
  1109. vllm/model_executor/models/qwen2_audio.py +492 -0
  1110. vllm/model_executor/models/qwen2_moe.py +558 -0
  1111. vllm/model_executor/models/qwen2_rm.py +122 -0
  1112. vllm/model_executor/models/qwen2_vl.py +1512 -0
  1113. vllm/model_executor/models/qwen3.py +344 -0
  1114. vllm/model_executor/models/qwen3_moe.py +704 -0
  1115. vllm/model_executor/models/qwen3_next.py +1298 -0
  1116. vllm/model_executor/models/qwen3_next_mtp.py +285 -0
  1117. vllm/model_executor/models/qwen_vl.py +795 -0
  1118. vllm/model_executor/models/registry.py +891 -0
  1119. vllm/model_executor/models/roberta.py +252 -0
  1120. vllm/model_executor/models/rvl.py +103 -0
  1121. vllm/model_executor/models/seed_oss.py +488 -0
  1122. vllm/model_executor/models/siglip.py +524 -0
  1123. vllm/model_executor/models/siglip2navit.py +688 -0
  1124. vllm/model_executor/models/skyworkr1v.py +914 -0
  1125. vllm/model_executor/models/smolvlm.py +44 -0
  1126. vllm/model_executor/models/solar.py +506 -0
  1127. vllm/model_executor/models/stablelm.py +344 -0
  1128. vllm/model_executor/models/starcoder2.py +357 -0
  1129. vllm/model_executor/models/step3_text.py +521 -0
  1130. vllm/model_executor/models/step3_vl.py +1091 -0
  1131. vllm/model_executor/models/swin.py +475 -0
  1132. vllm/model_executor/models/tarsier.py +649 -0
  1133. vllm/model_executor/models/telechat2.py +151 -0
  1134. vllm/model_executor/models/teleflm.py +79 -0
  1135. vllm/model_executor/models/terratorch.py +294 -0
  1136. vllm/model_executor/models/transformers.py +883 -0
  1137. vllm/model_executor/models/ultravox.py +667 -0
  1138. vllm/model_executor/models/utils.py +770 -0
  1139. vllm/model_executor/models/vision.py +125 -0
  1140. vllm/model_executor/models/voxtral.py +789 -0
  1141. vllm/model_executor/models/whisper.py +966 -0
  1142. vllm/model_executor/models/zamba2.py +1056 -0
  1143. vllm/model_executor/parameter.py +599 -0
  1144. vllm/model_executor/sampling_metadata.py +597 -0
  1145. vllm/model_executor/utils.py +97 -0
  1146. vllm/model_executor/warmup/__init__.py +0 -0
  1147. vllm/model_executor/warmup/deep_gemm_warmup.py +223 -0
  1148. vllm/model_executor/warmup/kernel_warmup.py +83 -0
  1149. vllm/multimodal/__init__.py +35 -0
  1150. vllm/multimodal/audio.py +116 -0
  1151. vllm/multimodal/base.py +219 -0
  1152. vllm/multimodal/cache.py +507 -0
  1153. vllm/multimodal/hasher.py +110 -0
  1154. vllm/multimodal/image.py +130 -0
  1155. vllm/multimodal/inputs.py +979 -0
  1156. vllm/multimodal/parse.py +496 -0
  1157. vllm/multimodal/processing.py +1921 -0
  1158. vllm/multimodal/profiling.py +313 -0
  1159. vllm/multimodal/registry.py +375 -0
  1160. vllm/multimodal/utils.py +754 -0
  1161. vllm/multimodal/video.py +312 -0
  1162. vllm/outputs.py +517 -0
  1163. vllm/platforms/__init__.py +263 -0
  1164. vllm/platforms/cpu.py +353 -0
  1165. vllm/platforms/cuda.py +731 -0
  1166. vllm/platforms/interface.py +599 -0
  1167. vllm/platforms/rocm.py +504 -0
  1168. vllm/platforms/tpu.py +236 -0
  1169. vllm/platforms/xpu.py +243 -0
  1170. vllm/plugins/__init__.py +72 -0
  1171. vllm/plugins/io_processors/__init__.py +68 -0
  1172. vllm/plugins/io_processors/interface.py +67 -0
  1173. vllm/plugins/lora_resolvers/README.md +16 -0
  1174. vllm/plugins/lora_resolvers/__init__.py +0 -0
  1175. vllm/plugins/lora_resolvers/filesystem_resolver.py +50 -0
  1176. vllm/pooling_params.py +183 -0
  1177. vllm/profiler/__init__.py +0 -0
  1178. vllm/profiler/layerwise_profile.py +375 -0
  1179. vllm/profiler/utils.py +148 -0
  1180. vllm/py.typed +2 -0
  1181. vllm/ray/__init__.py +0 -0
  1182. vllm/ray/lazy_utils.py +22 -0
  1183. vllm/ray/ray_env.py +72 -0
  1184. vllm/reasoning/__init__.py +25 -0
  1185. vllm/reasoning/abs_reasoning_parsers.py +202 -0
  1186. vllm/reasoning/deepseek_r1_reasoning_parser.py +173 -0
  1187. vllm/reasoning/glm4_moe_reasoning_parser.py +151 -0
  1188. vllm/reasoning/gptoss_reasoning_parser.py +87 -0
  1189. vllm/reasoning/granite_reasoning_parser.py +363 -0
  1190. vllm/reasoning/hunyuan_a13b_reasoning_parser.py +245 -0
  1191. vllm/reasoning/mistral_reasoning_parser.py +47 -0
  1192. vllm/reasoning/qwen3_reasoning_parser.py +151 -0
  1193. vllm/reasoning/step3_reasoning_parser.py +109 -0
  1194. vllm/sampling_params.py +577 -0
  1195. vllm/scalar_type.py +349 -0
  1196. vllm/scripts.py +15 -0
  1197. vllm/sequence.py +1465 -0
  1198. vllm/tasks.py +11 -0
  1199. vllm/test_utils.py +130 -0
  1200. vllm/third_party/__init__.py +0 -0
  1201. vllm/third_party/pynvml.py +6140 -0
  1202. vllm/tracing.py +136 -0
  1203. vllm/transformers_utils/__init__.py +24 -0
  1204. vllm/transformers_utils/chat_templates/__init__.py +5 -0
  1205. vllm/transformers_utils/chat_templates/registry.py +71 -0
  1206. vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
  1207. vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
  1208. vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
  1209. vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
  1210. vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
  1211. vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
  1212. vllm/transformers_utils/config.py +1043 -0
  1213. vllm/transformers_utils/config_parser_base.py +20 -0
  1214. vllm/transformers_utils/configs/__init__.py +55 -0
  1215. vllm/transformers_utils/configs/arctic.py +207 -0
  1216. vllm/transformers_utils/configs/chatglm.py +72 -0
  1217. vllm/transformers_utils/configs/deepseek_vl2.py +216 -0
  1218. vllm/transformers_utils/configs/eagle.py +84 -0
  1219. vllm/transformers_utils/configs/falcon.py +90 -0
  1220. vllm/transformers_utils/configs/jais.py +238 -0
  1221. vllm/transformers_utils/configs/kimi_vl.py +37 -0
  1222. vllm/transformers_utils/configs/medusa.py +63 -0
  1223. vllm/transformers_utils/configs/midashenglm.py +101 -0
  1224. vllm/transformers_utils/configs/mistral.py +165 -0
  1225. vllm/transformers_utils/configs/mlp_speculator.py +68 -0
  1226. vllm/transformers_utils/configs/moonvit.py +33 -0
  1227. vllm/transformers_utils/configs/nemotron.py +205 -0
  1228. vllm/transformers_utils/configs/nemotron_h.py +259 -0
  1229. vllm/transformers_utils/configs/nemotron_vl.py +56 -0
  1230. vllm/transformers_utils/configs/ovis.py +176 -0
  1231. vllm/transformers_utils/configs/qwen3_next.py +275 -0
  1232. vllm/transformers_utils/configs/speculators/__init__.py +2 -0
  1233. vllm/transformers_utils/configs/speculators/algos.py +32 -0
  1234. vllm/transformers_utils/configs/speculators/base.py +91 -0
  1235. vllm/transformers_utils/configs/step3_vl.py +123 -0
  1236. vllm/transformers_utils/configs/ultravox.py +120 -0
  1237. vllm/transformers_utils/detokenizer.py +169 -0
  1238. vllm/transformers_utils/detokenizer_utils.py +199 -0
  1239. vllm/transformers_utils/dynamic_module.py +60 -0
  1240. vllm/transformers_utils/processor.py +245 -0
  1241. vllm/transformers_utils/processors/__init__.py +16 -0
  1242. vllm/transformers_utils/processors/deepseek_vl2.py +363 -0
  1243. vllm/transformers_utils/processors/ovis.py +420 -0
  1244. vllm/transformers_utils/processors/ovis2_5.py +458 -0
  1245. vllm/transformers_utils/runai_utils.py +99 -0
  1246. vllm/transformers_utils/s3_utils.py +90 -0
  1247. vllm/transformers_utils/tokenizer.py +293 -0
  1248. vllm/transformers_utils/tokenizer_base.py +149 -0
  1249. vllm/transformers_utils/tokenizer_group.py +132 -0
  1250. vllm/transformers_utils/tokenizers/__init__.py +10 -0
  1251. vllm/transformers_utils/tokenizers/mistral.py +520 -0
  1252. vllm/transformers_utils/utils.py +99 -0
  1253. vllm/triton_utils/__init__.py +16 -0
  1254. vllm/triton_utils/importing.py +95 -0
  1255. vllm/usage/__init__.py +0 -0
  1256. vllm/usage/usage_lib.py +259 -0
  1257. vllm/utils/__init__.py +3438 -0
  1258. vllm/utils/deep_gemm.py +212 -0
  1259. vllm/utils/flashinfer.py +372 -0
  1260. vllm/utils/jsontree.py +90 -0
  1261. vllm/utils/tensor_schema.py +236 -0
  1262. vllm/v1/__init__.py +0 -0
  1263. vllm/v1/attention/__init__.py +0 -0
  1264. vllm/v1/attention/backends/__init__.py +0 -0
  1265. vllm/v1/attention/backends/cpu_attn.py +922 -0
  1266. vllm/v1/attention/backends/flash_attn.py +800 -0
  1267. vllm/v1/attention/backends/flashinfer.py +1128 -0
  1268. vllm/v1/attention/backends/flex_attention.py +796 -0
  1269. vllm/v1/attention/backends/gdn_attn.py +320 -0
  1270. vllm/v1/attention/backends/linear_attn.py +68 -0
  1271. vllm/v1/attention/backends/mamba1_attn.py +81 -0
  1272. vllm/v1/attention/backends/mamba2_attn.py +224 -0
  1273. vllm/v1/attention/backends/mamba_attn.py +52 -0
  1274. vllm/v1/attention/backends/mla/__init__.py +0 -0
  1275. vllm/v1/attention/backends/mla/common.py +1608 -0
  1276. vllm/v1/attention/backends/mla/cutlass_mla.py +301 -0
  1277. vllm/v1/attention/backends/mla/flashattn_mla.py +273 -0
  1278. vllm/v1/attention/backends/mla/flashinfer_mla.py +110 -0
  1279. vllm/v1/attention/backends/mla/flashmla.py +213 -0
  1280. vllm/v1/attention/backends/mla/rocm_aiter_mla.py +255 -0
  1281. vllm/v1/attention/backends/mla/triton_mla.py +175 -0
  1282. vllm/v1/attention/backends/pallas.py +413 -0
  1283. vllm/v1/attention/backends/rocm_aiter_fa.py +548 -0
  1284. vllm/v1/attention/backends/short_conv_attn.py +82 -0
  1285. vllm/v1/attention/backends/tree_attn.py +450 -0
  1286. vllm/v1/attention/backends/triton_attn.py +430 -0
  1287. vllm/v1/attention/backends/utils.py +834 -0
  1288. vllm/v1/attention/backends/xformers.py +437 -0
  1289. vllm/v1/core/__init__.py +0 -0
  1290. vllm/v1/core/block_pool.py +330 -0
  1291. vllm/v1/core/encoder_cache_manager.py +333 -0
  1292. vllm/v1/core/kv_cache_coordinator.py +440 -0
  1293. vllm/v1/core/kv_cache_manager.py +398 -0
  1294. vllm/v1/core/kv_cache_utils.py +1169 -0
  1295. vllm/v1/core/sched/__init__.py +0 -0
  1296. vllm/v1/core/sched/async_scheduler.py +47 -0
  1297. vllm/v1/core/sched/interface.py +158 -0
  1298. vllm/v1/core/sched/output.py +162 -0
  1299. vllm/v1/core/sched/request_queue.py +224 -0
  1300. vllm/v1/core/sched/scheduler.py +1287 -0
  1301. vllm/v1/core/sched/utils.py +69 -0
  1302. vllm/v1/core/single_type_kv_cache_manager.py +670 -0
  1303. vllm/v1/cudagraph_dispatcher.py +121 -0
  1304. vllm/v1/engine/__init__.py +202 -0
  1305. vllm/v1/engine/async_llm.py +757 -0
  1306. vllm/v1/engine/coordinator.py +357 -0
  1307. vllm/v1/engine/core.py +1245 -0
  1308. vllm/v1/engine/core_client.py +1333 -0
  1309. vllm/v1/engine/detokenizer.py +300 -0
  1310. vllm/v1/engine/exceptions.py +17 -0
  1311. vllm/v1/engine/llm_engine.py +332 -0
  1312. vllm/v1/engine/logprobs.py +201 -0
  1313. vllm/v1/engine/output_processor.py +558 -0
  1314. vllm/v1/engine/parallel_sampling.py +133 -0
  1315. vllm/v1/engine/processor.py +524 -0
  1316. vllm/v1/engine/utils.py +857 -0
  1317. vllm/v1/executor/__init__.py +0 -0
  1318. vllm/v1/executor/abstract.py +126 -0
  1319. vllm/v1/executor/multiproc_executor.py +683 -0
  1320. vllm/v1/executor/ray_distributed_executor.py +109 -0
  1321. vllm/v1/kv_cache_interface.py +275 -0
  1322. vllm/v1/metrics/__init__.py +0 -0
  1323. vllm/v1/metrics/loggers.py +717 -0
  1324. vllm/v1/metrics/prometheus.py +82 -0
  1325. vllm/v1/metrics/ray_wrappers.py +133 -0
  1326. vllm/v1/metrics/reader.py +246 -0
  1327. vllm/v1/metrics/stats.py +248 -0
  1328. vllm/v1/outputs.py +147 -0
  1329. vllm/v1/pool/__init__.py +0 -0
  1330. vllm/v1/pool/metadata.py +77 -0
  1331. vllm/v1/request.py +237 -0
  1332. vllm/v1/sample/__init__.py +0 -0
  1333. vllm/v1/sample/logits_processor/__init__.py +294 -0
  1334. vllm/v1/sample/logits_processor/builtin.py +273 -0
  1335. vllm/v1/sample/logits_processor/interface.py +97 -0
  1336. vllm/v1/sample/logits_processor/state.py +161 -0
  1337. vllm/v1/sample/metadata.py +43 -0
  1338. vllm/v1/sample/ops/__init__.py +0 -0
  1339. vllm/v1/sample/ops/bad_words.py +39 -0
  1340. vllm/v1/sample/ops/logprobs.py +26 -0
  1341. vllm/v1/sample/ops/penalties.py +43 -0
  1342. vllm/v1/sample/ops/topk_topp_sampler.py +254 -0
  1343. vllm/v1/sample/rejection_sampler.py +623 -0
  1344. vllm/v1/sample/sampler.py +281 -0
  1345. vllm/v1/sample/tpu/__init__.py +0 -0
  1346. vllm/v1/sample/tpu/metadata.py +124 -0
  1347. vllm/v1/sample/tpu/sampler.py +213 -0
  1348. vllm/v1/serial_utils.py +395 -0
  1349. vllm/v1/spec_decode/__init__.py +0 -0
  1350. vllm/v1/spec_decode/eagle.py +740 -0
  1351. vllm/v1/spec_decode/medusa.py +66 -0
  1352. vllm/v1/spec_decode/metadata.py +62 -0
  1353. vllm/v1/spec_decode/metrics.py +191 -0
  1354. vllm/v1/spec_decode/ngram_proposer.py +157 -0
  1355. vllm/v1/spec_decode/utils.py +14 -0
  1356. vllm/v1/structured_output/__init__.py +297 -0
  1357. vllm/v1/structured_output/backend_guidance.py +245 -0
  1358. vllm/v1/structured_output/backend_lm_format_enforcer.py +167 -0
  1359. vllm/v1/structured_output/backend_outlines.py +320 -0
  1360. vllm/v1/structured_output/backend_types.py +134 -0
  1361. vllm/v1/structured_output/backend_xgrammar.py +323 -0
  1362. vllm/v1/structured_output/request.py +86 -0
  1363. vllm/v1/structured_output/utils.py +373 -0
  1364. vllm/v1/utils.py +382 -0
  1365. vllm/v1/worker/__init__.py +0 -0
  1366. vllm/v1/worker/block_table.py +221 -0
  1367. vllm/v1/worker/cpu_model_runner.py +163 -0
  1368. vllm/v1/worker/cpu_worker.py +183 -0
  1369. vllm/v1/worker/gpu_input_batch.py +821 -0
  1370. vllm/v1/worker/gpu_model_runner.py +3743 -0
  1371. vllm/v1/worker/gpu_worker.py +697 -0
  1372. vllm/v1/worker/kv_connector_model_runner_mixin.py +122 -0
  1373. vllm/v1/worker/lora_model_runner_mixin.py +192 -0
  1374. vllm/v1/worker/tpu_input_batch.py +585 -0
  1375. vllm/v1/worker/tpu_model_runner.py +1947 -0
  1376. vllm/v1/worker/tpu_worker.py +340 -0
  1377. vllm/v1/worker/utils.py +290 -0
  1378. vllm/v1/worker/worker_base.py +65 -0
  1379. vllm/v1/worker/xpu_model_runner.py +53 -0
  1380. vllm/v1/worker/xpu_worker.py +179 -0
  1381. vllm/version.py +41 -0
  1382. vllm/vllm_flash_attn/.gitkeep +0 -0
  1383. vllm/worker/__init__.py +0 -0
  1384. vllm/worker/cache_engine.py +145 -0
  1385. vllm/worker/enc_dec_model_runner.py +553 -0
  1386. vllm/worker/model_runner.py +2016 -0
  1387. vllm/worker/model_runner_base.py +307 -0
  1388. vllm/worker/utils.py +49 -0
  1389. vllm/worker/worker.py +670 -0
  1390. vllm/worker/worker_base.py +651 -0
  1391. vllm_cpu_avx512vnni-0.10.2.post2.dist-info/METADATA +326 -0
  1392. vllm_cpu_avx512vnni-0.10.2.post2.dist-info/RECORD +1395 -0
  1393. vllm_cpu_avx512vnni-0.10.2.post2.dist-info/WHEEL +5 -0
  1394. vllm_cpu_avx512vnni-0.10.2.post2.dist-info/entry_points.txt +5 -0
  1395. vllm_cpu_avx512vnni-0.10.2.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1548 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
+
4
+ from typing import TYPE_CHECKING, Any, Callable, Optional, Union
5
+
6
+ import torch
7
+ from torch.nn import Module
8
+ from torch.nn.parameter import Parameter
9
+
10
+ import vllm.envs as envs
11
+ import vllm.model_executor.layers.fused_moe.modular_kernel as mk
12
+ from vllm._custom_ops import cutlass_scaled_fp4_mm, scaled_fp4_quant
13
+ from vllm.logger import init_logger
14
+ from vllm.model_executor.layers.fused_moe.config import FusedMoEConfig
15
+ from vllm.model_executor.layers.fused_moe.flashinfer_cutlass_moe import (
16
+ is_valid_flashinfer_cutlass_fused_moe)
17
+ from vllm.model_executor.layers.fused_moe.layer import (
18
+ FusedMoE, FusedMoEMethodBase, FusedMoeWeightScaleSupported)
19
+ from vllm.model_executor.layers.linear import (LinearBase, LinearMethodBase,
20
+ UnquantizedLinearMethod)
21
+ from vllm.model_executor.layers.quantization import QuantizationMethods
22
+ from vllm.model_executor.layers.quantization.base_config import (
23
+ QuantizationConfig, QuantizeMethodBase)
24
+ from vllm.model_executor.layers.quantization.kv_cache import BaseKVCacheMethod
25
+ from vllm.model_executor.layers.quantization.utils.flashinfer_fp4_moe import (
26
+ build_flashinfer_fp4_cutlass_moe_prepare_finalize, reorder_w1w3_to_w3w1,
27
+ select_nvfp4_gemm_impl)
28
+ from vllm.model_executor.layers.quantization.utils.flashinfer_utils import (
29
+ FlashinferMoeBackend, apply_flashinfer_per_tensor_scale_fp8,
30
+ build_flashinfer_fp8_cutlass_moe_prepare_finalize,
31
+ flashinfer_cutlass_moe_fp8, get_flashinfer_moe_backend,
32
+ register_moe_scaling_factors, rotate_flashinfer_fp8_moe_weights,
33
+ select_cutlass_fp8_gemm_impl, swap_w13_to_w31)
34
+ from vllm.model_executor.layers.quantization.utils.marlin_utils_fp4 import (
35
+ apply_fp4_marlin_linear, is_fp4_marlin_supported,
36
+ prepare_fp4_layer_for_marlin, prepare_moe_fp4_layer_for_marlin)
37
+ from vllm.model_executor.layers.quantization.utils.quant_utils import (
38
+ GroupShape, cutlass_fp4_supported, is_layer_skipped, swizzle_blockscale)
39
+ from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
40
+ Fp8LinearOp, requantize_with_max_scale)
41
+ from vllm.model_executor.parameter import (ModelWeightParameter,
42
+ PerTensorScaleParameter)
43
+ from vllm.scalar_type import scalar_types
44
+ from vllm.utils import next_power_of_2
45
+ from vllm.utils.flashinfer import (flashinfer_scaled_fp4_mm, has_flashinfer,
46
+ has_flashinfer_moe)
47
+
48
+ if TYPE_CHECKING:
49
+ from vllm.model_executor.models.utils import WeightsMapper
50
+
51
+ logger = init_logger(__name__)
52
+
53
+ QUANT_ALGOS = ["FP8", "NVFP4"]
54
+ KV_CACHE_QUANT_ALGOS = ["FP8"]
55
+
56
+
57
+ class ModelOptFp8Config(QuantizationConfig):
58
+ """Config class for ModelOpt FP8."""
59
+
60
+ def __init__(
61
+ self,
62
+ is_checkpoint_fp8_serialized: bool = False,
63
+ kv_cache_quant_method: Optional[str] = None,
64
+ exclude_modules: Optional[list[str]] = None,
65
+ ) -> None:
66
+ super().__init__()
67
+ self.is_checkpoint_fp8_serialized = is_checkpoint_fp8_serialized
68
+ self.kv_cache_quant_method = kv_cache_quant_method
69
+ self.exclude_modules = exclude_modules or []
70
+ if is_checkpoint_fp8_serialized:
71
+ logger.warning("Detected ModelOpt fp8 checkpoint. Please note that"
72
+ " the format is experimental and could change.")
73
+
74
+ @classmethod
75
+ def get_name(cls) -> QuantizationMethods:
76
+ return "modelopt"
77
+
78
+ @classmethod
79
+ def get_supported_act_dtypes(cls) -> list[torch.dtype]:
80
+ return [torch.bfloat16, torch.half]
81
+
82
+ @classmethod
83
+ def get_min_capability(cls) -> int:
84
+ return 89
85
+
86
+ @classmethod
87
+ def get_config_filenames(cls) -> list[str]:
88
+ return ["hf_quant_config.json"]
89
+
90
+ def apply_vllm_mapper(self, hf_to_vllm_mapper: "WeightsMapper"):
91
+ if self.exclude_modules is not None:
92
+ self.exclude_modules = hf_to_vllm_mapper.apply_list(
93
+ self.exclude_modules)
94
+
95
+ @classmethod
96
+ def override_quantization_method(
97
+ cls, hf_quant_cfg, user_quant) -> Optional[QuantizationMethods]:
98
+ """Detect if this ModelOpt config should be used based on
99
+ quantization config."""
100
+
101
+ if hf_quant_cfg is None:
102
+ return None
103
+
104
+ # Use the community standard 'quant_method'
105
+ quant_method = hf_quant_cfg.get("quant_method", "").lower()
106
+
107
+ # Only proceed if the method is explicitly "modelopt"
108
+ if quant_method != "modelopt":
109
+ return None
110
+
111
+ # Look for ModelOpt-specific config structure
112
+ if "quantization" in hf_quant_cfg:
113
+ quant_config = hf_quant_cfg["quantization"]
114
+ if isinstance(quant_config, dict):
115
+ quant_algo = quant_config.get("quant_algo", "")
116
+ if "FP8" in quant_algo:
117
+ return "modelopt"
118
+ else:
119
+ # Check for compressed-tensors style config with specific quant_algo
120
+ quant_algo = hf_quant_cfg.get("quant_algo", "")
121
+ if isinstance(quant_algo, str) and "FP8" in quant_algo:
122
+ return "modelopt"
123
+
124
+ return None
125
+
126
+ @classmethod
127
+ def from_config(cls, config: dict[str, Any]) -> "ModelOptFp8Config":
128
+ # Handle both ModelOpt format and compressed-tensors style format
129
+ if "quantization" in config:
130
+ # ModelOpt format: {"quantization": {"quant_algo": "..."}}
131
+ quant_config = cls.get_from_keys(config, ["quantization"])
132
+ if not isinstance(quant_config, dict):
133
+ raise ValueError(
134
+ "Expected 'quantization' to be a dictionary in config")
135
+ quant_method = quant_config.get("quant_algo", "")
136
+ if not quant_method:
137
+ raise ValueError("Missing 'quant_algo' in quantization config")
138
+ kv_cache_quant_method = quant_config.get("kv_cache_quant_algo")
139
+ exclude_modules = quant_config.get("exclude_modules")
140
+ else:
141
+ # Compressed-tensors style format:
142
+ # {"quant_algo": "...", "quant_method": "modelopt"}
143
+ quant_method = config.get("quant_algo", "")
144
+ kv_cache_quant_method = config.get("kv_cache_quant_algo")
145
+ exclude_modules = config.get("exclude_modules")
146
+
147
+ if quant_method not in QUANT_ALGOS:
148
+ raise ValueError(
149
+ f"ModelOpt currently only supports: {QUANT_ALGOS} "
150
+ "quantizations in vLLM. Please check the "
151
+ "`hf_quant_config.json` file for your model's "
152
+ "quant configuration.")
153
+ is_checkpoint_fp8_serialized = ("FP8" in quant_method)
154
+
155
+ return cls(is_checkpoint_fp8_serialized, kv_cache_quant_method,
156
+ exclude_modules)
157
+
158
+ def is_layer_excluded(self, prefix: str) -> bool:
159
+ """
160
+ Check if a layer should be excluded from quantization.
161
+
162
+ This method handles both regular models and multimodal models that use
163
+ the language_model prefix. For multimodal models, it checks if the
164
+ module name (without the language_model prefix) is in the exclude list.
165
+ """
166
+ if self.exclude_modules is None:
167
+ return False
168
+
169
+ # Check if any excluded module matches the prefix
170
+ for module in self.exclude_modules:
171
+ if (module in prefix
172
+ or (prefix.startswith("language_model.")
173
+ and module in prefix.removeprefix("language_model."))):
174
+ return True
175
+ return False
176
+
177
+ def get_quant_method(self, layer: torch.nn.Module,
178
+ prefix: str) -> Optional["QuantizeMethodBase"]:
179
+ from vllm.attention.layer import Attention # Avoid circular import
180
+ if isinstance(layer, LinearBase):
181
+ if (is_layer_skipped(prefix, self.exclude_modules,
182
+ self.packed_modules_mapping)
183
+ or self.is_layer_excluded(prefix)):
184
+ return UnquantizedLinearMethod()
185
+ return ModelOptFp8LinearMethod(self)
186
+ elif isinstance(layer, Attention):
187
+ return ModelOptFp8KVCacheMethod(self)
188
+ elif isinstance(layer, FusedMoE):
189
+ return ModelOptFp8MoEMethod(self, layer)
190
+ return None
191
+
192
+
193
+ class ModelOptFp8LinearMethod(LinearMethodBase):
194
+ """Linear method for Model Optimizer static quantization.
195
+ Supports loading FP8 checkpoints with static weight scale and
196
+ activation scale. Future support might be added for dynamic
197
+ scales.
198
+
199
+ Limitations:
200
+ 1. Only support per-tensor quantization due to torch._scaled_mm support.
201
+ 2. Only support float8_e4m3fn datatype
202
+ Args: quant_config: The ModelOpt quantization config.
203
+ """
204
+
205
+ def __init__(self, quant_config: ModelOptFp8Config) -> None:
206
+ self.quant_config = quant_config
207
+ self.fp8_linear = Fp8LinearOp(
208
+ act_quant_static=True, act_quant_group_shape=GroupShape.PER_TENSOR)
209
+
210
+ def create_weights(
211
+ self,
212
+ layer: torch.nn.Module,
213
+ input_size_per_partition: int,
214
+ output_partition_sizes: list[int],
215
+ input_size: int,
216
+ output_size: int,
217
+ params_dtype: torch.dtype,
218
+ **extra_weight_attrs,
219
+ ):
220
+ del input_size, output_size
221
+ output_size_per_partition = sum(output_partition_sizes)
222
+ weight_loader = extra_weight_attrs.get("weight_loader")
223
+ layer.logical_widths = output_partition_sizes
224
+ layer.input_size_per_partition = input_size_per_partition
225
+ layer.output_size_per_partition = output_size_per_partition
226
+ weight_dtype = (torch.float8_e4m3fn
227
+ if self.quant_config.is_checkpoint_fp8_serialized else
228
+ params_dtype)
229
+ weight = ModelWeightParameter(data=torch.empty(
230
+ output_size_per_partition,
231
+ input_size_per_partition,
232
+ dtype=weight_dtype),
233
+ input_dim=1,
234
+ output_dim=0,
235
+ weight_loader=weight_loader)
236
+ layer.register_parameter("weight", weight)
237
+
238
+ if self.quant_config.is_checkpoint_fp8_serialized:
239
+ # WEIGHT SCALE
240
+ weight_scale = PerTensorScaleParameter(data=torch.empty(
241
+ len(output_partition_sizes), dtype=torch.float32),
242
+ weight_loader=weight_loader)
243
+ weight_scale[:] = torch.finfo(torch.float32).min
244
+ layer.register_parameter("weight_scale", weight_scale)
245
+ # INPUT SCALE
246
+ scale = PerTensorScaleParameter(data=torch.empty(
247
+ len(output_partition_sizes), dtype=torch.float32),
248
+ weight_loader=weight_loader)
249
+
250
+ scale[:] = torch.finfo(torch.float32).min
251
+ layer.register_parameter("input_scale", scale)
252
+
253
+ def process_weights_after_loading(self, layer: Module) -> None:
254
+ weight = layer.weight
255
+ max_w_scale = layer.weight_scale.max()
256
+ if not (layer.weight_scale == layer.weight_scale[0]).all():
257
+ max_w_scale, weight = requantize_with_max_scale(
258
+ layer.weight, layer.weight_scale, layer.logical_widths)
259
+ layer.weight = Parameter(weight.t(), requires_grad=False)
260
+ layer.weight_scale = Parameter(max_w_scale, requires_grad=False)
261
+ layer.input_scale = Parameter(layer.input_scale.max(),
262
+ requires_grad=False)
263
+
264
+ def apply(
265
+ self,
266
+ layer: torch.nn.Module,
267
+ x: torch.Tensor,
268
+ bias: Optional[torch.Tensor] = None,
269
+ ) -> torch.Tensor:
270
+ return self.fp8_linear.apply(input=x,
271
+ weight=layer.weight,
272
+ weight_scale=layer.weight_scale,
273
+ input_scale=layer.input_scale,
274
+ bias=bias)
275
+
276
+
277
+ class ModelOptFp8MoEMethod(FusedMoEMethodBase):
278
+ """MoE method for ModelOpt FP8.
279
+ Supports loading FP8 checkpoints with static weight scale and
280
+ activation scale.
281
+ Args:
282
+ quant_config: The ModelOpt quantization config.
283
+ """
284
+
285
+ def __init__(
286
+ self,
287
+ quant_config: ModelOptFp8Config,
288
+ layer: torch.nn.Module,
289
+ ) -> None:
290
+ super().__init__(layer.moe_config)
291
+ self.layer = layer
292
+ self.quant_config = quant_config
293
+ from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
294
+ cutlass_fp8_supported)
295
+ self.cutlass_fp8_supported = cutlass_fp8_supported()
296
+ self.flashinfer_moe_backend: Optional[FlashinferMoeBackend] = None
297
+ self.fused_experts: Optional[
298
+ mk.FusedMoEModularKernel] = None # type: ignore
299
+ if envs.VLLM_USE_FLASHINFER_MOE_FP8 and has_flashinfer_moe():
300
+ self.flashinfer_moe_backend = get_flashinfer_moe_backend()
301
+ logger.info_once(
302
+ f"Using FlashInfer {self.flashinfer_moe_backend.value} kernels"
303
+ )
304
+
305
+ def maybe_make_prepare_finalize(
306
+ self,
307
+ moe: FusedMoEConfig,
308
+ ) -> Optional[mk.FusedMoEPrepareAndFinalize]:
309
+ if self.fused_experts is not None or \
310
+ self.flashinfer_moe_backend != FlashinferMoeBackend.CUTLASS:
311
+ return super().maybe_make_prepare_finalize(moe)
312
+
313
+ prepare_finalize = build_flashinfer_fp8_cutlass_moe_prepare_finalize(
314
+ moe,
315
+ layer=self.layer,
316
+ )
317
+ logger.debug_once("%s", prepare_finalize.__class__.__name__)
318
+ return prepare_finalize
319
+
320
+ def select_gemm_impl(
321
+ self,
322
+ prepare_finalize: mk.FusedMoEPrepareAndFinalize,
323
+ moe: FusedMoEConfig,
324
+ layer: torch.nn.Module,
325
+ ) -> mk.FusedMoEPermuteExpertsUnpermute:
326
+ experts = select_cutlass_fp8_gemm_impl(
327
+ moe,
328
+ self.layer,
329
+ )
330
+ logger.debug_once("Using %s", experts.__class__.__name__)
331
+ return experts
332
+
333
+ def create_weights(
334
+ self,
335
+ layer: torch.nn.Module,
336
+ num_experts: int,
337
+ hidden_size: int,
338
+ intermediate_size_per_partition: int,
339
+ params_dtype: torch.dtype,
340
+ **extra_weight_attrs,
341
+ ):
342
+
343
+ # Use FP8 dtype if checkpoint is serialized
344
+ weight_dtype = (torch.float8_e4m3fn
345
+ if self.quant_config.is_checkpoint_fp8_serialized else
346
+ params_dtype)
347
+ weight_loader = extra_weight_attrs.get("weight_loader")
348
+
349
+ w13_weight = ModelWeightParameter(
350
+ data=torch.empty(num_experts,
351
+ 2 * intermediate_size_per_partition,
352
+ hidden_size,
353
+ dtype=weight_dtype),
354
+ input_dim=2,
355
+ output_dim=1,
356
+ weight_loader=weight_loader,
357
+ )
358
+ layer.register_parameter("w13_weight", w13_weight)
359
+
360
+ w2_weight = ModelWeightParameter(
361
+ data=torch.empty(num_experts,
362
+ hidden_size,
363
+ intermediate_size_per_partition,
364
+ dtype=weight_dtype),
365
+ input_dim=2,
366
+ output_dim=1,
367
+ weight_loader=weight_loader,
368
+ )
369
+ layer.register_parameter("w2_weight", w2_weight)
370
+
371
+ if self.quant_config.is_checkpoint_fp8_serialized:
372
+ # WEIGHT SCALES - Per-tensor scaling for ModelOpts
373
+ # Allocate 2 scales for w1 and w3 respectively.
374
+ # They will be combined to a single scale after weight loading.
375
+ w13_weight_scale = PerTensorScaleParameter(
376
+ data=torch.full(
377
+ (num_experts, 2),
378
+ 1.0,
379
+ dtype=torch.float32,
380
+ ),
381
+ weight_loader=weight_loader,
382
+ )
383
+ w2_weight_scale = PerTensorScaleParameter(
384
+ data=torch.full((num_experts, ), 1.0, dtype=torch.float32),
385
+ weight_loader=weight_loader,
386
+ )
387
+ layer.register_parameter("w13_weight_scale", w13_weight_scale)
388
+ layer.register_parameter("w2_weight_scale", w2_weight_scale)
389
+
390
+ # Set weight loader attributes for scales
391
+ extra_weight_attrs.update(
392
+ {"quant_method": FusedMoeWeightScaleSupported.TENSOR.value})
393
+
394
+ # INPUT SCALES - Per-tensor scaling for ModelOpt
395
+ w13_input_scale = PerTensorScaleParameter(
396
+ data=torch.full((num_experts, ), 1.0, dtype=torch.float32),
397
+ weight_loader=weight_loader,
398
+ )
399
+ w2_input_scale = PerTensorScaleParameter(
400
+ data=torch.full((num_experts, ), 1.0, dtype=torch.float32),
401
+ weight_loader=weight_loader,
402
+ )
403
+ layer.register_parameter("w13_input_scale", w13_input_scale)
404
+ layer.register_parameter("w2_input_scale", w2_input_scale)
405
+
406
+ def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
407
+ """Process FP8 MoE weights after loading from serialized checkpoint.
408
+ Only supports pre-quantized checkpoints with FP8 weights and scales.
409
+ """
410
+
411
+ layer.w13_weight = Parameter(layer.w13_weight.data,
412
+ requires_grad=False)
413
+ layer.w2_weight = Parameter(layer.w2_weight.data, requires_grad=False)
414
+
415
+ from vllm._custom_ops import scaled_fp8_quant
416
+ from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
417
+ per_tensor_dequantize)
418
+
419
+ # Handle scale parameters
420
+ if hasattr(layer,
421
+ "w13_weight_scale") and layer.w13_weight_scale is not None:
422
+ # Fp8 moe kernel needs single weight scale for w13 per expert.
423
+ # We take the max of the w1 and w3 scales
424
+ # then dequant and requant each expert.
425
+ if layer.w13_weight_scale.dim() == 2:
426
+
427
+ # Get the maximum scale across w1 and w3 for each expert
428
+ max_w13_scales = layer.w13_weight_scale.max(dim=1).values
429
+
430
+ # Requantize each expert's weights using the combined scale
431
+ # w13_weight (num_experts, 2 * intermediate_size, hidden_size)
432
+ # where the first intermediate_size rows are w1, the next are w3
433
+ intermediate_size = layer.w13_weight.shape[1] // 2
434
+ for expert_id in range(layer.w13_weight.shape[0]):
435
+ start = 0
436
+ for shard_id in range(2): # w1 and w3
437
+ # Dequantize using the original scale for this shard
438
+ dq_weight = per_tensor_dequantize(
439
+ layer.w13_weight[expert_id][start:start +
440
+ intermediate_size, :],
441
+ layer.w13_weight_scale[expert_id][shard_id],
442
+ )
443
+ # Requantize using the combined max scale
444
+
445
+ (
446
+ layer.w13_weight[expert_id][start:start +
447
+ intermediate_size, :],
448
+ _,
449
+ ) = scaled_fp8_quant(dq_weight,
450
+ max_w13_scales[expert_id])
451
+
452
+ start += intermediate_size
453
+
454
+ # Update the scale parameter to be per-expert
455
+ layer.w13_weight_scale = Parameter(max_w13_scales,
456
+ requires_grad=False)
457
+ else:
458
+ layer.w13_weight_scale = Parameter(layer.w13_weight_scale.data,
459
+ requires_grad=False)
460
+
461
+ if hasattr(layer,
462
+ "w2_weight_scale") and layer.w2_weight_scale is not None:
463
+ layer.w2_weight_scale = Parameter(layer.w2_weight_scale.data,
464
+ requires_grad=False)
465
+ # Input scales must be equal for each expert in fp8 MoE layers.
466
+ if hasattr(layer,
467
+ "w13_input_scale") and layer.w13_input_scale is not None:
468
+ layer.w13_input_scale = Parameter(layer.w13_input_scale.max(),
469
+ requires_grad=False)
470
+ if hasattr(layer,
471
+ "w2_input_scale") and layer.w2_input_scale is not None:
472
+ layer.w2_input_scale = Parameter(layer.w2_input_scale.max(),
473
+ requires_grad=False)
474
+
475
+ if self.flashinfer_moe_backend is not None:
476
+ layer.w13_weight.data = swap_w13_to_w31(layer.w13_weight.data)
477
+ register_moe_scaling_factors(layer)
478
+ if self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
479
+ rotate_flashinfer_fp8_moe_weights(layer.w13_weight,
480
+ layer.w2_weight)
481
+
482
+ def apply(
483
+ self,
484
+ layer: torch.nn.Module,
485
+ x: torch.Tensor,
486
+ router_logits: torch.Tensor,
487
+ top_k: int,
488
+ renormalize: bool,
489
+ use_grouped_topk: bool = False,
490
+ topk_group: Optional[int] = None,
491
+ num_expert_group: Optional[int] = None,
492
+ global_num_experts: int = -1,
493
+ expert_map: Optional[torch.Tensor] = None,
494
+ custom_routing_function: Optional[Callable] = None,
495
+ scoring_func: str = "softmax",
496
+ routed_scaling_factor: float = 1.0,
497
+ e_score_correction_bias: Optional[torch.Tensor] = None,
498
+ apply_router_weight_on_input: bool = False,
499
+ activation: str = "silu",
500
+ enable_eplb: bool = False,
501
+ expert_load_view: Optional[torch.Tensor] = None,
502
+ logical_to_physical_map: Optional[torch.Tensor] = None,
503
+ logical_replica_count: Optional[torch.Tensor] = None,
504
+ ) -> Union[torch.Tensor, tuple[torch.Tensor, torch.Tensor]]:
505
+ if enable_eplb:
506
+ raise NotImplementedError(
507
+ "EPLB not supported for `ModelOptFp8MoEMethod` yet.")
508
+
509
+ if self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
510
+ assert activation == 'silu', (
511
+ f"Expected 'silu' activation but got {activation}")
512
+ assert not renormalize
513
+ return apply_flashinfer_per_tensor_scale_fp8(
514
+ layer=layer,
515
+ hidden_states=x,
516
+ router_logits=router_logits,
517
+ routing_bias=e_score_correction_bias,
518
+ global_num_experts=global_num_experts,
519
+ top_k=top_k,
520
+ num_expert_group=num_expert_group,
521
+ topk_group=topk_group,
522
+ apply_router_weight_on_input=apply_router_weight_on_input)
523
+
524
+ # Expert selection
525
+ topk_weights, topk_ids = FusedMoE.select_experts(
526
+ hidden_states=x,
527
+ router_logits=router_logits,
528
+ use_grouped_topk=use_grouped_topk,
529
+ top_k=top_k,
530
+ renormalize=renormalize,
531
+ topk_group=topk_group,
532
+ num_expert_group=num_expert_group,
533
+ custom_routing_function=custom_routing_function,
534
+ scoring_func=scoring_func,
535
+ routed_scaling_factor=routed_scaling_factor,
536
+ e_score_correction_bias=e_score_correction_bias,
537
+ indices_type=self.topk_indices_dtype,
538
+ )
539
+
540
+ if self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS:
541
+ assert not renormalize
542
+ assert activation == 'silu', (
543
+ f"Expected 'silu' activation but got {activation}")
544
+ if self.fused_experts is not None:
545
+ return self.fused_experts(
546
+ x,
547
+ layer.w13_weight,
548
+ layer.w2_weight,
549
+ topk_weights,
550
+ topk_ids,
551
+ inplace=False,
552
+ activation=activation,
553
+ global_num_experts=global_num_experts,
554
+ expert_map=expert_map,
555
+ apply_router_weight_on_input=apply_router_weight_on_input,
556
+ )
557
+ else:
558
+ return flashinfer_cutlass_moe_fp8(
559
+ x,
560
+ layer,
561
+ topk_weights,
562
+ topk_ids,
563
+ inplace=False,
564
+ activation=activation,
565
+ global_num_experts=global_num_experts,
566
+ expert_map=expert_map,
567
+ apply_router_weight_on_input=apply_router_weight_on_input,
568
+ )
569
+ from vllm.model_executor.layers.fused_moe.fused_moe import (
570
+ fused_experts)
571
+ return fused_experts(
572
+ x,
573
+ layer.w13_weight,
574
+ layer.w2_weight,
575
+ topk_weights=topk_weights,
576
+ topk_ids=topk_ids,
577
+ inplace=True,
578
+ activation=activation,
579
+ use_fp8_w8a8=True,
580
+ per_channel_quant=False,
581
+ global_num_experts=global_num_experts,
582
+ expert_map=expert_map,
583
+ w1_scale=layer.w13_weight_scale,
584
+ w2_scale=layer.w2_weight_scale,
585
+ a1_scale=layer.w13_input_scale,
586
+ a2_scale=layer.w2_input_scale,
587
+ apply_router_weight_on_input=apply_router_weight_on_input,
588
+ )
589
+
590
+
591
+ class ModelOptNvFp4Config(QuantizationConfig):
592
+ """Config class for ModelOpt FP4."""
593
+
594
+ def __init__(
595
+ self,
596
+ is_checkpoint_nvfp4_serialized: bool,
597
+ kv_cache_quant_algo: Optional[str],
598
+ exclude_modules: list[str],
599
+ group_size: int = 16,
600
+ ) -> None:
601
+ super().__init__()
602
+ self.is_checkpoint_nvfp4_serialized = is_checkpoint_nvfp4_serialized
603
+ if is_checkpoint_nvfp4_serialized:
604
+ logger.warning(
605
+ "Detected ModelOpt NVFP4 checkpoint. Please note that"
606
+ " the format is experimental and could change in future.")
607
+
608
+ self.group_size = group_size
609
+ self.kv_cache_quant_algo = kv_cache_quant_algo
610
+ self.exclude_modules = exclude_modules
611
+
612
+ @classmethod
613
+ def get_name(cls) -> QuantizationMethods:
614
+ return "modelopt_fp4"
615
+
616
+ @classmethod
617
+ def get_supported_act_dtypes(cls) -> list[torch.dtype]:
618
+ return [torch.bfloat16, torch.half, torch.float8_e4m3fn]
619
+
620
+ @classmethod
621
+ def get_min_capability(cls) -> int:
622
+ return 80
623
+
624
+ @classmethod
625
+ def get_config_filenames(cls) -> list[str]:
626
+ return ["hf_quant_config.json"]
627
+
628
+ def apply_vllm_mapper(self, hf_to_vllm_mapper: "WeightsMapper"):
629
+ if self.exclude_modules is not None:
630
+ self.exclude_modules = hf_to_vllm_mapper.apply_list(
631
+ self.exclude_modules)
632
+
633
+ @classmethod
634
+ def override_quantization_method(
635
+ cls, hf_quant_cfg, user_quant) -> Optional[QuantizationMethods]:
636
+ """Detect if this ModelOpt FP4 config should be used based on
637
+ quantization config."""
638
+ if hf_quant_cfg is None:
639
+ return None
640
+
641
+ # Use the community standard 'quant_method'
642
+ quant_method = hf_quant_cfg.get("quant_method", "").lower()
643
+
644
+ # Only proceed if the method is explicitly "modelopt"
645
+ if quant_method != "modelopt":
646
+ return None
647
+
648
+ # Look for ModelOpt-specific config structure
649
+ if "quantization" in hf_quant_cfg:
650
+ quant_config = hf_quant_cfg["quantization"]
651
+ if isinstance(quant_config, dict):
652
+ quant_algo = quant_config.get("quant_algo", "")
653
+ if "NVFP4" in quant_algo:
654
+ return "modelopt_fp4"
655
+ else:
656
+ # Check for compressed-tensors style config with specific
657
+ # quant_algo field
658
+ quant_algo = hf_quant_cfg.get("quant_algo", "")
659
+ if isinstance(quant_algo, str) and "FP4" in quant_algo.upper():
660
+ return "modelopt_fp4"
661
+
662
+ return None
663
+
664
+ @classmethod
665
+ def from_config(cls, config: dict[str, Any]) -> "ModelOptNvFp4Config":
666
+ # Handle both traditional ModelOpt format and compressed-tensors
667
+ # style format
668
+ if "quantization" in config:
669
+ # Traditional ModelOpt format:
670
+ # {"quantization": {"quant_algo": "..."}}
671
+ quant_config = cls.get_from_keys(config, ["quantization"])
672
+ if not isinstance(quant_config, dict):
673
+ raise ValueError(
674
+ "Expected 'quantization' to be a dictionary in config")
675
+
676
+ quant_method = quant_config.get("quant_algo", "")
677
+ if not quant_method:
678
+ raise ValueError("Missing 'quant_algo' in quantization config")
679
+
680
+ # Handle kv_cache_quant_algo with proper type validation
681
+ kv_cache_quant_algo_raw = quant_config.get("kv_cache_quant_algo")
682
+ if kv_cache_quant_algo_raw is None:
683
+ # No KV cache quantization by default
684
+ kv_cache_quant_algo = None
685
+ elif isinstance(kv_cache_quant_algo_raw, str):
686
+ kv_cache_quant_algo = kv_cache_quant_algo_raw
687
+ else:
688
+ raise ValueError(f"kv_cache_quant_algo must be a string, got "
689
+ f"{type(kv_cache_quant_algo_raw)}")
690
+
691
+ # Handle group_size with proper type validation
692
+ group_size_raw = quant_config.get("group_size")
693
+ if group_size_raw is None:
694
+ group_size = 16 # Default value
695
+ elif isinstance(group_size_raw, int):
696
+ group_size = group_size_raw
697
+ else:
698
+ try:
699
+ group_size = int(group_size_raw)
700
+ except (ValueError, TypeError):
701
+ raise ValueError(f"group_size must be an integer, got "
702
+ f"{type(group_size_raw)}") from None
703
+
704
+ exclude_modules = quant_config.get("exclude_modules", [])
705
+ if not isinstance(exclude_modules, list):
706
+ raise ValueError(f"exclude_modules must be a list, got "
707
+ f"{type(exclude_modules)}")
708
+ else:
709
+ # Compressed-tensors style format:
710
+ # {"quant_algo": "...", "quant_method": "modelopt"}
711
+ quant_method = config.get("quant_algo", "")
712
+
713
+ # Handle kv_cache_quant_algo with proper type validation
714
+ kv_cache_quant_algo_raw = config.get("kv_cache_quant_algo")
715
+ if kv_cache_quant_algo_raw is None:
716
+ # No KV cache quantization by default
717
+ kv_cache_quant_algo = None
718
+ elif isinstance(kv_cache_quant_algo_raw, str):
719
+ kv_cache_quant_algo = kv_cache_quant_algo_raw
720
+ else:
721
+ raise ValueError(f"kv_cache_quant_algo must be a string, got "
722
+ f"{type(kv_cache_quant_algo_raw)}")
723
+
724
+ # Handle group_size with proper type validation
725
+ group_size_raw = config.get("group_size")
726
+ if group_size_raw is None:
727
+ group_size = 16 # Default value
728
+ elif isinstance(group_size_raw, int):
729
+ group_size = group_size_raw
730
+ else:
731
+ try:
732
+ group_size = int(group_size_raw)
733
+ except (ValueError, TypeError):
734
+ raise ValueError(f"group_size must be an integer, got "
735
+ f"{type(group_size_raw)}") from None
736
+
737
+ exclude_modules = config.get("exclude_modules", [])
738
+ if not isinstance(exclude_modules, list):
739
+ raise ValueError(f"exclude_modules must be a list, got "
740
+ f"{type(exclude_modules)}")
741
+
742
+ if quant_method not in QUANT_ALGOS:
743
+ raise ValueError(
744
+ f"ModelOpt currently only supports: {QUANT_ALGOS} "
745
+ "quantizations in vLLM. Please check the "
746
+ "`hf_quant_config.json` file for your model's "
747
+ "quant configuration.")
748
+ is_checkpoint_nvfp4_serialized = ("NVFP4" in quant_method)
749
+
750
+ # For FP4, these fields are required
751
+ if is_checkpoint_nvfp4_serialized and "quantization" in config:
752
+ # Check if required fields are present in the quantization config
753
+ quant_config = config["quantization"]
754
+ required_fields = [
755
+ "group_size", "kv_cache_quant_algo", "exclude_modules"
756
+ ]
757
+ missing_fields = [
758
+ field for field in required_fields if field not in quant_config
759
+ ]
760
+ if missing_fields:
761
+ raise ValueError(
762
+ f"NVFP4 quantization requires the following fields in "
763
+ f"hf_quant_config.json: {missing_fields}")
764
+
765
+ return cls(is_checkpoint_nvfp4_serialized, kv_cache_quant_algo,
766
+ exclude_modules, group_size)
767
+
768
+ def is_layer_excluded(self, prefix: str,
769
+ exclude_modules: list[str]) -> bool:
770
+ import regex as re
771
+ for pattern in exclude_modules:
772
+ regex_str = pattern.replace('.', r'\.').replace('*', r'.*')
773
+ if re.fullmatch(regex_str, prefix):
774
+ return True
775
+ return False
776
+
777
+ def get_quant_method(self, layer: torch.nn.Module,
778
+ prefix: str) -> Optional["QuantizeMethodBase"]:
779
+ from vllm.attention.layer import Attention # Avoid circular import
780
+ if isinstance(layer, LinearBase):
781
+ if (is_layer_skipped(prefix, self.exclude_modules,
782
+ self.packed_modules_mapping)
783
+ or self.is_layer_excluded(prefix, self.exclude_modules)):
784
+ return UnquantizedLinearMethod()
785
+ return ModelOptNvFp4LinearMethod(self)
786
+ elif isinstance(layer, Attention):
787
+ return ModelOptFp8KVCacheMethod(self)
788
+ elif isinstance(layer, FusedMoE):
789
+ return ModelOptNvFp4FusedMoE(self, layer.moe_config, layer)
790
+ return None
791
+
792
+
793
+ class ModelOptFp8KVCacheMethod(BaseKVCacheMethod):
794
+ """
795
+ Supports loading kv-cache scaling factors from FP8 checkpoints.
796
+ """
797
+
798
+ def __init__(self, quant_config: Union[ModelOptFp8Config,
799
+ ModelOptNvFp4Config]):
800
+ super().__init__(quant_config)
801
+
802
+
803
+ class ModelOptNvFp4LinearMethod(LinearMethodBase):
804
+ """Linear method for Model Optimizer NVFP4.
805
+ Supports loading NVFP4 checkpoints with the following structure:
806
+
807
+ input_scale: torch.float32, scalar ,
808
+ weight: NVFP4(represented as byte) Shape: [1, X, y/2]
809
+ weight_scale: FP8-E4M3, Shape: [X, Y], aka per block scale,
810
+ weight_scale_2: torch.float32, scalar,
811
+ Args: quant_config: The ModelOpt quantization config.
812
+ """
813
+
814
+ def __init__(self, quant_config: ModelOptNvFp4Config) -> None:
815
+ self.quant_config = quant_config
816
+
817
+ if envs.VLLM_USE_TRTLLM_FP4_GEMM:
818
+ assert has_flashinfer(), "TRTLLM FP4 GEMM requires FlashInfer"
819
+ self.backend = "flashinfer-trtllm"
820
+ elif has_flashinfer():
821
+ self.backend = "flashinfer-cutlass"
822
+ elif cutlass_fp4_supported():
823
+ self.backend = "cutlass"
824
+ elif is_fp4_marlin_supported():
825
+ self.backend = "marlin"
826
+ else:
827
+ raise ValueError("Current platform does not support NVFP4"
828
+ " quantization. Please use Blackwell and"
829
+ " above.")
830
+
831
+ def create_weights(
832
+ self,
833
+ layer: torch.nn.Module,
834
+ input_size_per_partition: int,
835
+ output_partition_sizes: list[int],
836
+ input_size: int,
837
+ output_size: int,
838
+ params_dtype: torch.dtype,
839
+ **extra_weight_attrs,
840
+ ):
841
+ del input_size, output_size
842
+ if not self.quant_config.is_checkpoint_nvfp4_serialized:
843
+ raise ValueError("NVFP4 quantization was selected, "
844
+ " dynamic quantization is not supported.")
845
+ output_size_per_partition = sum(output_partition_sizes)
846
+ weight_loader = extra_weight_attrs.get("weight_loader")
847
+ layer.logical_widths = output_partition_sizes
848
+ layer.input_size_per_partition = input_size_per_partition
849
+ layer.output_size_per_partition = output_size_per_partition
850
+
851
+ if (input_size_per_partition % 16 != 0):
852
+ raise ValueError("Unsupported model when in features size is "
853
+ "not multiple of 16")
854
+ # The nvfp4 weight is still represented as
855
+ weight_dtype = (torch.float8_e4m3fn
856
+ if self.quant_config.is_checkpoint_nvfp4_serialized
857
+ else params_dtype)
858
+ # Weight
859
+ weight = ModelWeightParameter(
860
+ data=torch.empty(
861
+ # 2 fp4 items are packed in the input dimension
862
+ layer.output_size_per_partition,
863
+ layer.input_size_per_partition // 2,
864
+ dtype=torch.uint8),
865
+ input_dim=1,
866
+ output_dim=0,
867
+ weight_loader=weight_loader)
868
+ layer.register_parameter("weight", weight)
869
+
870
+ # Input Weight Scale
871
+ input_scale = PerTensorScaleParameter(data=torch.empty(
872
+ len(output_partition_sizes), dtype=torch.float32),
873
+ weight_loader=weight_loader)
874
+ layer.register_parameter("input_scale", input_scale)
875
+
876
+ # Global Weight Scale
877
+ weight_scale_2 = PerTensorScaleParameter(data=torch.empty(
878
+ len(output_partition_sizes), dtype=torch.float32),
879
+ weight_loader=weight_loader)
880
+ layer.register_parameter("weight_scale_2", weight_scale_2)
881
+
882
+ # Per Block Weight Scale
883
+ weight_scale = ModelWeightParameter(data=torch.empty(
884
+ output_size_per_partition,
885
+ input_size_per_partition // self.quant_config.group_size,
886
+ dtype=weight_dtype,
887
+ ),
888
+ input_dim=1,
889
+ output_dim=0,
890
+ weight_loader=weight_loader)
891
+
892
+ layer.register_parameter("weight_scale", weight_scale)
893
+
894
+ def process_weights_after_loading(self, layer: Module) -> None:
895
+
896
+ # global scales:
897
+ input_scale_2 = layer.input_scale.max().to(torch.float32)
898
+ layer.input_scale = Parameter(input_scale_2, requires_grad=False)
899
+
900
+ weight_scale_2 = layer.weight_scale_2.max().to(torch.float32)
901
+ layer.weight_scale_2 = Parameter(weight_scale_2, requires_grad=False)
902
+
903
+ layer.alpha = Parameter(layer.input_scale * layer.weight_scale_2,
904
+ requires_grad=False)
905
+
906
+ # Calculate `1 / input_scale` so that we don't need to do so at runtime
907
+ layer.input_scale_inv = Parameter(
908
+ (1 / layer.input_scale).to(torch.float32), requires_grad=False)
909
+
910
+ # Swizzle the weight blockscale.
911
+ # contracting dimension is input dimension
912
+ # block_size = 16;
913
+ assert (layer.weight_scale.dtype == torch.float8_e4m3fn), (
914
+ "Weight Block scale must be represented as FP8-E4M3")
915
+
916
+ if self.backend == "marlin":
917
+ prepare_fp4_layer_for_marlin(layer)
918
+ del layer.alpha
919
+ del layer.input_scale
920
+ elif self.backend == "flashinfer-trtllm":
921
+ # FlashInfer TRTLLM FP4 GEMM requires a different weight layout.
922
+ # FlashInfer provides nvfp4_quantize to quantize + shuffle the
923
+ # layout but we use our own quantization so we have to call
924
+ # shuffles ourselves.
925
+ from flashinfer import shuffle_matrix_a, shuffle_matrix_sf_a
926
+
927
+ weight = layer.weight.data
928
+ weight_scale = layer.weight_scale.data
929
+
930
+ epilogue_tile_m = 128
931
+ weight = shuffle_matrix_a(weight.view(torch.uint8),
932
+ epilogue_tile_m)
933
+ weight_scale = (shuffle_matrix_sf_a(weight_scale.view(
934
+ torch.uint8), epilogue_tile_m).reshape(
935
+ weight_scale.shape).view(torch.float8_e4m3fn))
936
+
937
+ layer.weight_scale = Parameter(weight_scale, requires_grad=False)
938
+ layer.weight = Parameter(weight, requires_grad=False)
939
+ else:
940
+ swizzled_weight_scale = swizzle_blockscale(layer.weight_scale)
941
+ layer.weight_scale = Parameter(swizzled_weight_scale,
942
+ requires_grad=False)
943
+ layer.weight = Parameter(layer.weight.data, requires_grad=False)
944
+
945
+ def apply(
946
+ self,
947
+ layer: torch.nn.Module,
948
+ x: torch.Tensor,
949
+ bias: Optional[torch.Tensor] = None,
950
+ ) -> torch.Tensor:
951
+ if self.backend == "marlin":
952
+ return apply_fp4_marlin_linear(
953
+ input=x,
954
+ weight=layer.weight,
955
+ weight_scale=layer.weight_scale,
956
+ weight_scale_2=layer.weight_scale_2,
957
+ workspace=layer.workspace,
958
+ size_n=layer.output_size_per_partition,
959
+ size_k=layer.input_size_per_partition,
960
+ bias=bias)
961
+
962
+ output_dtype = x.dtype
963
+ output_shape = [x.shape[0], layer.weight.shape[0]]
964
+
965
+ # quantize BF16 or FP16 to (FP4 and interleaved block scale)
966
+ x_fp4, x_blockscale = scaled_fp4_quant(x, layer.input_scale_inv)
967
+
968
+ # validate dtypes of quantized input, input block scale,
969
+ # weight and weight_blockscale
970
+ assert (x_fp4.dtype == torch.uint8)
971
+ assert (layer.weight.dtype == torch.uint8)
972
+ assert (x_blockscale.dtype == torch.float8_e4m3fn)
973
+ assert (layer.weight_scale.dtype == torch.float8_e4m3fn)
974
+ assert (layer.alpha.dtype == torch.float32)
975
+
976
+ mm_args = (
977
+ x_fp4,
978
+ layer.weight,
979
+ x_blockscale,
980
+ layer.weight_scale,
981
+ layer.alpha,
982
+ output_dtype,
983
+ )
984
+ if self.backend == "flashinfer-trtllm":
985
+ out = flashinfer_scaled_fp4_mm(*mm_args, backend="trtllm")
986
+ elif self.backend == "flashinfer-cutlass":
987
+ out = flashinfer_scaled_fp4_mm(*mm_args, backend="cutlass")
988
+ else:
989
+ out = cutlass_scaled_fp4_mm(*mm_args)
990
+
991
+ if bias is not None:
992
+ out = out + bias
993
+ return out.view(*output_shape)
994
+
995
+
996
+ def _get_tile_tokens_dim(num_tokens: int, top_k: int, num_experts: int) -> int:
997
+ # Guess tokens per expert assuming perfect expert distribution first.
998
+ num_tokens_per_expert = (num_tokens * top_k) // num_experts
999
+ # And pad the number to the next power of 2.
1000
+ tile_tokens_dim = next_power_of_2(num_tokens_per_expert)
1001
+ # Cap to 8-64 tokens per CTA tile as it's the range supported by the kernel.
1002
+ tile_tokens_dim = min(max(tile_tokens_dim, 8), 64)
1003
+ return tile_tokens_dim
1004
+
1005
+
1006
+ class ModelOptNvFp4FusedMoE(FusedMoEMethodBase):
1007
+ """
1008
+ MoE Method for FP4 Quantization.
1009
+ Args:
1010
+ quant_config: NVFP4 Quant Config
1011
+ """
1012
+
1013
+ def __init__(
1014
+ self,
1015
+ quant_config: ModelOptNvFp4Config,
1016
+ moe: FusedMoEConfig,
1017
+ layer: torch.nn.Module,
1018
+ ) -> None:
1019
+ from vllm.model_executor.layers.quantization.utils.nvfp4_moe_support import ( # noqa: E501
1020
+ detect_nvfp4_moe_support)
1021
+ super().__init__(moe)
1022
+ self.quant_config = quant_config
1023
+ self.layer = layer
1024
+ _nvfp4 = detect_nvfp4_moe_support(self.__class__.__name__)
1025
+ self.cutlass_nvfp4_supported = _nvfp4.cutlass_supported
1026
+ self.allow_flashinfer = _nvfp4.allow_flashinfer
1027
+ self.use_marlin = _nvfp4.use_marlin
1028
+ self.flashinfer_moe_backend = None
1029
+
1030
+ if self.allow_flashinfer:
1031
+ self.flashinfer_moe_backend = get_flashinfer_moe_backend()
1032
+ logger.info_once(
1033
+ f"Using FlashInfer {self.flashinfer_moe_backend.value} kernels"
1034
+ " for ModelOptNvFp4FusedMoE.")
1035
+
1036
+ def maybe_make_prepare_finalize(
1037
+ self,
1038
+ moe: FusedMoEConfig,
1039
+ ) -> Optional[mk.FusedMoEPrepareAndFinalize]:
1040
+ if (self.allow_flashinfer and self.flashinfer_moe_backend
1041
+ == FlashinferMoeBackend.CUTLASS):
1042
+ prepare_finalize = (
1043
+ build_flashinfer_fp4_cutlass_moe_prepare_finalize(
1044
+ moe,
1045
+ a1_gscale=self.layer.w13_input_scale_quant,
1046
+ ))
1047
+ logger.debug_once("%s", prepare_finalize.__class__.__name__)
1048
+ return prepare_finalize
1049
+
1050
+ return super().maybe_make_prepare_finalize(moe)
1051
+
1052
+ def select_gemm_impl(
1053
+ self,
1054
+ prepare_finalize: mk.FusedMoEPrepareAndFinalize,
1055
+ moe: FusedMoEConfig,
1056
+ layer: torch.nn.Module,
1057
+ ) -> mk.FusedMoEPermuteExpertsUnpermute:
1058
+ experts = select_nvfp4_gemm_impl(
1059
+ moe,
1060
+ g1_alphas=self.layer.g1_alphas,
1061
+ g2_alphas=self.layer.g2_alphas,
1062
+ a1_gscale=self.layer.w13_input_scale_quant,
1063
+ a2_gscale=self.layer.w2_input_scale_quant,
1064
+ allow_flashinfer=self.allow_flashinfer,
1065
+ )
1066
+ logger.debug_once("Using %s", experts.__class__.__name__)
1067
+ return experts
1068
+
1069
+ def uses_weight_scale_2_pattern(self) -> bool:
1070
+ """
1071
+ FP4 variants use 'weight_scale_2' pattern for per-tensor weight scales.
1072
+ """
1073
+ return True
1074
+
1075
+ def create_weights(self, layer: torch.nn.Module, num_experts: int,
1076
+ hidden_size: int, intermediate_size_per_partition: int,
1077
+ params_dtype: torch.dtype, **extra_weight_attrs):
1078
+ if not self.quant_config.is_checkpoint_nvfp4_serialized:
1079
+ raise ValueError("NVFP4 quantization was selected, "
1080
+ " dynamic quantization is not supported.")
1081
+
1082
+ layer.num_experts = num_experts
1083
+ layer.params_dtype = params_dtype
1084
+ layer.quant_config = self.quant_config
1085
+ weight_dtype = torch.uint8
1086
+ weight_scale_dtype = torch.float8_e4m3fn
1087
+ weight_loader = extra_weight_attrs.get("weight_loader")
1088
+ # GEMM 1
1089
+ w13_weight = ModelWeightParameter(
1090
+ data=torch.empty(
1091
+ num_experts,
1092
+ 2 * intermediate_size_per_partition,
1093
+ # 2 fp4 items are packed in the input dimension
1094
+ hidden_size // 2,
1095
+ dtype=weight_dtype),
1096
+ input_dim=1,
1097
+ output_dim=2,
1098
+ weight_loader=weight_loader)
1099
+ layer.register_parameter("w13_weight", w13_weight)
1100
+
1101
+ # GEMM 2
1102
+ w2_weight = ModelWeightParameter(
1103
+ data=torch.empty(
1104
+ num_experts,
1105
+ hidden_size,
1106
+ # 2 fp4 items are packed in the input dimension
1107
+ intermediate_size_per_partition // 2,
1108
+ dtype=weight_dtype),
1109
+ input_dim=1,
1110
+ output_dim=2,
1111
+ weight_loader=weight_loader)
1112
+ layer.register_parameter("w2_weight", w2_weight)
1113
+
1114
+ w13_weight_scale = ModelWeightParameter(
1115
+ data=torch.empty(
1116
+ num_experts,
1117
+ 2 * intermediate_size_per_partition,
1118
+ # 2 fp4 items are packed in the input dimension
1119
+ hidden_size // self.quant_config.group_size,
1120
+ dtype=weight_scale_dtype),
1121
+ input_dim=1,
1122
+ output_dim=2,
1123
+ weight_loader=weight_loader)
1124
+ layer.register_parameter("w13_weight_scale", w13_weight_scale)
1125
+
1126
+ w2_weight_scale = ModelWeightParameter(
1127
+ data=torch.empty(
1128
+ num_experts,
1129
+ hidden_size,
1130
+ # 2 fp4 items are packed in the input dimension
1131
+ intermediate_size_per_partition //
1132
+ self.quant_config.group_size,
1133
+ dtype=weight_scale_dtype),
1134
+ input_dim=1,
1135
+ output_dim=2,
1136
+ weight_loader=weight_loader)
1137
+ layer.register_parameter("w2_weight_scale", w2_weight_scale)
1138
+
1139
+ extra_weight_attrs.update(
1140
+ {"quant_method": FusedMoeWeightScaleSupported.BLOCK.value})
1141
+
1142
+ w13_weight_scale_2 = PerTensorScaleParameter(
1143
+ data=torch.empty(num_experts, 2, dtype=torch.float32),
1144
+ weight_loader=weight_loader)
1145
+ layer.register_parameter("w13_weight_scale_2", w13_weight_scale_2)
1146
+
1147
+ w2_weight_scale_2 = PerTensorScaleParameter(
1148
+ data=torch.empty(num_experts, dtype=torch.float32),
1149
+ weight_loader=weight_loader)
1150
+ layer.register_parameter("w2_weight_scale_2", w2_weight_scale_2)
1151
+
1152
+ extra_weight_attrs.update(
1153
+ {"quant_method": FusedMoeWeightScaleSupported.TENSOR.value})
1154
+
1155
+ w13_input_scale = PerTensorScaleParameter(data=torch.empty(
1156
+ num_experts, 2, dtype=torch.float32),
1157
+ weight_loader=weight_loader)
1158
+ layer.register_parameter("w13_input_scale", w13_input_scale)
1159
+
1160
+ w2_input_scale = PerTensorScaleParameter(data=torch.empty(
1161
+ num_experts, dtype=torch.float32),
1162
+ weight_loader=weight_loader)
1163
+ layer.register_parameter("w2_input_scale", w2_input_scale)
1164
+
1165
+ def prepare_static_weight_layouts_for_trtllm_moe(
1166
+ self,
1167
+ gemm1_weights: torch.Tensor,
1168
+ gemm2_weights: torch.Tensor,
1169
+ gemm1_scales_linear_fp4_bytes: torch.Tensor,
1170
+ gemm2_scales_linear_fp4_bytes: torch.Tensor,
1171
+ hidden_size: int,
1172
+ intermediate_size: int,
1173
+ num_experts: int,
1174
+ ) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
1175
+ """Prepare quantized weights for kernel (done offline with weights)."""
1176
+ from flashinfer import (reorder_rows_for_gated_act_gemm,
1177
+ shuffle_matrix_a, shuffle_matrix_sf_a)
1178
+ epilogue_tile_m = 128 # FIXME: this depends on the kernel internals
1179
+
1180
+ # Convert quantized weights to proper formats
1181
+ gemm1_weights_fp4 = gemm1_weights.view(torch.float8_e4m3fn).reshape(
1182
+ num_experts, 2 * intermediate_size, hidden_size // 2) # packed fp4
1183
+ gemm1_scales_linear_fp4 = gemm1_scales_linear_fp4_bytes.view(
1184
+ torch.float8_e4m3fn).reshape(num_experts, 2 * intermediate_size,
1185
+ hidden_size //
1186
+ 16) # fp8 scaling factors
1187
+
1188
+ gemm2_weights_fp4 = gemm2_weights.view(torch.float8_e4m3fn).reshape(
1189
+ num_experts, hidden_size, intermediate_size // 2) # packed fp4
1190
+ gemm2_scales_linear_fp4 = gemm2_scales_linear_fp4_bytes.view(
1191
+ torch.float8_e4m3fn).reshape(num_experts, hidden_size,
1192
+ intermediate_size //
1193
+ 16) # fp8 scaling factors
1194
+
1195
+ # Reorder rows of W1 and scales for fused gated activation
1196
+ gemm1_weights_fp4_interleaved = []
1197
+ gemm1_scales_fp4_interleaved = []
1198
+ for i in range(num_experts):
1199
+ gemm1_weights_fp4_interleaved.append(
1200
+ reorder_rows_for_gated_act_gemm(gemm1_weights_fp4[i].clone()))
1201
+ gemm1_scales_fp4_interleaved.append(
1202
+ reorder_rows_for_gated_act_gemm(
1203
+ gemm1_scales_linear_fp4[i].clone()))
1204
+
1205
+ # Stack weights and scales for all experts
1206
+ gemm1_weights_fp4_interleaved = torch.stack(
1207
+ gemm1_weights_fp4_interleaved).reshape(num_experts,
1208
+ 2 * intermediate_size,
1209
+ hidden_size // 2)
1210
+ gemm1_scales_fp4_interleaved = torch.stack(
1211
+ gemm1_scales_fp4_interleaved).reshape(num_experts,
1212
+ 2 * intermediate_size,
1213
+ hidden_size // 16)
1214
+
1215
+ # Shuffle weights and scaling factors for transposed mma output
1216
+ gemm1_weights_fp4_shuffled = []
1217
+ gemm1_scales_fp4_shuffled = []
1218
+ gemm2_weights_fp4_shuffled = []
1219
+ gemm2_scales_fp4_shuffled = []
1220
+ for i in range(num_experts):
1221
+ gemm1_weights_fp4_shuffled.append(
1222
+ shuffle_matrix_a(
1223
+ gemm1_weights_fp4_interleaved[i].view(torch.uint8),
1224
+ epilogue_tile_m))
1225
+ gemm1_scales_fp4_shuffled.append(
1226
+ shuffle_matrix_sf_a(
1227
+ gemm1_scales_fp4_interleaved[i].view(torch.uint8),
1228
+ epilogue_tile_m))
1229
+
1230
+ gemm2_weights_fp4_shuffled.append(
1231
+ shuffle_matrix_a(gemm2_weights_fp4[i].view(torch.uint8),
1232
+ epilogue_tile_m))
1233
+ gemm2_scales_fp4_shuffled.append(
1234
+ shuffle_matrix_sf_a(
1235
+ gemm2_scales_linear_fp4[i].view(torch.uint8),
1236
+ epilogue_tile_m))
1237
+
1238
+ # Stack weights for all experts
1239
+ gemm1_weights_fp4_shuffled = torch.stack(gemm1_weights_fp4_shuffled)
1240
+ gemm1_scales_fp4_shuffled = (
1241
+ torch.stack(gemm1_scales_fp4_shuffled).view(
1242
+ torch.float8_e4m3fn).reshape(num_experts,
1243
+ 2 * intermediate_size,
1244
+ hidden_size // 16))
1245
+
1246
+ gemm2_weights_fp4_shuffled = torch.stack(gemm2_weights_fp4_shuffled)
1247
+ gemm2_scales_fp4_shuffled = (
1248
+ torch.stack(gemm2_scales_fp4_shuffled).view(
1249
+ torch.float8_e4m3fn).reshape(num_experts, hidden_size,
1250
+ intermediate_size // 16))
1251
+ return (gemm1_weights_fp4_shuffled, gemm1_scales_fp4_shuffled,
1252
+ gemm2_weights_fp4_shuffled, gemm2_scales_fp4_shuffled)
1253
+
1254
+ def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
1255
+ # GEMM 1 processing
1256
+ gemm1_weight = layer.w13_weight.data
1257
+ gemm1_weight_scale = layer.w13_weight_scale.data
1258
+
1259
+ if self.allow_flashinfer:
1260
+ gemm1_weight, gemm1_weight_scale = reorder_w1w3_to_w3w1(
1261
+ gemm1_weight, gemm1_weight_scale, dim=-2)
1262
+
1263
+ layer.w13_weight = Parameter(gemm1_weight, requires_grad=False)
1264
+ layer.w13_weight_scale = Parameter(gemm1_weight_scale,
1265
+ requires_grad=False)
1266
+
1267
+ # Common processing for w13_weight_scale_2
1268
+ if not torch.allclose(layer.w13_weight_scale_2[:, 0],
1269
+ layer.w13_weight_scale_2[:, 1]):
1270
+ logger.warning_once(
1271
+ "w1_weight_scale_2 must match w3_weight_scale_2. "
1272
+ "Accuracy may be affected.")
1273
+
1274
+ w13_weight_scale_2 = layer.w13_weight_scale_2[:, 0]
1275
+ layer.w13_weight_scale_2 = Parameter(w13_weight_scale_2,
1276
+ requires_grad=False)
1277
+
1278
+ # Common processing for input scales and alphas
1279
+ w13_input_scale = layer.w13_input_scale.max(dim=1).values.to(
1280
+ torch.float32)
1281
+ layer.g1_alphas = Parameter(
1282
+ (w13_input_scale * w13_weight_scale_2).to(torch.float32),
1283
+ requires_grad=False)
1284
+
1285
+ # This is for quantization, so we need to invert it.
1286
+ layer.w13_input_scale_quant = Parameter(
1287
+ (1 / w13_input_scale).to(torch.float32), requires_grad=False)
1288
+
1289
+ # GEMM 2 processing
1290
+ layer.g2_alphas = Parameter(
1291
+ (layer.w2_input_scale * layer.w2_weight_scale_2).to(torch.float32),
1292
+ requires_grad=False)
1293
+
1294
+ # This is for quantization, so we need to invert it.
1295
+ layer.w2_input_scale_quant = Parameter(
1296
+ (1 / layer.w2_input_scale).to(torch.float32), requires_grad=False)
1297
+
1298
+ # TensorRT-LLM specific processing
1299
+ if self.allow_flashinfer and \
1300
+ self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
1301
+ # Prepare static weights for TRT-LLM kernel
1302
+ (gemm1_weights_fp4_shuffled, gemm1_scales_fp4_shuffled,
1303
+ gemm2_weights_fp4_shuffled, gemm2_scales_fp4_shuffled
1304
+ ) = self.prepare_static_weight_layouts_for_trtllm_moe(
1305
+ layer.w13_weight,
1306
+ layer.w2_weight,
1307
+ layer.w13_weight_scale,
1308
+ layer.w2_weight_scale,
1309
+ layer.w2_weight.size(-2), # hidden_size
1310
+ layer.w13_weight.size(-2) // 2, # intermediate_size
1311
+ layer.w13_weight.size(0), # num_experts
1312
+ )
1313
+
1314
+ layer.gemm1_weights_fp4_shuffled = Parameter(
1315
+ gemm1_weights_fp4_shuffled, requires_grad=False)
1316
+ layer.gemm2_weights_fp4_shuffled = Parameter(
1317
+ gemm2_weights_fp4_shuffled, requires_grad=False)
1318
+ layer.gemm1_scales_fp4_shuffled = Parameter(
1319
+ gemm1_scales_fp4_shuffled, requires_grad=False)
1320
+ layer.gemm2_scales_fp4_shuffled = Parameter(
1321
+ gemm2_scales_fp4_shuffled, requires_grad=False)
1322
+
1323
+ # Additional parameter needed for TRT-LLM
1324
+ layer.g1_scale_c = Parameter(
1325
+ (layer.w2_input_scale_quant * layer.g1_alphas).to(
1326
+ torch.float32),
1327
+ requires_grad=False,
1328
+ )
1329
+
1330
+ # Clean up weights that won't be used by TRT-LLM
1331
+ del layer.w2_weight
1332
+ del layer.w2_weight_scale
1333
+ del layer.w13_weight
1334
+ del layer.w13_weight_scale
1335
+ elif self.use_marlin:
1336
+ # Marlin processing
1337
+ prepare_moe_fp4_layer_for_marlin(layer)
1338
+ del layer.g1_alphas
1339
+ del layer.g2_alphas
1340
+ del layer.w13_input_scale_quant
1341
+ del layer.w2_input_scale_quant
1342
+ else:
1343
+ # Non-TRT-LLM processing (Cutlass or non-flashinfer)
1344
+ assert (layer.w13_weight_scale.shape[2] % 16 == 0), (
1345
+ "Expected weight_scale.dim(1) to be divisible by 16")
1346
+ assert (layer.w13_weight_scale.dtype == torch.float8_e4m3fn), (
1347
+ "Weight Blockscale must be represented as FP8-E4M3")
1348
+ w13_blockscale_swizzled = swizzle_blockscale(
1349
+ layer.w13_weight_scale)
1350
+ layer.w13_weight_scale = Parameter(w13_blockscale_swizzled,
1351
+ requires_grad=False)
1352
+
1353
+ assert (layer.w2_weight_scale.shape[2] % 16 == 0), (
1354
+ "Expected weight_scale.dim(1) to be divisible by 16")
1355
+ assert (layer.w2_weight_scale.dtype == torch.float8_e4m3fn), (
1356
+ "Weight Blockscale must be represented as FP8-E4M3")
1357
+ w2_blockscale_swizzled = swizzle_blockscale(layer.w2_weight_scale)
1358
+ layer.w2_weight_scale = Parameter(w2_blockscale_swizzled,
1359
+ requires_grad=False)
1360
+ layer.w2_weight = Parameter(layer.w2_weight.data,
1361
+ requires_grad=False)
1362
+
1363
+ def apply(
1364
+ self,
1365
+ layer: torch.nn.Module,
1366
+ x: torch.Tensor,
1367
+ router_logits: torch.Tensor,
1368
+ top_k: int,
1369
+ renormalize: bool,
1370
+ use_grouped_topk: bool = False,
1371
+ topk_group: Optional[int] = None,
1372
+ num_expert_group: Optional[int] = None,
1373
+ global_num_experts: int = -1,
1374
+ expert_map: Optional[torch.Tensor] = None,
1375
+ custom_routing_function: Optional[Callable] = None,
1376
+ scoring_func: str = "softmax",
1377
+ routed_scaling_factor: float = 1.0,
1378
+ e_score_correction_bias: Optional[torch.Tensor] = None,
1379
+ apply_router_weight_on_input: bool = False,
1380
+ activation: str = "silu",
1381
+ enable_eplb: bool = False,
1382
+ expert_load_view: Optional[torch.Tensor] = None,
1383
+ logical_to_physical_map: Optional[torch.Tensor] = None,
1384
+ logical_replica_count: Optional[torch.Tensor] = None,
1385
+ ) -> Union[torch.Tensor, tuple[torch.Tensor, torch.Tensor]]:
1386
+ if enable_eplb:
1387
+ raise NotImplementedError(
1388
+ "EPLB not supported for `ModelOptNvFp4FusedMoE` yet.")
1389
+ assert activation == "silu", "Only SiLU activation is supported."
1390
+
1391
+ if self.allow_flashinfer and \
1392
+ self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
1393
+ import flashinfer
1394
+
1395
+ from vllm.model_executor.models.llama4 import Llama4MoE
1396
+
1397
+ a1_gscale = layer.w13_input_scale_quant
1398
+ (hidden_states_fp4,
1399
+ hidden_states_scale_linear_fp4) = flashinfer.fp4_quantize(
1400
+ x,
1401
+ a1_gscale,
1402
+ is_sf_swizzled_layout=False,
1403
+ )
1404
+ use_llama4_routing = \
1405
+ custom_routing_function is Llama4MoE.custom_routing_function
1406
+ routing_method_type = flashinfer.RoutingMethodType.DeepSeekV3
1407
+ if use_llama4_routing:
1408
+ routing_method_type = flashinfer.RoutingMethodType.Llama4
1409
+ out = flashinfer.fused_moe.trtllm_fp4_block_scale_moe(
1410
+ routing_logits=router_logits
1411
+ if use_llama4_routing else router_logits.to(torch.float32),
1412
+ routing_bias=e_score_correction_bias,
1413
+ hidden_states=hidden_states_fp4,
1414
+ hidden_states_scale=hidden_states_scale_linear_fp4.view(
1415
+ torch.float8_e4m3fn).flatten(),
1416
+ gemm1_weights=layer.gemm1_weights_fp4_shuffled.data,
1417
+ gemm1_weights_scale=layer.gemm1_scales_fp4_shuffled.data.view(
1418
+ torch.float8_e4m3fn),
1419
+ gemm1_bias=None,
1420
+ gemm1_alpha=None,
1421
+ gemm1_beta=None,
1422
+ gemm1_clamp_limit=None,
1423
+ gemm2_weights=layer.gemm2_weights_fp4_shuffled.data,
1424
+ gemm2_weights_scale=layer.gemm2_scales_fp4_shuffled.data.view(
1425
+ torch.float8_e4m3fn),
1426
+ gemm2_bias=None,
1427
+ output1_scale_scalar=layer.g1_scale_c.data,
1428
+ output1_scale_gate_scalar=layer.g1_alphas.data,
1429
+ output2_scale_scalar=layer.g2_alphas.data,
1430
+ num_experts=global_num_experts,
1431
+ top_k=top_k,
1432
+ n_group=num_expert_group
1433
+ if num_expert_group is not None else 0,
1434
+ topk_group=topk_group if topk_group is not None else 0,
1435
+ intermediate_size=layer.intermediate_size_per_partition,
1436
+ local_expert_offset=layer.ep_rank * layer.local_num_experts,
1437
+ local_num_experts=layer.local_num_experts,
1438
+ routed_scaling_factor=None,
1439
+ tile_tokens_dim=_get_tile_tokens_dim(x.shape[0], top_k,
1440
+ layer.local_num_experts),
1441
+ routing_method_type=routing_method_type,
1442
+ do_finalize=True,
1443
+ )[0]
1444
+ return out
1445
+
1446
+ topk_weights, topk_ids = FusedMoE.select_experts(
1447
+ hidden_states=x,
1448
+ router_logits=router_logits,
1449
+ use_grouped_topk=use_grouped_topk,
1450
+ top_k=top_k,
1451
+ renormalize=renormalize,
1452
+ topk_group=topk_group,
1453
+ num_expert_group=num_expert_group,
1454
+ custom_routing_function=custom_routing_function,
1455
+ scoring_func=scoring_func,
1456
+ routed_scaling_factor=routed_scaling_factor,
1457
+ e_score_correction_bias=e_score_correction_bias,
1458
+ indices_type=self.topk_indices_dtype)
1459
+
1460
+ if self.use_marlin:
1461
+ return torch.ops.vllm.fused_marlin_moe(
1462
+ x,
1463
+ layer.w13_weight,
1464
+ layer.w2_weight,
1465
+ None,
1466
+ None,
1467
+ layer.w13_weight_scale,
1468
+ layer.w2_weight_scale,
1469
+ router_logits,
1470
+ topk_weights,
1471
+ topk_ids,
1472
+ global_scale1=layer.w13_weight_scale_2,
1473
+ global_scale2=layer.w2_weight_scale_2,
1474
+ quant_type_id=scalar_types.float4_e2m1f.id,
1475
+ apply_router_weight_on_input=apply_router_weight_on_input,
1476
+ global_num_experts=global_num_experts,
1477
+ expert_map=expert_map)
1478
+
1479
+ if self.fused_experts is not None:
1480
+ assert self.allow_flashinfer and \
1481
+ self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS
1482
+
1483
+ assert is_valid_flashinfer_cutlass_fused_moe(
1484
+ x, layer.w13_weight, layer.w2_weight), (
1485
+ "Flashinfer CUTLASS Fused MoE not applicable!")
1486
+
1487
+ out = self.fused_experts(
1488
+ hidden_states=x,
1489
+ w1=layer.w13_weight,
1490
+ w2=layer.w2_weight,
1491
+ topk_weights=topk_weights,
1492
+ topk_ids=topk_ids,
1493
+ inplace=False, # TODO(shuw): fix later, now output is high prec
1494
+ activation=activation,
1495
+ global_num_experts=global_num_experts,
1496
+ expert_map=expert_map,
1497
+ w1_scale=layer.w13_weight_scale,
1498
+ w2_scale=layer.w2_weight_scale,
1499
+ apply_router_weight_on_input=apply_router_weight_on_input,
1500
+ )
1501
+ elif (self.allow_flashinfer
1502
+ and self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS):
1503
+ from vllm.model_executor.layers.fused_moe.flashinfer_cutlass_moe import ( # noqa: E501
1504
+ flashinfer_cutlass_moe_fp4)
1505
+
1506
+ out = flashinfer_cutlass_moe_fp4(
1507
+ hidden_states=x,
1508
+ w1=layer.w13_weight,
1509
+ w2=layer.w2_weight,
1510
+ topk_weights=topk_weights,
1511
+ topk_ids=topk_ids,
1512
+ w1_scale=layer.w13_weight_scale,
1513
+ w2_scale=layer.w2_weight_scale,
1514
+ g1_alphas=layer.g1_alphas,
1515
+ g2_alphas=layer.g2_alphas,
1516
+ a1_gscale=layer.w13_input_scale_quant,
1517
+ a2_gscale=layer.w2_input_scale_quant,
1518
+ inplace=False, # TODO(shuw): fix later, now output is high prec
1519
+ activation=activation,
1520
+ global_num_experts=global_num_experts,
1521
+ expert_map=expert_map,
1522
+ apply_router_weight_on_input=apply_router_weight_on_input,
1523
+ )
1524
+ else:
1525
+ # If no modular kernel is provided, use cutlass_moe_fp4 for TP case
1526
+ # only (no EP).
1527
+ from vllm.model_executor.layers.fused_moe.cutlass_moe import (
1528
+ cutlass_moe_fp4)
1529
+ out = cutlass_moe_fp4(
1530
+ a=x,
1531
+ w1_fp4=layer.w13_weight,
1532
+ w2_fp4=layer.w2_weight,
1533
+ w1_blockscale=layer.w13_weight_scale,
1534
+ w2_blockscale=layer.w2_weight_scale,
1535
+ g1_alphas=layer.g1_alphas,
1536
+ g2_alphas=layer.g2_alphas,
1537
+ a1_gscale=layer.w13_input_scale_quant,
1538
+ a2_gscale=layer.w2_input_scale_quant,
1539
+ topk_weights=topk_weights,
1540
+ topk_ids=topk_ids,
1541
+ m=x.shape[0],
1542
+ n=layer.w2_weight.shape[2] * 2,
1543
+ k=x.shape[1],
1544
+ e=layer.w13_weight.shape[0],
1545
+ expert_map=expert_map,
1546
+ apply_router_weight_on_input=apply_router_weight_on_input)
1547
+
1548
+ return out