vllm-cpu 0.11.0.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.
Files changed (1398) 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 +2044 -0
  5. vllm/_ipex_ops.py +393 -0
  6. vllm/_version.py +34 -0
  7. vllm/assets/__init__.py +0 -0
  8. vllm/assets/audio.py +45 -0
  9. vllm/assets/base.py +41 -0
  10. vllm/assets/image.py +50 -0
  11. vllm/assets/video.py +145 -0
  12. vllm/attention/__init__.py +15 -0
  13. vllm/attention/backends/__init__.py +0 -0
  14. vllm/attention/backends/abstract.py +204 -0
  15. vllm/attention/backends/utils.py +33 -0
  16. vllm/attention/layer.py +645 -0
  17. vllm/attention/layers/__init__.py +0 -0
  18. vllm/attention/layers/chunked_local_attention.py +93 -0
  19. vllm/attention/layers/cross_attention.py +162 -0
  20. vllm/attention/layers/encoder_only_attention.py +86 -0
  21. vllm/attention/ops/__init__.py +0 -0
  22. vllm/attention/ops/chunked_prefill_paged_decode.py +405 -0
  23. vllm/attention/ops/common.py +345 -0
  24. vllm/attention/ops/flashmla.py +192 -0
  25. vllm/attention/ops/merge_attn_states.py +43 -0
  26. vllm/attention/ops/paged_attn.py +262 -0
  27. vllm/attention/ops/pallas_kv_cache_update.py +124 -0
  28. vllm/attention/ops/prefix_prefill.py +928 -0
  29. vllm/attention/ops/rocm_aiter_mla.py +104 -0
  30. vllm/attention/ops/rocm_aiter_paged_attn.py +102 -0
  31. vllm/attention/ops/triton_decode_attention.py +691 -0
  32. vllm/attention/ops/triton_flash_attention.py +984 -0
  33. vllm/attention/ops/triton_merge_attn_states.py +97 -0
  34. vllm/attention/ops/triton_reshape_and_cache_flash.py +175 -0
  35. vllm/attention/ops/triton_unified_attention.py +894 -0
  36. vllm/attention/selector.py +245 -0
  37. vllm/attention/utils/__init__.py +0 -0
  38. vllm/attention/utils/fa_utils.py +85 -0
  39. vllm/attention/utils/kv_sharing_utils.py +33 -0
  40. vllm/beam_search.py +87 -0
  41. vllm/benchmarks/__init__.py +0 -0
  42. vllm/benchmarks/datasets.py +2723 -0
  43. vllm/benchmarks/latency.py +170 -0
  44. vllm/benchmarks/lib/__init__.py +3 -0
  45. vllm/benchmarks/lib/endpoint_request_func.py +533 -0
  46. vllm/benchmarks/lib/ready_checker.py +73 -0
  47. vllm/benchmarks/lib/utils.py +80 -0
  48. vllm/benchmarks/serve.py +1358 -0
  49. vllm/benchmarks/throughput.py +696 -0
  50. vllm/collect_env.py +823 -0
  51. vllm/compilation/__init__.py +0 -0
  52. vllm/compilation/activation_quant_fusion.py +189 -0
  53. vllm/compilation/backends.py +650 -0
  54. vllm/compilation/base_static_graph.py +56 -0
  55. vllm/compilation/collective_fusion.py +1188 -0
  56. vllm/compilation/compiler_interface.py +573 -0
  57. vllm/compilation/counter.py +47 -0
  58. vllm/compilation/cuda_graph.py +199 -0
  59. vllm/compilation/cuda_piecewise_backend.py +117 -0
  60. vllm/compilation/decorators.py +400 -0
  61. vllm/compilation/fix_functionalization.py +205 -0
  62. vllm/compilation/fusion.py +383 -0
  63. vllm/compilation/fusion_attn.py +295 -0
  64. vllm/compilation/fx_utils.py +84 -0
  65. vllm/compilation/inductor_pass.py +136 -0
  66. vllm/compilation/monitor.py +57 -0
  67. vllm/compilation/noop_elimination.py +158 -0
  68. vllm/compilation/pass_manager.py +125 -0
  69. vllm/compilation/post_cleanup.py +20 -0
  70. vllm/compilation/sequence_parallelism.py +478 -0
  71. vllm/compilation/torch25_custom_graph_pass.py +42 -0
  72. vllm/compilation/vllm_inductor_pass.py +156 -0
  73. vllm/compilation/wrapper.py +136 -0
  74. vllm/config/__init__.py +814 -0
  75. vllm/config/cache.py +220 -0
  76. vllm/config/compilation.py +673 -0
  77. vllm/config/device.py +74 -0
  78. vllm/config/kv_events.py +50 -0
  79. vllm/config/kv_transfer.py +111 -0
  80. vllm/config/load.py +113 -0
  81. vllm/config/lora.py +132 -0
  82. vllm/config/model.py +1912 -0
  83. vllm/config/multimodal.py +129 -0
  84. vllm/config/observability.py +99 -0
  85. vllm/config/parallel.py +524 -0
  86. vllm/config/pooler.py +97 -0
  87. vllm/config/scheduler.py +287 -0
  88. vllm/config/speculative.py +568 -0
  89. vllm/config/speech_to_text.py +39 -0
  90. vllm/config/structured_outputs.py +64 -0
  91. vllm/config/utils.py +145 -0
  92. vllm/connections.py +186 -0
  93. vllm/device_allocator/__init__.py +0 -0
  94. vllm/device_allocator/cumem.py +311 -0
  95. vllm/distributed/__init__.py +6 -0
  96. vllm/distributed/communication_op.py +41 -0
  97. vllm/distributed/device_communicators/__init__.py +0 -0
  98. vllm/distributed/device_communicators/all2all.py +440 -0
  99. vllm/distributed/device_communicators/all_reduce_utils.py +317 -0
  100. vllm/distributed/device_communicators/base_device_communicator.py +295 -0
  101. vllm/distributed/device_communicators/cpu_communicator.py +201 -0
  102. vllm/distributed/device_communicators/cuda_communicator.py +323 -0
  103. vllm/distributed/device_communicators/cuda_wrapper.py +180 -0
  104. vllm/distributed/device_communicators/custom_all_reduce.py +311 -0
  105. vllm/distributed/device_communicators/mnnvl_compat.py +28 -0
  106. vllm/distributed/device_communicators/pynccl.py +340 -0
  107. vllm/distributed/device_communicators/pynccl_allocator.py +186 -0
  108. vllm/distributed/device_communicators/pynccl_wrapper.py +416 -0
  109. vllm/distributed/device_communicators/quick_all_reduce.py +278 -0
  110. vllm/distributed/device_communicators/ray_communicator.py +258 -0
  111. vllm/distributed/device_communicators/shm_broadcast.py +589 -0
  112. vllm/distributed/device_communicators/shm_object_storage.py +635 -0
  113. vllm/distributed/device_communicators/symm_mem.py +136 -0
  114. vllm/distributed/device_communicators/tpu_communicator.py +102 -0
  115. vllm/distributed/device_communicators/xpu_communicator.py +94 -0
  116. vllm/distributed/eplb/__init__.py +8 -0
  117. vllm/distributed/eplb/eplb_state.py +620 -0
  118. vllm/distributed/eplb/rebalance_algo.py +239 -0
  119. vllm/distributed/eplb/rebalance_execute.py +424 -0
  120. vllm/distributed/kv_events.py +362 -0
  121. vllm/distributed/kv_transfer/README.md +29 -0
  122. vllm/distributed/kv_transfer/__init__.py +13 -0
  123. vllm/distributed/kv_transfer/disagg_prefill_workflow.jpg +0 -0
  124. vllm/distributed/kv_transfer/kv_connector/__init__.py +0 -0
  125. vllm/distributed/kv_transfer/kv_connector/base.py +10 -0
  126. vllm/distributed/kv_transfer/kv_connector/factory.py +113 -0
  127. vllm/distributed/kv_transfer/kv_connector/utils.py +261 -0
  128. vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +6 -0
  129. vllm/distributed/kv_transfer/kv_connector/v1/base.py +388 -0
  130. vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +168 -0
  131. vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +100 -0
  132. vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +328 -0
  133. vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +1473 -0
  134. vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +485 -0
  135. vllm/distributed/kv_transfer/kv_connector/v1/p2p/__init__.py +0 -0
  136. vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py +488 -0
  137. vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +550 -0
  138. vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +267 -0
  139. vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +418 -0
  140. vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
  141. vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +175 -0
  142. vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +161 -0
  143. vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +237 -0
  144. vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
  145. vllm/distributed/kv_transfer/kv_pipe/base.py +67 -0
  146. vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +290 -0
  147. vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +280 -0
  148. vllm/distributed/kv_transfer/kv_transfer_state.py +73 -0
  149. vllm/distributed/parallel_state.py +1532 -0
  150. vllm/distributed/tpu_distributed_utils.py +178 -0
  151. vllm/distributed/utils.py +536 -0
  152. vllm/engine/__init__.py +0 -0
  153. vllm/engine/arg_utils.py +1778 -0
  154. vllm/engine/async_llm_engine.py +6 -0
  155. vllm/engine/llm_engine.py +6 -0
  156. vllm/engine/metrics.py +577 -0
  157. vllm/engine/metrics_types.py +84 -0
  158. vllm/engine/protocol.py +333 -0
  159. vllm/entrypoints/__init__.py +0 -0
  160. vllm/entrypoints/api_server.py +178 -0
  161. vllm/entrypoints/chat_utils.py +1705 -0
  162. vllm/entrypoints/cli/__init__.py +12 -0
  163. vllm/entrypoints/cli/benchmark/__init__.py +0 -0
  164. vllm/entrypoints/cli/benchmark/base.py +25 -0
  165. vllm/entrypoints/cli/benchmark/latency.py +21 -0
  166. vllm/entrypoints/cli/benchmark/main.py +55 -0
  167. vllm/entrypoints/cli/benchmark/serve.py +21 -0
  168. vllm/entrypoints/cli/benchmark/throughput.py +21 -0
  169. vllm/entrypoints/cli/collect_env.py +36 -0
  170. vllm/entrypoints/cli/main.py +60 -0
  171. vllm/entrypoints/cli/openai.py +233 -0
  172. vllm/entrypoints/cli/run_batch.py +67 -0
  173. vllm/entrypoints/cli/serve.py +232 -0
  174. vllm/entrypoints/cli/types.py +29 -0
  175. vllm/entrypoints/constants.py +10 -0
  176. vllm/entrypoints/context.py +481 -0
  177. vllm/entrypoints/harmony_utils.py +436 -0
  178. vllm/entrypoints/launcher.py +164 -0
  179. vllm/entrypoints/llm.py +1629 -0
  180. vllm/entrypoints/logger.py +79 -0
  181. vllm/entrypoints/openai/__init__.py +0 -0
  182. vllm/entrypoints/openai/api_server.py +1953 -0
  183. vllm/entrypoints/openai/cli_args.py +288 -0
  184. vllm/entrypoints/openai/logits_processors.py +90 -0
  185. vllm/entrypoints/openai/protocol.py +2757 -0
  186. vllm/entrypoints/openai/run_batch.py +491 -0
  187. vllm/entrypoints/openai/serving_chat.py +1597 -0
  188. vllm/entrypoints/openai/serving_classification.py +173 -0
  189. vllm/entrypoints/openai/serving_completion.py +692 -0
  190. vllm/entrypoints/openai/serving_embedding.py +631 -0
  191. vllm/entrypoints/openai/serving_engine.py +992 -0
  192. vllm/entrypoints/openai/serving_models.py +288 -0
  193. vllm/entrypoints/openai/serving_pooling.py +276 -0
  194. vllm/entrypoints/openai/serving_responses.py +1709 -0
  195. vllm/entrypoints/openai/serving_score.py +479 -0
  196. vllm/entrypoints/openai/serving_tokenization.py +196 -0
  197. vllm/entrypoints/openai/serving_transcription.py +136 -0
  198. vllm/entrypoints/openai/speech_to_text.py +388 -0
  199. vllm/entrypoints/openai/tool_parsers/__init__.py +55 -0
  200. vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +164 -0
  201. vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +367 -0
  202. vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +370 -0
  203. vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +185 -0
  204. vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +259 -0
  205. vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +237 -0
  206. vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +455 -0
  207. vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +372 -0
  208. vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +216 -0
  209. vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +308 -0
  210. vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +377 -0
  211. vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +316 -0
  212. vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +269 -0
  213. vllm/entrypoints/openai/tool_parsers/longcat_tool_parser.py +39 -0
  214. vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +816 -0
  215. vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +369 -0
  216. vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +93 -0
  217. vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +112 -0
  218. vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +308 -0
  219. vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +707 -0
  220. vllm/entrypoints/openai/tool_parsers/qwen3xml_tool_parser.py +1137 -0
  221. vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +679 -0
  222. vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +296 -0
  223. vllm/entrypoints/openai/tool_parsers/utils.py +124 -0
  224. vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +524 -0
  225. vllm/entrypoints/renderer.py +395 -0
  226. vllm/entrypoints/score_utils.py +232 -0
  227. vllm/entrypoints/ssl.py +75 -0
  228. vllm/entrypoints/tool.py +139 -0
  229. vllm/entrypoints/tool_server.py +206 -0
  230. vllm/entrypoints/utils.py +233 -0
  231. vllm/env_override.py +23 -0
  232. vllm/envs.py +1590 -0
  233. vllm/executor/__init__.py +0 -0
  234. vllm/executor/executor_base.py +381 -0
  235. vllm/executor/msgspec_utils.py +35 -0
  236. vllm/executor/ray_distributed_executor.py +699 -0
  237. vllm/executor/ray_utils.py +410 -0
  238. vllm/executor/uniproc_executor.py +176 -0
  239. vllm/forward_context.py +402 -0
  240. vllm/inputs/__init__.py +30 -0
  241. vllm/inputs/data.py +356 -0
  242. vllm/inputs/parse.py +151 -0
  243. vllm/inputs/preprocess.py +664 -0
  244. vllm/logger.py +229 -0
  245. vllm/logging_utils/__init__.py +10 -0
  246. vllm/logging_utils/dump_input.py +81 -0
  247. vllm/logging_utils/formatter.py +79 -0
  248. vllm/logging_utils/log_time.py +32 -0
  249. vllm/logits_process.py +119 -0
  250. vllm/logprobs.py +28 -0
  251. vllm/lora/__init__.py +0 -0
  252. vllm/lora/layers/__init__.py +34 -0
  253. vllm/lora/layers/base.py +69 -0
  254. vllm/lora/layers/base_linear.py +185 -0
  255. vllm/lora/layers/column_parallel_linear.py +609 -0
  256. vllm/lora/layers/logits_processor.py +247 -0
  257. vllm/lora/layers/qkv_x_parallel_linear.py +8 -0
  258. vllm/lora/layers/replicated_linear.py +60 -0
  259. vllm/lora/layers/row_parallel_linear.py +196 -0
  260. vllm/lora/layers/utils.py +65 -0
  261. vllm/lora/layers/vocal_parallel_embedding.py +174 -0
  262. vllm/lora/lora_weights.py +199 -0
  263. vllm/lora/models.py +816 -0
  264. vllm/lora/ops/__init__.py +0 -0
  265. vllm/lora/ops/ipex_ops/__init__.py +7 -0
  266. vllm/lora/ops/ipex_ops/lora_ops.py +44 -0
  267. vllm/lora/ops/torch_ops/__init__.py +16 -0
  268. vllm/lora/ops/torch_ops/lora_ops.py +119 -0
  269. vllm/lora/ops/triton_ops/__init__.py +12 -0
  270. vllm/lora/ops/triton_ops/kernel_utils.py +243 -0
  271. vllm/lora/ops/triton_ops/lora_expand_op.py +289 -0
  272. vllm/lora/ops/triton_ops/lora_kernel_metadata.py +148 -0
  273. vllm/lora/ops/triton_ops/lora_shrink_op.py +243 -0
  274. vllm/lora/ops/triton_ops/utils.py +126 -0
  275. vllm/lora/ops/xla_ops/__init__.py +7 -0
  276. vllm/lora/ops/xla_ops/lora_ops.py +144 -0
  277. vllm/lora/peft_helper.py +127 -0
  278. vllm/lora/punica_wrapper/__init__.py +10 -0
  279. vllm/lora/punica_wrapper/punica_base.py +458 -0
  280. vllm/lora/punica_wrapper/punica_cpu.py +349 -0
  281. vllm/lora/punica_wrapper/punica_gpu.py +272 -0
  282. vllm/lora/punica_wrapper/punica_selector.py +20 -0
  283. vllm/lora/punica_wrapper/punica_tpu.py +391 -0
  284. vllm/lora/punica_wrapper/punica_xpu.py +276 -0
  285. vllm/lora/punica_wrapper/utils.py +136 -0
  286. vllm/lora/request.py +97 -0
  287. vllm/lora/resolver.py +85 -0
  288. vllm/lora/utils.py +246 -0
  289. vllm/lora/worker_manager.py +267 -0
  290. vllm/model_executor/__init__.py +12 -0
  291. vllm/model_executor/custom_op.py +194 -0
  292. vllm/model_executor/layers/__init__.py +0 -0
  293. vllm/model_executor/layers/activation.py +575 -0
  294. vllm/model_executor/layers/attention_layer_base.py +23 -0
  295. vllm/model_executor/layers/fla/__init__.py +8 -0
  296. vllm/model_executor/layers/fla/ops/__init__.py +17 -0
  297. vllm/model_executor/layers/fla/ops/chunk.py +225 -0
  298. vllm/model_executor/layers/fla/ops/chunk_delta_h.py +290 -0
  299. vllm/model_executor/layers/fla/ops/chunk_o.py +177 -0
  300. vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +140 -0
  301. vllm/model_executor/layers/fla/ops/cumsum.py +226 -0
  302. vllm/model_executor/layers/fla/ops/fused_recurrent.py +366 -0
  303. vllm/model_executor/layers/fla/ops/index.py +39 -0
  304. vllm/model_executor/layers/fla/ops/l2norm.py +143 -0
  305. vllm/model_executor/layers/fla/ops/layernorm_guard.py +337 -0
  306. vllm/model_executor/layers/fla/ops/op.py +39 -0
  307. vllm/model_executor/layers/fla/ops/solve_tril.py +365 -0
  308. vllm/model_executor/layers/fla/ops/utils.py +180 -0
  309. vllm/model_executor/layers/fla/ops/wy_fast.py +114 -0
  310. vllm/model_executor/layers/fused_moe/__init__.py +89 -0
  311. vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +322 -0
  312. vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +141 -0
  313. vllm/model_executor/layers/fused_moe/config.py +804 -0
  314. vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  315. vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  316. vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  317. vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  318. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  319. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +218 -0
  320. vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
  321. vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  322. vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  323. vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  324. vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  325. vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  326. vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
  327. vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H100,dtype=fp8_w8a8.json +123 -0
  328. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  329. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  330. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20-3e.json +146 -0
  331. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20.json +146 -0
  332. vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
  333. vllm/model_executor/layers/fused_moe/configs/E=128,N=352,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +122 -0
  334. 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
  335. 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
  336. 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
  337. 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
  338. 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
  339. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e.json +146 -0
  340. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
  341. 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
  342. vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
  343. vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  344. vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +146 -0
  345. vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +114 -0
  346. 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
  347. 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
  348. 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
  349. 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
  350. 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
  351. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
  352. 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
  353. vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
  354. vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
  355. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
  356. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
  357. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200.json +146 -0
  358. vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
  359. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  360. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  361. vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  362. vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  363. vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  364. vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
  365. vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  366. vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  367. vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  368. vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  369. vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
  370. vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  371. vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  372. vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
  373. vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  374. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
  375. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  376. vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
  377. vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
  378. vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  379. vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H20-3e.json +146 -0
  380. vllm/model_executor/layers/fused_moe/configs/E=160,N=320,device_name=NVIDIA_H20-3e.json +146 -0
  381. vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  382. 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
  383. 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
  384. 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
  385. 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
  386. 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
  387. 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
  388. 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
  389. vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
  390. 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
  391. 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
  392. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
  393. 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
  394. vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
  395. 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
  396. 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
  397. 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
  398. 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
  399. 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
  400. 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
  401. 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
  402. 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
  403. 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
  404. 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
  405. 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
  406. 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
  407. 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
  408. vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  409. vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  410. 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
  411. 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
  412. 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
  413. 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
  414. 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
  415. 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
  416. 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
  417. 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
  418. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_B200.json +146 -0
  419. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +147 -0
  420. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  421. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
  422. vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
  423. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
  424. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
  425. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  426. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
  427. vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
  428. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_B200.json +146 -0
  429. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
  430. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  431. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H20-3e.json +146 -0
  432. vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H200.json +146 -0
  433. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_B200.json +146 -0
  434. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H20-3e.json +146 -0
  435. vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
  436. vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
  437. vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
  438. vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
  439. vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
  440. vllm/model_executor/layers/fused_moe/configs/E=62,N=128,device_name=AMD_Instinct_MI300X.json +200 -0
  441. vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=AMD_Instinct_MI300X.json +200 -0
  442. vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  443. vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=AMD_Instinct_MI300X.json +200 -0
  444. vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  445. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  446. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  447. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  448. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  449. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  450. vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
  451. vllm/model_executor/layers/fused_moe/configs/E=64,N=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  452. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  453. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  454. vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
  455. vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  456. vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20.json +146 -0
  457. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  458. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  459. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  460. vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
  461. vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  462. vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20.json +146 -0
  463. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  464. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
  465. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
  466. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  467. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  468. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  469. vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
  470. vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
  471. vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20.json +146 -0
  472. vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=NVIDIA_H20.json +146 -0
  473. vllm/model_executor/layers/fused_moe/configs/E=72,N=192,device_name=AMD_Instinct_MI300X.json +200 -0
  474. vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=AMD_Instinct_MI300X.json +200 -0
  475. vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  476. vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=AMD_Instinct_MI300X.json +200 -0
  477. vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  478. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  479. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
  480. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  481. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
  482. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
  483. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  484. vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
  485. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  486. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
  487. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  488. vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
  489. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  490. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
  491. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  492. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
  493. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  494. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  495. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  496. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  497. vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
  498. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  499. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
  500. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  501. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
  502. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  503. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  504. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  505. 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
  506. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  507. vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
  508. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  509. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
  510. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  511. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
  512. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
  513. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  514. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
  515. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  516. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  517. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  518. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
  519. vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
  520. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  521. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
  522. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  523. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
  524. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  525. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  526. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  527. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  528. vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
  529. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  530. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
  531. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  532. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
  533. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
  534. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  535. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
  536. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  537. vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
  538. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
  539. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
  540. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
  541. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
  542. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
  543. vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
  544. vllm/model_executor/layers/fused_moe/configs/README +12 -0
  545. vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +300 -0
  546. vllm/model_executor/layers/fused_moe/cutlass_moe.py +957 -0
  547. vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +362 -0
  548. vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +413 -0
  549. vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +361 -0
  550. vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +274 -0
  551. vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +268 -0
  552. vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +300 -0
  553. vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +184 -0
  554. vllm/model_executor/layers/fused_moe/fused_batched_moe.py +993 -0
  555. vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +239 -0
  556. vllm/model_executor/layers/fused_moe/fused_moe.py +1890 -0
  557. vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +307 -0
  558. vllm/model_executor/layers/fused_moe/layer.py +2195 -0
  559. vllm/model_executor/layers/fused_moe/modular_kernel.py +1038 -0
  560. vllm/model_executor/layers/fused_moe/moe_align_block_size.py +87 -0
  561. vllm/model_executor/layers/fused_moe/moe_pallas.py +80 -0
  562. vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +205 -0
  563. vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
  564. vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +341 -0
  565. vllm/model_executor/layers/fused_moe/prepare_finalize.py +70 -0
  566. vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +424 -0
  567. vllm/model_executor/layers/fused_moe/routing_simulator.py +291 -0
  568. vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +146 -0
  569. vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +143 -0
  570. vllm/model_executor/layers/fused_moe/trtllm_moe.py +191 -0
  571. vllm/model_executor/layers/fused_moe/utils.py +274 -0
  572. vllm/model_executor/layers/layernorm.py +395 -0
  573. vllm/model_executor/layers/lightning_attn.py +661 -0
  574. vllm/model_executor/layers/linear.py +1603 -0
  575. vllm/model_executor/layers/logits_processor.py +106 -0
  576. vllm/model_executor/layers/mamba/__init__.py +0 -0
  577. vllm/model_executor/layers/mamba/abstract.py +42 -0
  578. vllm/model_executor/layers/mamba/linear_attn.py +403 -0
  579. vllm/model_executor/layers/mamba/mamba_mixer.py +466 -0
  580. vllm/model_executor/layers/mamba/mamba_mixer2.py +764 -0
  581. vllm/model_executor/layers/mamba/mamba_utils.py +186 -0
  582. vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
  583. vllm/model_executor/layers/mamba/ops/causal_conv1d.py +1092 -0
  584. vllm/model_executor/layers/mamba/ops/layernorm_gated.py +168 -0
  585. vllm/model_executor/layers/mamba/ops/mamba_ssm.py +414 -0
  586. vllm/model_executor/layers/mamba/ops/ssd_bmm.py +242 -0
  587. vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +527 -0
  588. vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +724 -0
  589. vllm/model_executor/layers/mamba/ops/ssd_combined.py +238 -0
  590. vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +200 -0
  591. vllm/model_executor/layers/mamba/short_conv.py +253 -0
  592. vllm/model_executor/layers/mla.py +173 -0
  593. vllm/model_executor/layers/pooler.py +719 -0
  594. vllm/model_executor/layers/quantization/__init__.py +157 -0
  595. vllm/model_executor/layers/quantization/auto_round.py +388 -0
  596. vllm/model_executor/layers/quantization/awq.py +228 -0
  597. vllm/model_executor/layers/quantization/awq_marlin.py +554 -0
  598. vllm/model_executor/layers/quantization/awq_triton.py +320 -0
  599. vllm/model_executor/layers/quantization/base_config.py +170 -0
  600. vllm/model_executor/layers/quantization/bitblas.py +464 -0
  601. vllm/model_executor/layers/quantization/bitsandbytes.py +627 -0
  602. vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +0 -0
  603. vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +797 -0
  604. vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2074 -0
  605. vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +27 -0
  606. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +366 -0
  607. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
  608. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +160 -0
  609. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +105 -0
  610. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +185 -0
  611. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +169 -0
  612. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +135 -0
  613. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +121 -0
  614. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +157 -0
  615. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +111 -0
  616. vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +201 -0
  617. vllm/model_executor/layers/quantization/compressed_tensors/transform/__init__.py +0 -0
  618. vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +238 -0
  619. vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +153 -0
  620. vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/__init__.py +0 -0
  621. vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/linear_qutlass_nvfp4.py +46 -0
  622. vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
  623. vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +206 -0
  624. vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
  625. vllm/model_executor/layers/quantization/deepspeedfp.py +196 -0
  626. vllm/model_executor/layers/quantization/experts_int8.py +223 -0
  627. vllm/model_executor/layers/quantization/fbgemm_fp8.py +172 -0
  628. vllm/model_executor/layers/quantization/fp8.py +1098 -0
  629. vllm/model_executor/layers/quantization/gguf.py +599 -0
  630. vllm/model_executor/layers/quantization/gptq.py +340 -0
  631. vllm/model_executor/layers/quantization/gptq_bitblas.py +448 -0
  632. vllm/model_executor/layers/quantization/gptq_marlin.py +751 -0
  633. vllm/model_executor/layers/quantization/gptq_marlin_24.py +297 -0
  634. vllm/model_executor/layers/quantization/hqq_marlin.py +333 -0
  635. vllm/model_executor/layers/quantization/inc.py +61 -0
  636. vllm/model_executor/layers/quantization/input_quant_fp8.py +156 -0
  637. vllm/model_executor/layers/quantization/ipex_quant.py +415 -0
  638. vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
  639. vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +91 -0
  640. vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +93 -0
  641. vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +116 -0
  642. vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +302 -0
  643. vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +92 -0
  644. vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +117 -0
  645. vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +92 -0
  646. vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +143 -0
  647. vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +144 -0
  648. vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +139 -0
  649. vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +67 -0
  650. vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +89 -0
  651. vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +161 -0
  652. vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +206 -0
  653. vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +137 -0
  654. vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +41 -0
  655. vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +104 -0
  656. vllm/model_executor/layers/quantization/kv_cache.py +143 -0
  657. vllm/model_executor/layers/quantization/modelopt.py +1596 -0
  658. vllm/model_executor/layers/quantization/moe_wna16.py +484 -0
  659. vllm/model_executor/layers/quantization/mxfp4.py +988 -0
  660. vllm/model_executor/layers/quantization/petit.py +306 -0
  661. vllm/model_executor/layers/quantization/ptpc_fp8.py +129 -0
  662. vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
  663. vllm/model_executor/layers/quantization/quark/quark.py +432 -0
  664. vllm/model_executor/layers/quantization/quark/quark_moe.py +561 -0
  665. vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
  666. vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
  667. vllm/model_executor/layers/quantization/quark/schemes/quark_w4a4_mxfp4.py +239 -0
  668. vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +163 -0
  669. vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +122 -0
  670. vllm/model_executor/layers/quantization/quark/utils.py +105 -0
  671. vllm/model_executor/layers/quantization/rtn.py +466 -0
  672. vllm/model_executor/layers/quantization/schema.py +86 -0
  673. vllm/model_executor/layers/quantization/torchao.py +214 -0
  674. vllm/model_executor/layers/quantization/tpu_int8.py +125 -0
  675. vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
  676. vllm/model_executor/layers/quantization/utils/allspark_utils.py +52 -0
  677. vllm/model_executor/layers/quantization/utils/bitblas_utils.py +210 -0
  678. 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
  679. 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
  680. 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
  681. 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
  682. 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
  683. 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
  684. 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
  685. 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
  686. 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
  687. 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
  688. 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
  689. 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
  690. 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
  691. 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
  692. 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
  693. 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
  694. 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
  695. 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
  696. 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
  697. 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
  698. 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
  699. 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
  700. 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
  701. 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
  702. 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
  703. 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
  704. 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
  705. 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
  706. 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
  707. 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
  708. 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
  709. 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
  710. 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
  711. 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
  712. 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
  713. 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
  714. 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
  715. 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
  716. 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
  717. 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
  718. 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
  719. 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
  720. 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
  721. 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
  722. 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
  723. 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
  724. 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
  725. 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
  726. 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
  727. 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
  728. 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
  729. 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
  730. 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
  731. 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
  732. 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
  733. 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
  734. 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
  735. 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
  736. 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
  737. 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
  738. 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
  739. 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
  740. 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
  741. 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
  742. 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
  743. 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
  744. 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
  745. 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
  746. 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
  747. 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
  748. 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
  749. 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
  750. 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
  751. 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
  752. 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
  753. 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
  754. 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
  755. 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
  756. 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
  757. 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
  758. 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
  759. 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
  760. 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
  761. 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
  762. 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
  763. 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
  764. 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
  765. 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
  766. 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
  767. 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
  768. 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
  769. 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
  770. 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
  771. 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
  772. 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
  773. 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
  774. 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
  775. 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
  776. 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
  777. 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
  778. 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
  779. 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
  780. 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
  781. 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
  782. 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
  783. 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
  784. 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
  785. 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
  786. 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
  787. 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
  788. 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
  789. 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
  790. 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
  791. 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
  792. 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
  793. 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
  794. 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
  795. 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
  796. 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
  797. 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
  798. 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
  799. 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
  800. 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
  801. 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
  802. 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
  803. 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
  804. 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
  805. 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
  806. 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
  807. 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
  808. 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
  809. 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
  810. 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
  811. 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
  812. 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
  813. 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
  814. 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
  815. 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
  816. 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
  817. 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
  818. 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
  819. 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
  820. 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
  821. 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
  822. 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
  823. 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
  824. 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
  825. 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
  826. 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
  827. 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
  828. 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
  829. 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
  830. 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
  831. 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
  832. 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
  833. 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
  834. 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
  835. 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
  836. 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
  837. 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
  838. 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
  839. 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
  840. 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
  841. 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
  842. 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
  843. 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
  844. 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
  845. 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
  846. 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
  847. 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
  848. 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
  849. 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
  850. 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
  851. 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
  852. 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
  853. 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
  854. 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
  855. 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
  856. 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
  857. 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
  858. 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
  859. 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
  860. 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
  861. 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
  862. 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
  863. 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
  864. 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
  865. 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
  866. 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
  867. 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
  868. 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
  869. 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
  870. 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
  871. 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
  872. 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
  873. 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
  874. 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
  875. 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
  876. 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
  877. 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
  878. 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
  879. 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
  880. 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
  881. 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
  882. 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
  883. 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
  884. 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
  885. 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
  886. 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
  887. 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
  888. vllm/model_executor/layers/quantization/utils/configs/README.md +3 -0
  889. vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +79 -0
  890. vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +248 -0
  891. vllm/model_executor/layers/quantization/utils/fp8_utils.py +949 -0
  892. vllm/model_executor/layers/quantization/utils/gptq_utils.py +146 -0
  893. vllm/model_executor/layers/quantization/utils/int8_utils.py +492 -0
  894. vllm/model_executor/layers/quantization/utils/layer_utils.py +40 -0
  895. vllm/model_executor/layers/quantization/utils/machete_utils.py +50 -0
  896. vllm/model_executor/layers/quantization/utils/marlin_utils.py +479 -0
  897. vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +396 -0
  898. vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +345 -0
  899. vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +165 -0
  900. vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +464 -0
  901. vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +141 -0
  902. vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +20 -0
  903. vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +137 -0
  904. vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +59 -0
  905. vllm/model_executor/layers/quantization/utils/petit_utils.py +122 -0
  906. vllm/model_executor/layers/quantization/utils/quant_utils.py +641 -0
  907. vllm/model_executor/layers/quantization/utils/w8a8_utils.py +458 -0
  908. vllm/model_executor/layers/resampler.py +270 -0
  909. vllm/model_executor/layers/rotary_embedding/__init__.py +204 -0
  910. vllm/model_executor/layers/rotary_embedding/base.py +177 -0
  911. vllm/model_executor/layers/rotary_embedding/common.py +150 -0
  912. vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +138 -0
  913. vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +197 -0
  914. vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +41 -0
  915. vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +67 -0
  916. vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +80 -0
  917. vllm/model_executor/layers/rotary_embedding/linear_scaling_rope.py +115 -0
  918. vllm/model_executor/layers/rotary_embedding/llama3_rope.py +54 -0
  919. vllm/model_executor/layers/rotary_embedding/llama4_vision_rope.py +81 -0
  920. vllm/model_executor/layers/rotary_embedding/mrope.py +1321 -0
  921. vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +42 -0
  922. vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +129 -0
  923. vllm/model_executor/layers/rotary_embedding/rocm_aiter_rope_ops.py +86 -0
  924. vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +68 -0
  925. vllm/model_executor/layers/shared_fused_moe/__init__.py +6 -0
  926. vllm/model_executor/layers/shared_fused_moe/shared_fused_moe.py +56 -0
  927. vllm/model_executor/layers/utils.py +195 -0
  928. vllm/model_executor/layers/vocab_parallel_embedding.py +487 -0
  929. vllm/model_executor/model_loader/__init__.py +138 -0
  930. vllm/model_executor/model_loader/base_loader.py +52 -0
  931. vllm/model_executor/model_loader/bitsandbytes_loader.py +788 -0
  932. vllm/model_executor/model_loader/default_loader.py +277 -0
  933. vllm/model_executor/model_loader/dummy_loader.py +28 -0
  934. vllm/model_executor/model_loader/gguf_loader.py +155 -0
  935. vllm/model_executor/model_loader/runai_streamer_loader.py +104 -0
  936. vllm/model_executor/model_loader/sharded_state_loader.py +199 -0
  937. vllm/model_executor/model_loader/tensorizer.py +738 -0
  938. vllm/model_executor/model_loader/tensorizer_loader.py +143 -0
  939. vllm/model_executor/model_loader/tpu.py +114 -0
  940. vllm/model_executor/model_loader/utils.py +292 -0
  941. vllm/model_executor/model_loader/weight_utils.py +990 -0
  942. vllm/model_executor/models/__init__.py +33 -0
  943. vllm/model_executor/models/adapters.py +542 -0
  944. vllm/model_executor/models/aimv2.py +246 -0
  945. vllm/model_executor/models/apertus.py +579 -0
  946. vllm/model_executor/models/arcee.py +422 -0
  947. vllm/model_executor/models/arctic.py +558 -0
  948. vllm/model_executor/models/aria.py +650 -0
  949. vllm/model_executor/models/aya_vision.py +468 -0
  950. vllm/model_executor/models/baichuan.py +474 -0
  951. vllm/model_executor/models/bailing_moe.py +642 -0
  952. vllm/model_executor/models/bamba.py +514 -0
  953. vllm/model_executor/models/bert.py +665 -0
  954. vllm/model_executor/models/bert_with_rope.py +687 -0
  955. vllm/model_executor/models/blip.py +339 -0
  956. vllm/model_executor/models/blip2.py +712 -0
  957. vllm/model_executor/models/bloom.py +374 -0
  958. vllm/model_executor/models/chameleon.py +1139 -0
  959. vllm/model_executor/models/chatglm.py +476 -0
  960. vllm/model_executor/models/clip.py +407 -0
  961. vllm/model_executor/models/cohere2_vision.py +481 -0
  962. vllm/model_executor/models/commandr.py +465 -0
  963. vllm/model_executor/models/config.py +445 -0
  964. vllm/model_executor/models/dbrx.py +471 -0
  965. vllm/model_executor/models/deepseek.py +497 -0
  966. vllm/model_executor/models/deepseek_eagle.py +240 -0
  967. vllm/model_executor/models/deepseek_mtp.py +289 -0
  968. vllm/model_executor/models/deepseek_v2.py +1444 -0
  969. vllm/model_executor/models/deepseek_vl2.py +658 -0
  970. vllm/model_executor/models/dots1.py +546 -0
  971. vllm/model_executor/models/dots_ocr.py +873 -0
  972. vllm/model_executor/models/ernie45.py +43 -0
  973. vllm/model_executor/models/ernie45_moe.py +607 -0
  974. vllm/model_executor/models/ernie45_vl.py +1527 -0
  975. vllm/model_executor/models/ernie45_vl_moe.py +727 -0
  976. vllm/model_executor/models/ernie_mtp.py +268 -0
  977. vllm/model_executor/models/exaone.py +550 -0
  978. vllm/model_executor/models/exaone4.py +533 -0
  979. vllm/model_executor/models/fairseq2_llama.py +154 -0
  980. vllm/model_executor/models/falcon.py +509 -0
  981. vllm/model_executor/models/falcon_h1.py +674 -0
  982. vllm/model_executor/models/fuyu.py +399 -0
  983. vllm/model_executor/models/gemma.py +425 -0
  984. vllm/model_executor/models/gemma2.py +422 -0
  985. vllm/model_executor/models/gemma3.py +555 -0
  986. vllm/model_executor/models/gemma3_mm.py +721 -0
  987. vllm/model_executor/models/gemma3n.py +1113 -0
  988. vllm/model_executor/models/gemma3n_mm.py +761 -0
  989. vllm/model_executor/models/glm.py +23 -0
  990. vllm/model_executor/models/glm4.py +304 -0
  991. vllm/model_executor/models/glm4_1v.py +1690 -0
  992. vllm/model_executor/models/glm4_moe.py +727 -0
  993. vllm/model_executor/models/glm4_moe_mtp.py +301 -0
  994. vllm/model_executor/models/glm4v.py +654 -0
  995. vllm/model_executor/models/gpt2.py +380 -0
  996. vllm/model_executor/models/gpt_bigcode.py +344 -0
  997. vllm/model_executor/models/gpt_j.py +339 -0
  998. vllm/model_executor/models/gpt_neox.py +330 -0
  999. vllm/model_executor/models/gpt_oss.py +712 -0
  1000. vllm/model_executor/models/granite.py +489 -0
  1001. vllm/model_executor/models/granite_speech.py +794 -0
  1002. vllm/model_executor/models/granitemoe.py +550 -0
  1003. vllm/model_executor/models/granitemoehybrid.py +614 -0
  1004. vllm/model_executor/models/granitemoeshared.py +332 -0
  1005. vllm/model_executor/models/gritlm.py +262 -0
  1006. vllm/model_executor/models/grok1.py +547 -0
  1007. vllm/model_executor/models/h2ovl.py +536 -0
  1008. vllm/model_executor/models/hunyuan_v1.py +1042 -0
  1009. vllm/model_executor/models/hyperclovax_vision.py +1192 -0
  1010. vllm/model_executor/models/idefics2_vision_model.py +417 -0
  1011. vllm/model_executor/models/idefics3.py +756 -0
  1012. vllm/model_executor/models/interfaces.py +959 -0
  1013. vllm/model_executor/models/interfaces_base.py +192 -0
  1014. vllm/model_executor/models/intern_vit.py +441 -0
  1015. vllm/model_executor/models/internlm2.py +450 -0
  1016. vllm/model_executor/models/internlm2_ve.py +148 -0
  1017. vllm/model_executor/models/interns1.py +838 -0
  1018. vllm/model_executor/models/interns1_vit.py +418 -0
  1019. vllm/model_executor/models/internvl.py +1423 -0
  1020. vllm/model_executor/models/jais.py +373 -0
  1021. vllm/model_executor/models/jamba.py +591 -0
  1022. vllm/model_executor/models/jina_vl.py +144 -0
  1023. vllm/model_executor/models/keye.py +1680 -0
  1024. vllm/model_executor/models/keye_vl1_5.py +602 -0
  1025. vllm/model_executor/models/kimi_vl.py +618 -0
  1026. vllm/model_executor/models/lfm2.py +548 -0
  1027. vllm/model_executor/models/llama.py +669 -0
  1028. vllm/model_executor/models/llama4.py +746 -0
  1029. vllm/model_executor/models/llama4_eagle.py +239 -0
  1030. vllm/model_executor/models/llama_eagle.py +179 -0
  1031. vllm/model_executor/models/llama_eagle3.py +296 -0
  1032. vllm/model_executor/models/llava.py +870 -0
  1033. vllm/model_executor/models/llava_next.py +571 -0
  1034. vllm/model_executor/models/llava_next_video.py +476 -0
  1035. vllm/model_executor/models/llava_onevision.py +942 -0
  1036. vllm/model_executor/models/longcat_flash.py +715 -0
  1037. vllm/model_executor/models/longcat_flash_mtp.py +352 -0
  1038. vllm/model_executor/models/mamba.py +275 -0
  1039. vllm/model_executor/models/mamba2.py +291 -0
  1040. vllm/model_executor/models/medusa.py +169 -0
  1041. vllm/model_executor/models/midashenglm.py +792 -0
  1042. vllm/model_executor/models/mimo.py +188 -0
  1043. vllm/model_executor/models/mimo_mtp.py +280 -0
  1044. vllm/model_executor/models/minicpm.py +631 -0
  1045. vllm/model_executor/models/minicpm3.py +230 -0
  1046. vllm/model_executor/models/minicpm_eagle.py +389 -0
  1047. vllm/model_executor/models/minicpmo.py +770 -0
  1048. vllm/model_executor/models/minicpmv.py +1784 -0
  1049. vllm/model_executor/models/minimax_text_01.py +986 -0
  1050. vllm/model_executor/models/minimax_vl_01.py +426 -0
  1051. vllm/model_executor/models/mistral3.py +628 -0
  1052. vllm/model_executor/models/mixtral.py +606 -0
  1053. vllm/model_executor/models/mllama4.py +1076 -0
  1054. vllm/model_executor/models/mlp_speculator.py +206 -0
  1055. vllm/model_executor/models/modernbert.py +374 -0
  1056. vllm/model_executor/models/module_mapping.py +72 -0
  1057. vllm/model_executor/models/molmo.py +1567 -0
  1058. vllm/model_executor/models/moonvit.py +673 -0
  1059. vllm/model_executor/models/motif.py +345 -0
  1060. vllm/model_executor/models/mpt.py +329 -0
  1061. vllm/model_executor/models/nano_nemotron_vl.py +1394 -0
  1062. vllm/model_executor/models/nemotron.py +507 -0
  1063. vllm/model_executor/models/nemotron_h.py +565 -0
  1064. vllm/model_executor/models/nemotron_nas.py +481 -0
  1065. vllm/model_executor/models/nemotron_vl.py +652 -0
  1066. vllm/model_executor/models/nvlm_d.py +203 -0
  1067. vllm/model_executor/models/olmo.py +404 -0
  1068. vllm/model_executor/models/olmo2.py +439 -0
  1069. vllm/model_executor/models/olmoe.py +483 -0
  1070. vllm/model_executor/models/opt.py +412 -0
  1071. vllm/model_executor/models/orion.py +348 -0
  1072. vllm/model_executor/models/ovis.py +559 -0
  1073. vllm/model_executor/models/ovis2_5.py +642 -0
  1074. vllm/model_executor/models/paligemma.py +411 -0
  1075. vllm/model_executor/models/persimmon.py +343 -0
  1076. vllm/model_executor/models/phi.py +356 -0
  1077. vllm/model_executor/models/phi3.py +19 -0
  1078. vllm/model_executor/models/phi3v.py +698 -0
  1079. vllm/model_executor/models/phi4_multimodal.py +1475 -0
  1080. vllm/model_executor/models/phi4mm.py +1279 -0
  1081. vllm/model_executor/models/phi4mm_audio.py +1254 -0
  1082. vllm/model_executor/models/phi4mm_utils.py +1875 -0
  1083. vllm/model_executor/models/phimoe.py +679 -0
  1084. vllm/model_executor/models/pixtral.py +1345 -0
  1085. vllm/model_executor/models/plamo2.py +978 -0
  1086. vllm/model_executor/models/qwen.py +361 -0
  1087. vllm/model_executor/models/qwen2.py +523 -0
  1088. vllm/model_executor/models/qwen2_5_omni_thinker.py +984 -0
  1089. vllm/model_executor/models/qwen2_5_vl.py +1481 -0
  1090. vllm/model_executor/models/qwen2_audio.py +489 -0
  1091. vllm/model_executor/models/qwen2_moe.py +558 -0
  1092. vllm/model_executor/models/qwen2_rm.py +122 -0
  1093. vllm/model_executor/models/qwen2_vl.py +1670 -0
  1094. vllm/model_executor/models/qwen3.py +341 -0
  1095. vllm/model_executor/models/qwen3_moe.py +692 -0
  1096. vllm/model_executor/models/qwen3_next.py +1266 -0
  1097. vllm/model_executor/models/qwen3_next_mtp.py +281 -0
  1098. vllm/model_executor/models/qwen3_vl.py +1613 -0
  1099. vllm/model_executor/models/qwen3_vl_moe.py +358 -0
  1100. vllm/model_executor/models/qwen_vl.py +795 -0
  1101. vllm/model_executor/models/radio.py +576 -0
  1102. vllm/model_executor/models/registry.py +990 -0
  1103. vllm/model_executor/models/roberta.py +252 -0
  1104. vllm/model_executor/models/rvl.py +103 -0
  1105. vllm/model_executor/models/seed_oss.py +485 -0
  1106. vllm/model_executor/models/siglip.py +540 -0
  1107. vllm/model_executor/models/siglip2navit.py +689 -0
  1108. vllm/model_executor/models/skyworkr1v.py +911 -0
  1109. vllm/model_executor/models/smolvlm.py +44 -0
  1110. vllm/model_executor/models/solar.py +504 -0
  1111. vllm/model_executor/models/stablelm.py +341 -0
  1112. vllm/model_executor/models/starcoder2.py +354 -0
  1113. vllm/model_executor/models/step3_text.py +510 -0
  1114. vllm/model_executor/models/step3_vl.py +1072 -0
  1115. vllm/model_executor/models/swin.py +475 -0
  1116. vllm/model_executor/models/tarsier.py +639 -0
  1117. vllm/model_executor/models/telechat2.py +151 -0
  1118. vllm/model_executor/models/teleflm.py +79 -0
  1119. vllm/model_executor/models/terratorch.py +294 -0
  1120. vllm/model_executor/models/transformers.py +948 -0
  1121. vllm/model_executor/models/ultravox.py +654 -0
  1122. vllm/model_executor/models/utils.py +808 -0
  1123. vllm/model_executor/models/vision.py +404 -0
  1124. vllm/model_executor/models/voxtral.py +786 -0
  1125. vllm/model_executor/models/whisper.py +963 -0
  1126. vllm/model_executor/models/zamba2.py +960 -0
  1127. vllm/model_executor/parameter.py +620 -0
  1128. vllm/model_executor/utils.py +86 -0
  1129. vllm/model_executor/warmup/__init__.py +0 -0
  1130. vllm/model_executor/warmup/deep_gemm_warmup.py +230 -0
  1131. vllm/model_executor/warmup/kernel_warmup.py +83 -0
  1132. vllm/multimodal/__init__.py +33 -0
  1133. vllm/multimodal/audio.py +116 -0
  1134. vllm/multimodal/base.py +27 -0
  1135. vllm/multimodal/cache.py +697 -0
  1136. vllm/multimodal/evs.py +273 -0
  1137. vllm/multimodal/hasher.py +102 -0
  1138. vllm/multimodal/image.py +130 -0
  1139. vllm/multimodal/inputs.py +987 -0
  1140. vllm/multimodal/parse.py +511 -0
  1141. vllm/multimodal/processing.py +2148 -0
  1142. vllm/multimodal/profiling.py +284 -0
  1143. vllm/multimodal/registry.py +345 -0
  1144. vllm/multimodal/utils.py +503 -0
  1145. vllm/multimodal/video.py +319 -0
  1146. vllm/outputs.py +324 -0
  1147. vllm/platforms/__init__.py +263 -0
  1148. vllm/platforms/cpu.py +340 -0
  1149. vllm/platforms/cuda.py +668 -0
  1150. vllm/platforms/interface.py +620 -0
  1151. vllm/platforms/rocm.py +497 -0
  1152. vllm/platforms/tpu.py +233 -0
  1153. vllm/platforms/xpu.py +243 -0
  1154. vllm/plugins/__init__.py +72 -0
  1155. vllm/plugins/io_processors/__init__.py +68 -0
  1156. vllm/plugins/io_processors/interface.py +67 -0
  1157. vllm/plugins/lora_resolvers/README.md +16 -0
  1158. vllm/plugins/lora_resolvers/__init__.py +0 -0
  1159. vllm/plugins/lora_resolvers/filesystem_resolver.py +50 -0
  1160. vllm/pooling_params.py +191 -0
  1161. vllm/profiler/__init__.py +0 -0
  1162. vllm/profiler/layerwise_profile.py +375 -0
  1163. vllm/profiler/utils.py +148 -0
  1164. vllm/py.typed +2 -0
  1165. vllm/ray/__init__.py +0 -0
  1166. vllm/ray/lazy_utils.py +22 -0
  1167. vllm/ray/ray_env.py +72 -0
  1168. vllm/reasoning/__init__.py +29 -0
  1169. vllm/reasoning/abs_reasoning_parsers.py +202 -0
  1170. vllm/reasoning/basic_parsers.py +156 -0
  1171. vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
  1172. vllm/reasoning/glm4_moe_reasoning_parser.py +151 -0
  1173. vllm/reasoning/gptoss_reasoning_parser.py +87 -0
  1174. vllm/reasoning/granite_reasoning_parser.py +363 -0
  1175. vllm/reasoning/hunyuan_a13b_reasoning_parser.py +245 -0
  1176. vllm/reasoning/mistral_reasoning_parser.py +56 -0
  1177. vllm/reasoning/qwen3_reasoning_parser.py +72 -0
  1178. vllm/reasoning/seedoss_reasoning_parser.py +28 -0
  1179. vllm/reasoning/step3_reasoning_parser.py +109 -0
  1180. vllm/sampling_params.py +593 -0
  1181. vllm/scalar_type.py +349 -0
  1182. vllm/scripts.py +15 -0
  1183. vllm/sequence.py +103 -0
  1184. vllm/tasks.py +11 -0
  1185. vllm/test_utils.py +129 -0
  1186. vllm/third_party/__init__.py +0 -0
  1187. vllm/third_party/pynvml.py +6140 -0
  1188. vllm/tracing.py +136 -0
  1189. vllm/transformers_utils/__init__.py +24 -0
  1190. vllm/transformers_utils/chat_templates/__init__.py +5 -0
  1191. vllm/transformers_utils/chat_templates/registry.py +70 -0
  1192. vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
  1193. vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
  1194. vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
  1195. vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
  1196. vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
  1197. vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
  1198. vllm/transformers_utils/config.py +1102 -0
  1199. vllm/transformers_utils/config_parser_base.py +20 -0
  1200. vllm/transformers_utils/configs/__init__.py +63 -0
  1201. vllm/transformers_utils/configs/arctic.py +207 -0
  1202. vllm/transformers_utils/configs/chatglm.py +72 -0
  1203. vllm/transformers_utils/configs/deepseek_v3.py +101 -0
  1204. vllm/transformers_utils/configs/deepseek_vl2.py +216 -0
  1205. vllm/transformers_utils/configs/dotsocr.py +69 -0
  1206. vllm/transformers_utils/configs/eagle.py +84 -0
  1207. vllm/transformers_utils/configs/falcon.py +90 -0
  1208. vllm/transformers_utils/configs/jais.py +237 -0
  1209. vllm/transformers_utils/configs/kimi_vl.py +37 -0
  1210. vllm/transformers_utils/configs/medusa.py +63 -0
  1211. vllm/transformers_utils/configs/midashenglm.py +101 -0
  1212. vllm/transformers_utils/configs/mistral.py +165 -0
  1213. vllm/transformers_utils/configs/mlp_speculator.py +68 -0
  1214. vllm/transformers_utils/configs/moonvit.py +33 -0
  1215. vllm/transformers_utils/configs/nemotron.py +205 -0
  1216. vllm/transformers_utils/configs/nemotron_h.py +259 -0
  1217. vllm/transformers_utils/configs/nemotron_vl.py +56 -0
  1218. vllm/transformers_utils/configs/olmo3.py +80 -0
  1219. vllm/transformers_utils/configs/ovis.py +176 -0
  1220. vllm/transformers_utils/configs/qwen3_next.py +275 -0
  1221. vllm/transformers_utils/configs/radio.py +91 -0
  1222. vllm/transformers_utils/configs/speculators/__init__.py +2 -0
  1223. vllm/transformers_utils/configs/speculators/algos.py +32 -0
  1224. vllm/transformers_utils/configs/speculators/base.py +111 -0
  1225. vllm/transformers_utils/configs/step3_vl.py +123 -0
  1226. vllm/transformers_utils/configs/ultravox.py +116 -0
  1227. vllm/transformers_utils/detokenizer_utils.py +199 -0
  1228. vllm/transformers_utils/dynamic_module.py +60 -0
  1229. vllm/transformers_utils/processor.py +299 -0
  1230. vllm/transformers_utils/processors/__init__.py +16 -0
  1231. vllm/transformers_utils/processors/deepseek_vl2.py +362 -0
  1232. vllm/transformers_utils/processors/ovis.py +420 -0
  1233. vllm/transformers_utils/processors/ovis2_5.py +458 -0
  1234. vllm/transformers_utils/runai_utils.py +104 -0
  1235. vllm/transformers_utils/s3_utils.py +93 -0
  1236. vllm/transformers_utils/tokenizer.py +292 -0
  1237. vllm/transformers_utils/tokenizer_base.py +154 -0
  1238. vllm/transformers_utils/tokenizers/__init__.py +10 -0
  1239. vllm/transformers_utils/tokenizers/mistral.py +521 -0
  1240. vllm/transformers_utils/utils.py +108 -0
  1241. vllm/triton_utils/__init__.py +16 -0
  1242. vllm/triton_utils/importing.py +96 -0
  1243. vllm/usage/__init__.py +0 -0
  1244. vllm/usage/usage_lib.py +259 -0
  1245. vllm/utils/__init__.py +3566 -0
  1246. vllm/utils/deep_gemm.py +319 -0
  1247. vllm/utils/flashinfer.py +443 -0
  1248. vllm/utils/jsontree.py +178 -0
  1249. vllm/utils/tensor_schema.py +235 -0
  1250. vllm/v1/__init__.py +0 -0
  1251. vllm/v1/attention/__init__.py +0 -0
  1252. vllm/v1/attention/backends/__init__.py +0 -0
  1253. vllm/v1/attention/backends/cpu_attn.py +919 -0
  1254. vllm/v1/attention/backends/flash_attn.py +795 -0
  1255. vllm/v1/attention/backends/flashinfer.py +1181 -0
  1256. vllm/v1/attention/backends/flex_attention.py +861 -0
  1257. vllm/v1/attention/backends/gdn_attn.py +332 -0
  1258. vllm/v1/attention/backends/linear_attn.py +67 -0
  1259. vllm/v1/attention/backends/mamba1_attn.py +81 -0
  1260. vllm/v1/attention/backends/mamba2_attn.py +232 -0
  1261. vllm/v1/attention/backends/mamba_attn.py +52 -0
  1262. vllm/v1/attention/backends/mla/__init__.py +0 -0
  1263. vllm/v1/attention/backends/mla/common.py +1783 -0
  1264. vllm/v1/attention/backends/mla/cutlass_mla.py +248 -0
  1265. vllm/v1/attention/backends/mla/flashattn_mla.py +271 -0
  1266. vllm/v1/attention/backends/mla/flashinfer_mla.py +114 -0
  1267. vllm/v1/attention/backends/mla/flashmla.py +203 -0
  1268. vllm/v1/attention/backends/mla/flashmla_sparse.py +544 -0
  1269. vllm/v1/attention/backends/mla/indexer.py +342 -0
  1270. vllm/v1/attention/backends/mla/rocm_aiter_mla.py +255 -0
  1271. vllm/v1/attention/backends/mla/triton_mla.py +177 -0
  1272. vllm/v1/attention/backends/pallas.py +409 -0
  1273. vllm/v1/attention/backends/rocm_aiter_fa.py +549 -0
  1274. vllm/v1/attention/backends/rocm_attn.py +426 -0
  1275. vllm/v1/attention/backends/short_conv_attn.py +94 -0
  1276. vllm/v1/attention/backends/tree_attn.py +451 -0
  1277. vllm/v1/attention/backends/triton_attn.py +361 -0
  1278. vllm/v1/attention/backends/utils.py +990 -0
  1279. vllm/v1/attention/backends/xformers.py +438 -0
  1280. vllm/v1/core/__init__.py +0 -0
  1281. vllm/v1/core/block_pool.py +416 -0
  1282. vllm/v1/core/encoder_cache_manager.py +333 -0
  1283. vllm/v1/core/kv_cache_coordinator.py +440 -0
  1284. vllm/v1/core/kv_cache_manager.py +399 -0
  1285. vllm/v1/core/kv_cache_utils.py +1291 -0
  1286. vllm/v1/core/sched/__init__.py +0 -0
  1287. vllm/v1/core/sched/async_scheduler.py +47 -0
  1288. vllm/v1/core/sched/interface.py +158 -0
  1289. vllm/v1/core/sched/output.py +166 -0
  1290. vllm/v1/core/sched/request_queue.py +224 -0
  1291. vllm/v1/core/sched/scheduler.py +1296 -0
  1292. vllm/v1/core/sched/utils.py +69 -0
  1293. vllm/v1/core/single_type_kv_cache_manager.py +671 -0
  1294. vllm/v1/cudagraph_dispatcher.py +125 -0
  1295. vllm/v1/engine/__init__.py +203 -0
  1296. vllm/v1/engine/async_llm.py +742 -0
  1297. vllm/v1/engine/coordinator.py +357 -0
  1298. vllm/v1/engine/core.py +1235 -0
  1299. vllm/v1/engine/core_client.py +1334 -0
  1300. vllm/v1/engine/detokenizer.py +349 -0
  1301. vllm/v1/engine/exceptions.py +17 -0
  1302. vllm/v1/engine/llm_engine.py +370 -0
  1303. vllm/v1/engine/logprobs.py +201 -0
  1304. vllm/v1/engine/output_processor.py +576 -0
  1305. vllm/v1/engine/parallel_sampling.py +133 -0
  1306. vllm/v1/engine/processor.py +545 -0
  1307. vllm/v1/engine/utils.py +860 -0
  1308. vllm/v1/executor/__init__.py +0 -0
  1309. vllm/v1/executor/abstract.py +137 -0
  1310. vllm/v1/executor/multiproc_executor.py +726 -0
  1311. vllm/v1/executor/ray_distributed_executor.py +108 -0
  1312. vllm/v1/executor/utils.py +23 -0
  1313. vllm/v1/kv_cache_interface.py +375 -0
  1314. vllm/v1/kv_offload/__init__.py +0 -0
  1315. vllm/v1/kv_offload/abstract.py +165 -0
  1316. vllm/v1/kv_offload/backend.py +96 -0
  1317. vllm/v1/kv_offload/backends/__init__.py +0 -0
  1318. vllm/v1/kv_offload/backends/cpu.py +61 -0
  1319. vllm/v1/kv_offload/cpu.py +75 -0
  1320. vllm/v1/kv_offload/factory.py +56 -0
  1321. vllm/v1/kv_offload/lru_manager.py +132 -0
  1322. vllm/v1/kv_offload/mediums.py +39 -0
  1323. vllm/v1/kv_offload/spec.py +61 -0
  1324. vllm/v1/kv_offload/worker/__init__.py +0 -0
  1325. vllm/v1/kv_offload/worker/cpu_gpu.py +171 -0
  1326. vllm/v1/kv_offload/worker/worker.py +142 -0
  1327. vllm/v1/metrics/__init__.py +0 -0
  1328. vllm/v1/metrics/loggers.py +741 -0
  1329. vllm/v1/metrics/prometheus.py +82 -0
  1330. vllm/v1/metrics/ray_wrappers.py +152 -0
  1331. vllm/v1/metrics/reader.py +246 -0
  1332. vllm/v1/metrics/stats.py +257 -0
  1333. vllm/v1/outputs.py +161 -0
  1334. vllm/v1/pool/__init__.py +0 -0
  1335. vllm/v1/pool/metadata.py +77 -0
  1336. vllm/v1/request.py +241 -0
  1337. vllm/v1/sample/__init__.py +0 -0
  1338. vllm/v1/sample/logits_processor/__init__.py +294 -0
  1339. vllm/v1/sample/logits_processor/builtin.py +275 -0
  1340. vllm/v1/sample/logits_processor/interface.py +97 -0
  1341. vllm/v1/sample/logits_processor/state.py +161 -0
  1342. vllm/v1/sample/metadata.py +43 -0
  1343. vllm/v1/sample/ops/__init__.py +0 -0
  1344. vllm/v1/sample/ops/bad_words.py +39 -0
  1345. vllm/v1/sample/ops/logprobs.py +26 -0
  1346. vllm/v1/sample/ops/penalties.py +43 -0
  1347. vllm/v1/sample/ops/topk_topp_sampler.py +292 -0
  1348. vllm/v1/sample/rejection_sampler.py +623 -0
  1349. vllm/v1/sample/sampler.py +285 -0
  1350. vllm/v1/sample/tpu/__init__.py +0 -0
  1351. vllm/v1/sample/tpu/metadata.py +124 -0
  1352. vllm/v1/sample/tpu/sampler.py +213 -0
  1353. vllm/v1/serial_utils.py +423 -0
  1354. vllm/v1/spec_decode/__init__.py +0 -0
  1355. vllm/v1/spec_decode/eagle.py +1011 -0
  1356. vllm/v1/spec_decode/medusa.py +66 -0
  1357. vllm/v1/spec_decode/metadata.py +62 -0
  1358. vllm/v1/spec_decode/metrics.py +211 -0
  1359. vllm/v1/spec_decode/ngram_proposer.py +276 -0
  1360. vllm/v1/spec_decode/utils.py +14 -0
  1361. vllm/v1/structured_output/__init__.py +295 -0
  1362. vllm/v1/structured_output/backend_guidance.py +245 -0
  1363. vllm/v1/structured_output/backend_lm_format_enforcer.py +167 -0
  1364. vllm/v1/structured_output/backend_outlines.py +320 -0
  1365. vllm/v1/structured_output/backend_types.py +134 -0
  1366. vllm/v1/structured_output/backend_xgrammar.py +327 -0
  1367. vllm/v1/structured_output/request.py +86 -0
  1368. vllm/v1/structured_output/utils.py +454 -0
  1369. vllm/v1/utils.py +396 -0
  1370. vllm/v1/worker/__init__.py +0 -0
  1371. vllm/v1/worker/block_table.py +210 -0
  1372. vllm/v1/worker/cpu_model_runner.py +175 -0
  1373. vllm/v1/worker/cpu_worker.py +156 -0
  1374. vllm/v1/worker/gpu_input_batch.py +863 -0
  1375. vllm/v1/worker/gpu_model_runner.py +4160 -0
  1376. vllm/v1/worker/gpu_ubatch_wrapper.py +399 -0
  1377. vllm/v1/worker/gpu_worker.py +710 -0
  1378. vllm/v1/worker/kv_connector_model_runner_mixin.py +132 -0
  1379. vllm/v1/worker/lora_model_runner_mixin.py +183 -0
  1380. vllm/v1/worker/tpu_input_batch.py +587 -0
  1381. vllm/v1/worker/tpu_model_runner.py +1946 -0
  1382. vllm/v1/worker/tpu_worker.py +346 -0
  1383. vllm/v1/worker/ubatch_splitting.py +192 -0
  1384. vllm/v1/worker/ubatch_utils.py +27 -0
  1385. vllm/v1/worker/ubatching.py +224 -0
  1386. vllm/v1/worker/utils.py +344 -0
  1387. vllm/v1/worker/worker_base.py +65 -0
  1388. vllm/v1/worker/xpu_model_runner.py +57 -0
  1389. vllm/v1/worker/xpu_worker.py +179 -0
  1390. vllm/version.py +41 -0
  1391. vllm/vllm_flash_attn/.gitkeep +0 -0
  1392. vllm/worker/__init__.py +0 -0
  1393. vllm/worker/worker_base.py +279 -0
  1394. vllm_cpu-0.11.0.post2.dist-info/METADATA +348 -0
  1395. vllm_cpu-0.11.0.post2.dist-info/RECORD +1398 -0
  1396. vllm_cpu-0.11.0.post2.dist-info/WHEEL +5 -0
  1397. vllm_cpu-0.11.0.post2.dist-info/entry_points.txt +5 -0
  1398. vllm_cpu-0.11.0.post2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1690 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
+
4
+ # Adapted from
5
+ # https://github.com/huggingface/transformers/blob/main/src/transformers/models/Glm4v/modeling_Glm4v.py
6
+ # Copyright 2025 The vLLM team.
7
+ # Copyright 2025 The ZhipuAI Team.
8
+ # Copyright 2025 The HuggingFace Inc. team.
9
+ # All rights reserved.
10
+ #
11
+ # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
12
+ # and OPT implementations in this library. It has been modified from its
13
+ # original forms to accommodate minor architectural differences compared
14
+ # to GPT-NeoX and OPT used by the Meta AI team that trained the model.
15
+ #
16
+ # Licensed under the Apache License, Version 2.0 (the "License");
17
+ # you may not use this file except in compliance with the License.
18
+ # You may obtain a copy of the License at
19
+ #
20
+ # http://www.apache.org/licenses/LICENSE-2.0
21
+ #
22
+ # Unless required by applicable law or agreed to in writing, software
23
+ # distributed under the License is distributed on an "AS IS" BASIS,
24
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
+ # See the License for the specific language governing permissions and
26
+ # limitations under the License.
27
+ """Inference-only GLM-4V model compatible with HuggingFace weights."""
28
+
29
+ import math
30
+ from collections.abc import Iterable, Mapping, Sequence
31
+ from functools import partial
32
+ from typing import Annotated, Any, Callable, Literal, Optional, Union
33
+
34
+ import numpy as np
35
+ import torch
36
+ import torch.nn as nn
37
+ import torch.nn.functional as F
38
+ from einops import rearrange
39
+ from packaging.version import Version
40
+ from transformers import BatchFeature
41
+ from transformers import __version__ as TRANSFORMERS_VERSION
42
+ from transformers.models.glm4v.configuration_glm4v import Glm4vVisionConfig
43
+ from transformers.models.glm4v.image_processing_glm4v import (
44
+ Glm4vImageProcessor, smart_resize)
45
+ from transformers.models.glm4v.video_processing_glm4v import (
46
+ Glm4vVideoProcessor)
47
+ from transformers.video_utils import VideoMetadata
48
+
49
+ from vllm.attention.layer import check_upstream_fa_availability
50
+ from vllm.config import VllmConfig
51
+ from vllm.distributed import (get_tensor_model_parallel_world_size,
52
+ parallel_state)
53
+ from vllm.distributed import utils as dist_utils
54
+ from vllm.logger import init_logger
55
+ from vllm.model_executor.layers.layernorm import RMSNorm
56
+ from vllm.model_executor.layers.linear import (ColumnParallelLinear,
57
+ MergedColumnParallelLinear,
58
+ QKVParallelLinear,
59
+ RowParallelLinear)
60
+ from vllm.model_executor.layers.quantization import QuantizationConfig
61
+ from vllm.model_executor.model_loader.weight_utils import default_weight_loader
62
+ from vllm.model_executor.models.module_mapping import MultiModelKeys
63
+ from vllm.multimodal import MULTIMODAL_REGISTRY
64
+ from vllm.multimodal.inputs import (MultiModalDataDict, MultiModalFieldConfig,
65
+ MultiModalKwargsItems, VideoItem)
66
+ from vllm.multimodal.parse import (ImageSize, MultiModalDataItems,
67
+ MultiModalDataParser)
68
+ from vllm.multimodal.processing import (BaseMultiModalProcessor,
69
+ BaseProcessingInfo, PromptReplacement,
70
+ PromptUpdate, PromptUpdateDetails)
71
+ from vllm.multimodal.profiling import BaseDummyInputsBuilder
72
+ from vllm.platforms import _Backend
73
+ from vllm.sequence import IntermediateTensors
74
+ from vllm.transformers_utils.config import uses_mrope
75
+ from vllm.utils.tensor_schema import TensorSchema, TensorShape
76
+
77
+ from ..layers.activation import SiluAndMul
78
+ from .interfaces import (MultiModalEmbeddings, SupportsLoRA,
79
+ SupportsMultiModal, SupportsPP)
80
+ from .qwen2_vl import (_create_qwen2vl_field_factory,
81
+ apply_rotary_pos_emb_vision)
82
+ from .utils import (AutoWeightsLoader, WeightsMapper,
83
+ init_vllm_registered_model, maybe_prefix,
84
+ merge_multimodal_embeddings)
85
+ from .vision import get_vit_attn_backend, run_dp_sharded_mrope_vision_model
86
+
87
+ logger = init_logger(__name__)
88
+
89
+ # For profile run
90
+ _MAX_FRAMES_PER_VIDEO = 600
91
+
92
+ # === Vision Inputs === #
93
+
94
+
95
+ class Glm4vImagePixelInputs(TensorSchema):
96
+ """
97
+ Dimensions:
98
+ - np: Number of patches
99
+ - cpp: Number of channels * patch_size * patch_size
100
+ - ni: Number of images
101
+ - g: Grid dimensions (3 for grid_t, grid_h, grid_w)
102
+ """
103
+ type: Literal["pixel_values"] = "pixel_values"
104
+
105
+ pixel_values: Annotated[torch.Tensor, TensorShape("np", "cpp")]
106
+ image_grid_thw: Annotated[torch.Tensor, TensorShape("ni", 3)]
107
+
108
+
109
+ class Glm4vImageEmbeddingInputs(TensorSchema):
110
+ """
111
+ Dimensions:
112
+ - f: Number of image features (varies based on image resolution)
113
+ - h: Hidden size (must match language model backbone)
114
+ - n: Number of images
115
+ - g: Grid dimensions (3 for grid_t, grid_h, grid_w)
116
+ """
117
+ type: Literal["image_embeds"] = "image_embeds"
118
+
119
+ image_embeds: Annotated[torch.Tensor, TensorShape("f", "h")]
120
+ image_grid_thw: Annotated[torch.Tensor, TensorShape("n", 3)]
121
+
122
+
123
+ Glm4vImageInputs = Union[Glm4vImagePixelInputs, Glm4vImageEmbeddingInputs]
124
+
125
+
126
+ class Glm4vVideoPixelInputs(TensorSchema):
127
+ """
128
+ Dimensions:
129
+ - np: Number of patches
130
+ - ctpp: Number of channels * temporal_patch_size *
131
+ patch_size * patch_size
132
+ - f: Number of frames
133
+ - g: Grid dimensions (3 for grid_t which is usually 1 for processed
134
+ video, grid_h, grid_w)
135
+ """
136
+ type: Literal["pixel_values_videos"] = "pixel_values_videos"
137
+
138
+ pixel_values_videos: Annotated[torch.Tensor, TensorShape("np", "ctpp")]
139
+ video_grid_thw: Annotated[torch.Tensor, TensorShape("f", 3)]
140
+
141
+
142
+ class Glm4vVideoEmbeddingInputs(TensorSchema):
143
+ """
144
+ Dimensions:
145
+ - p: Number of video patches across all frames
146
+ - h: Hidden size (must match language model backbone)
147
+ - f: Number of frames
148
+ - g: Grid dimensions (3 for grid_t which is usually 1 for processed
149
+ video, grid_h, grid_w)
150
+ """
151
+ type: Literal["video_embeds"] = "video_embeds"
152
+
153
+ video_embeds: Annotated[torch.Tensor, TensorShape("p", "h")]
154
+ video_grid_thw: Annotated[torch.Tensor, TensorShape("f", 3)]
155
+
156
+
157
+ Glm4vVideoInputs = Union[Glm4vVideoPixelInputs, Glm4vVideoEmbeddingInputs]
158
+
159
+ # ==== Vision Encoder ==== #
160
+
161
+
162
+ class Glm4vVisionMLP(nn.Module):
163
+
164
+ def __init__(
165
+ self,
166
+ in_features: int,
167
+ hidden_features: int,
168
+ bias: bool = False,
169
+ quant_config: Optional[QuantizationConfig] = None,
170
+ prefix: str = "",
171
+ use_data_parallel: bool = False,
172
+ ):
173
+ super().__init__()
174
+ self.gate_up_proj = MergedColumnParallelLinear(
175
+ input_size=in_features,
176
+ output_sizes=[hidden_features] * 2,
177
+ bias=bias,
178
+ quant_config=quant_config,
179
+ prefix=f"{prefix}.gate_up_proj",
180
+ disable_tp=use_data_parallel,
181
+ )
182
+ self.down_proj = RowParallelLinear(
183
+ hidden_features,
184
+ in_features,
185
+ bias=bias,
186
+ quant_config=quant_config,
187
+ prefix=f"{prefix}.down_proj",
188
+ disable_tp=use_data_parallel,
189
+ )
190
+ self.act_fn = SiluAndMul()
191
+
192
+ def forward(self, x: torch.Tensor):
193
+ x, _ = self.gate_up_proj(x)
194
+ x = self.act_fn(x)
195
+ x, _ = self.down_proj(x)
196
+ return x
197
+
198
+
199
+ def all_gather_interleave(local_tensor, hidden_size: int, tp_size: int):
200
+ """All-gather the input tensor interleavely across model parallel group."""
201
+ import torch.distributed as dist
202
+
203
+ gathered_tensors = [torch.zeros_like(local_tensor) for _ in range(tp_size)]
204
+ dist.all_gather(
205
+ gathered_tensors,
206
+ local_tensor,
207
+ group=parallel_state.get_tp_group().device_group,
208
+ )
209
+
210
+ gathered_tensors_split = [
211
+ torch.split(tensor, hidden_size // tp_size, -1)
212
+ for tensor in gathered_tensors
213
+ ]
214
+ ordered_tensors = [
215
+ tensor for pair in zip(*gathered_tensors_split) for tensor in pair
216
+ ]
217
+ result_tensor = torch.cat(ordered_tensors, dim=-1)
218
+ return result_tensor
219
+
220
+
221
+ class Glm4vVisionAttention(nn.Module):
222
+
223
+ def __init__(
224
+ self,
225
+ embed_dim: int,
226
+ num_heads: int,
227
+ projection_size: int,
228
+ quant_config: Optional[QuantizationConfig] = None,
229
+ prefix: str = "",
230
+ use_data_parallel: bool = False,
231
+ ) -> None:
232
+ super().__init__()
233
+ # Per attention head and per partition values.
234
+ self.tp_size = (1 if use_data_parallel else
235
+ get_tensor_model_parallel_world_size())
236
+ self.tp_rank = (0 if use_data_parallel else
237
+ parallel_state.get_tensor_model_parallel_rank())
238
+ self.hidden_size_per_attention_head = dist_utils.divide(
239
+ projection_size, num_heads)
240
+ self.num_attention_heads_per_partition = dist_utils.divide(
241
+ num_heads, self.tp_size)
242
+
243
+ self.qkv = QKVParallelLinear(
244
+ hidden_size=embed_dim,
245
+ head_size=self.hidden_size_per_attention_head,
246
+ total_num_heads=num_heads,
247
+ total_num_kv_heads=num_heads,
248
+ bias=False,
249
+ quant_config=quant_config,
250
+ # Change qkv prefix to align with GLM-4.5V-FP8 quantization cfg
251
+ prefix=f"{prefix}.qkv_proj" if quant_config else f"{prefix}.qkv",
252
+ disable_tp=use_data_parallel,
253
+ )
254
+ self.proj = RowParallelLinear(
255
+ input_size=projection_size,
256
+ output_size=embed_dim,
257
+ quant_config=quant_config,
258
+ prefix=f"{prefix}.proj",
259
+ bias=False,
260
+ disable_tp=use_data_parallel,
261
+ )
262
+
263
+ # Detect attention implementation.
264
+ self.attn_backend = get_vit_attn_backend(
265
+ head_size=self.hidden_size_per_attention_head,
266
+ dtype=torch.get_default_dtype())
267
+ self.use_upstream_fa = False
268
+ if self.attn_backend != _Backend.FLASH_ATTN and \
269
+ check_upstream_fa_availability(torch.get_default_dtype()):
270
+ self.attn_backend = _Backend.FLASH_ATTN
271
+ self.use_upstream_fa = True
272
+
273
+ if self.attn_backend not in {
274
+ _Backend.FLASH_ATTN,
275
+ _Backend.TORCH_SDPA,
276
+ _Backend.XFORMERS,
277
+ }:
278
+ raise RuntimeError(
279
+ f"GLM-4V does not support {self.attn_backend} backend now.")
280
+
281
+ def split_qkv(self, qkv: torch.Tensor) -> tuple[torch.Tensor, ...]:
282
+ # [s, b, 3 * head * head_dim]
283
+ seq_len, bs, _ = qkv.shape
284
+
285
+ # [s, b, 3 * head * head_dim] -> 3 * [s, b, head * head_dim]
286
+ q, k, v = qkv.chunk(3, dim=2)
287
+
288
+ # 3 * [s, b, head * head_dim] -> 3 * [s, b, head, head_dim]
289
+ new_shape = (
290
+ seq_len,
291
+ bs,
292
+ self.num_attention_heads_per_partition,
293
+ self.hidden_size_per_attention_head,
294
+ )
295
+ q, k, v = (x.view(*new_shape) for x in (q, k, v))
296
+ return q, k, v
297
+
298
+ def forward(
299
+ self,
300
+ x: torch.Tensor,
301
+ cu_seqlens: torch.Tensor,
302
+ rotary_pos_emb: torch.Tensor,
303
+ max_seqlen: Optional[int] = None, # Only used for Flash Attention
304
+ seqlens: Optional[list[int]] = None, # Only used for xFormers
305
+ ) -> torch.Tensor:
306
+ # [s, b, c] --> [s, b, head * 3 * head_dim]
307
+ x, _ = self.qkv(x)
308
+
309
+ # [s, b, 3 * head * head_dim] -> 3 * [s, b, head, head_dim]
310
+ q, k, v = self.split_qkv(x)
311
+ batch_size = q.shape[1]
312
+
313
+ q, k, v = (rearrange(x, "s b ... -> b s ...").contiguous()
314
+ for x in (q, k, v))
315
+ if rotary_pos_emb is not None:
316
+ # [2 * b, s, heads, head_dim]
317
+ qk_concat = torch.cat([q, k], dim=0)
318
+ qk_rotated = apply_rotary_pos_emb_vision(qk_concat, rotary_pos_emb)
319
+ q, k = torch.chunk(qk_rotated, 2, dim=0)
320
+
321
+ if self.attn_backend == _Backend.FLASH_ATTN:
322
+ # from vllm_flash_attn.flash_attn_interface import (
323
+ # flash_attn_varlen_func)
324
+ if self.use_upstream_fa:
325
+ from flash_attn import flash_attn_varlen_func
326
+ else:
327
+ from vllm.vllm_flash_attn import flash_attn_varlen_func
328
+
329
+ q, k, v = (rearrange(x, "b s ... -> (b s) ...") for x in [q, k, v])
330
+
331
+ output = flash_attn_varlen_func(
332
+ q,
333
+ k,
334
+ v,
335
+ cu_seqlens_q=cu_seqlens,
336
+ cu_seqlens_k=cu_seqlens,
337
+ max_seqlen_q=max_seqlen,
338
+ max_seqlen_k=max_seqlen,
339
+ dropout_p=0,
340
+ causal=False,
341
+ )
342
+
343
+ context_layer = rearrange(output,
344
+ "(b s) h d -> s b (h d)",
345
+ b=batch_size).contiguous()
346
+ elif self.attn_backend == _Backend.TORCH_SDPA:
347
+ # Execute attention entry by entry for speed & less VRAM.
348
+ outputs = []
349
+ for i in range(1, len(cu_seqlens)):
350
+ start_idx = cu_seqlens[i - 1]
351
+ end_idx = cu_seqlens[i]
352
+ q_i = q[:, start_idx:end_idx]
353
+ k_i = k[:, start_idx:end_idx]
354
+ v_i = v[:, start_idx:end_idx]
355
+ q_i, k_i, v_i = (rearrange(x, "b s h d -> b h s d")
356
+ for x in [q_i, k_i, v_i])
357
+ output_i = F.scaled_dot_product_attention(q_i,
358
+ k_i,
359
+ v_i,
360
+ dropout_p=0.0)
361
+ output_i = rearrange(output_i, "b h s d -> b s h d ")
362
+ outputs.append(output_i)
363
+ context_layer = torch.cat(outputs, dim=1)
364
+ context_layer = rearrange(context_layer,
365
+ "b s h d -> s b (h d)").contiguous()
366
+ elif self.attn_backend == _Backend.XFORMERS:
367
+ from xformers import ops as xops
368
+ from xformers.ops.fmha.attn_bias import BlockDiagonalMask
369
+
370
+ attn_bias = BlockDiagonalMask.from_seqlens(q_seqlen=seqlens,
371
+ kv_seqlen=None,
372
+ device=q.device)
373
+
374
+ context_layer = xops.memory_efficient_attention_forward(
375
+ q, k, v, attn_bias=attn_bias, p=0, scale=None)
376
+ context_layer = rearrange(context_layer,
377
+ "b s h d -> s b (h d)").contiguous()
378
+
379
+ output, _ = self.proj(context_layer)
380
+ return output
381
+
382
+
383
+ class Glm4vVisionBlock(nn.Module):
384
+
385
+ def __init__(
386
+ self,
387
+ dim: int,
388
+ num_heads: int,
389
+ mlp_hidden_dim: int,
390
+ norm_layer: Optional[Callable[[int], nn.Module]] = None,
391
+ quant_config: Optional[QuantizationConfig] = None,
392
+ prefix: str = "",
393
+ use_data_parallel: bool = False,
394
+ ) -> None:
395
+ super().__init__()
396
+ if norm_layer is None:
397
+ norm_layer = partial(nn.LayerNorm, eps=1e-6)
398
+ self.norm1 = norm_layer(dim)
399
+ self.norm2 = norm_layer(dim)
400
+ self.attn = Glm4vVisionAttention(
401
+ embed_dim=dim,
402
+ num_heads=num_heads,
403
+ projection_size=dim,
404
+ quant_config=quant_config,
405
+ prefix=f"{prefix}.attn",
406
+ use_data_parallel=use_data_parallel,
407
+ )
408
+ self.mlp = Glm4vVisionMLP(
409
+ dim,
410
+ mlp_hidden_dim,
411
+ bias=False,
412
+ quant_config=quant_config,
413
+ prefix=f"{prefix}.mlp",
414
+ use_data_parallel=use_data_parallel,
415
+ )
416
+
417
+ def forward(
418
+ self,
419
+ x: torch.Tensor,
420
+ cu_seqlens: torch.Tensor,
421
+ rotary_pos_emb: torch.Tensor,
422
+ max_seqlen: Optional[int] = None, # Only used for Flash Attention
423
+ seqlens: Optional[list[int]] = None, # Only used for xFormers
424
+ ) -> torch.Tensor:
425
+ x_attn = self.attn(
426
+ self.norm1(x),
427
+ cu_seqlens=cu_seqlens,
428
+ rotary_pos_emb=rotary_pos_emb,
429
+ max_seqlen=max_seqlen,
430
+ seqlens=seqlens,
431
+ )
432
+ x_fused_norm, residual = self.norm2(x, residual=x_attn)
433
+ x = residual + self.mlp(x_fused_norm)
434
+
435
+ return x
436
+
437
+
438
+ class Glm4vVisionPatchEmbed(nn.Module):
439
+
440
+ def __init__(
441
+ self,
442
+ patch_size: int = 14,
443
+ temporal_patch_size: int = 1,
444
+ in_channels: int = 3,
445
+ hidden_size: int = 1536,
446
+ ) -> None:
447
+ super().__init__()
448
+ self.patch_size = patch_size
449
+ self.temporal_patch_size = temporal_patch_size
450
+ self.hidden_size = hidden_size
451
+
452
+ kernel_size = (temporal_patch_size, patch_size, patch_size)
453
+ self.proj = nn.Conv3d(
454
+ in_channels,
455
+ hidden_size,
456
+ kernel_size=kernel_size,
457
+ stride=kernel_size,
458
+ bias=True,
459
+ )
460
+
461
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
462
+ L, C = x.shape
463
+ x = x.view(L, -1, self.temporal_patch_size, self.patch_size,
464
+ self.patch_size)
465
+ x = self.proj(x).view(L, self.hidden_size)
466
+ return x
467
+
468
+
469
+ class Glm4vPatchMerger(nn.Module):
470
+
471
+ def __init__(
472
+ self,
473
+ d_model: int,
474
+ context_dim: int,
475
+ quant_config: Optional[QuantizationConfig] = None,
476
+ bias: bool = False,
477
+ prefix: str = "",
478
+ use_data_parallel: bool = False,
479
+ ) -> None:
480
+ super().__init__()
481
+ self.hidden_size = d_model
482
+ self.proj = ColumnParallelLinear(
483
+ self.hidden_size,
484
+ self.hidden_size,
485
+ bias=bias,
486
+ gather_output=True,
487
+ quant_config=quant_config,
488
+ prefix=f"{prefix}.proj",
489
+ disable_tp=use_data_parallel,
490
+ )
491
+ self.post_projection_norm = nn.LayerNorm(self.hidden_size)
492
+ self.gate_up_proj = MergedColumnParallelLinear(
493
+ input_size=self.hidden_size,
494
+ output_sizes=[context_dim] * 2,
495
+ bias=bias,
496
+ quant_config=quant_config,
497
+ prefix=f"{prefix}.gate_up_proj",
498
+ disable_tp=use_data_parallel,
499
+ )
500
+ self.down_proj = RowParallelLinear(
501
+ context_dim,
502
+ self.hidden_size,
503
+ bias=bias,
504
+ quant_config=quant_config,
505
+ prefix=f"{prefix}.down_proj",
506
+ disable_tp=use_data_parallel,
507
+ )
508
+ self.act_fn = SiluAndMul()
509
+ self.extra_activation_func = nn.GELU()
510
+
511
+ def forward(self, x: torch.Tensor):
512
+ x, _ = self.proj(x)
513
+ x = self.extra_activation_func(self.post_projection_norm(x))
514
+ gate_up, _ = self.gate_up_proj(x)
515
+ x = self.act_fn(gate_up)
516
+ x, _ = self.down_proj(x)
517
+ return x
518
+
519
+
520
+ class Glm4vVisionEmbeddings(nn.Module):
521
+
522
+ def __init__(self, config: Glm4vVisionConfig):
523
+ super().__init__()
524
+ self.config = config
525
+ self.embed_dim = config.hidden_size
526
+ self.image_size = config.image_size
527
+ self.patch_size = config.patch_size
528
+
529
+ self.num_patches = (self.image_size // self.patch_size)**2
530
+ self.num_positions = self.num_patches
531
+ self.position_embedding = nn.Embedding(self.num_positions,
532
+ self.embed_dim)
533
+ self.register_buffer(
534
+ "position_ids",
535
+ torch.arange(self.num_positions).expand((1, -1)),
536
+ persistent=False,
537
+ )
538
+
539
+ def forward(self, embeddings, lengths, image_shapes, h_coords,
540
+ w_coords) -> torch.Tensor:
541
+ pos_embed_weight = self.position_embedding.weight
542
+ hidden_size = pos_embed_weight.shape[1]
543
+ total_seq = h_coords.shape[0]
544
+ device = pos_embed_weight.device
545
+
546
+ # Move coordinates to correct device
547
+ h_coords, w_coords = h_coords.to(device), w_coords.to(device)
548
+
549
+ # Handle empty sequence case
550
+ if total_seq == 0:
551
+ adapted_pos_embed = torch.empty(0,
552
+ hidden_size,
553
+ device=device,
554
+ dtype=pos_embed_weight.dtype)
555
+ else:
556
+ # Convert inputs to tensors if needed
557
+ if isinstance(lengths, list):
558
+ lengths = torch.tensor(lengths,
559
+ device=device,
560
+ dtype=torch.long)
561
+ if not isinstance(image_shapes, torch.Tensor):
562
+ image_shapes = torch.tensor(image_shapes,
563
+ device=device,
564
+ dtype=torch.long)
565
+
566
+ # Prepare 2D position embedding
567
+ orig_size_sq = pos_embed_weight.shape[0]
568
+ orig_size = int(orig_size_sq**0.5)
569
+ pos_embed_2d = (pos_embed_weight.view(
570
+ orig_size, orig_size,
571
+ hidden_size).permute(2, 0,
572
+ 1).unsqueeze(0).to(device=device,
573
+ dtype=torch.float32))
574
+
575
+ # Calculate target dimensions for each patch
576
+ # Add bounds checking for data parallel mode
577
+ if len(lengths) > image_shapes.shape[0]:
578
+ # In data parallel mode, some GPUs might not have all
579
+ # image shapes
580
+ # Use available image shapes, cycling if necessary
581
+ target_h_list = []
582
+ target_w_list = []
583
+ for i in range(len(lengths)):
584
+ # Cycle through available shapes
585
+ shape_idx = i % image_shapes.shape[0]
586
+ target_h_list.append(image_shapes[shape_idx,
587
+ 1].repeat(lengths[i]))
588
+ target_w_list.append(image_shapes[shape_idx,
589
+ 2].repeat(lengths[i]))
590
+ target_h = torch.cat(target_h_list).to(device=device,
591
+ dtype=torch.float32)
592
+ target_w = torch.cat(target_w_list).to(device=device,
593
+ dtype=torch.float32)
594
+ else:
595
+ target_h = torch.cat([
596
+ image_shapes[i, 1].repeat(lengths[i])
597
+ for i in range(len(lengths))
598
+ ]).to(device=device, dtype=torch.float32)
599
+ target_w = torch.cat([
600
+ image_shapes[i, 2].repeat(lengths[i])
601
+ for i in range(len(lengths))
602
+ ]).to(device=device, dtype=torch.float32)
603
+
604
+ # Normalize coordinates to [-1, 1] range for grid_sample
605
+ h_coords = h_coords.to(device=device, dtype=torch.float32)
606
+ w_coords = w_coords.to(device=device, dtype=torch.float32)
607
+ norm_w = ((w_coords + 0.5) / target_w) * 2 - 1
608
+ norm_h = ((h_coords + 0.5) / target_h) * 2 - 1
609
+
610
+ # Create sampling grid
611
+ grid = (torch.stack((norm_w, norm_h),
612
+ dim=-1).unsqueeze(0).unsqueeze(2))
613
+
614
+ # Perform bicubic interpolation
615
+ interpolated_embed_fp32 = F.grid_sample(
616
+ pos_embed_2d,
617
+ grid,
618
+ mode="bicubic",
619
+ align_corners=False,
620
+ padding_mode="border",
621
+ )
622
+
623
+ # Reshape and convert back to original dtype
624
+ adapted_pos_embed_fp32 = (
625
+ interpolated_embed_fp32.squeeze(0).squeeze(-1).permute(1, 0))
626
+ adapted_pos_embed = adapted_pos_embed_fp32.to(
627
+ pos_embed_weight.dtype).to(embeddings.device)
628
+
629
+ # Add adapted position encoding to embeddings
630
+ embeddings = embeddings + adapted_pos_embed
631
+ return embeddings
632
+
633
+
634
+ class Glm4vVisionRotaryEmbedding(nn.Module):
635
+
636
+ def __init__(self, dim: int, theta: float = 10000.0) -> None:
637
+ super().__init__()
638
+ self.dim = dim
639
+ self.theta = theta
640
+ inv_freq = 1.0 / (theta
641
+ **(torch.arange(0, dim, 2, dtype=torch.float) / dim))
642
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
643
+ self._seq_len_cached = 0
644
+ self._freqs_cached = None
645
+
646
+ def update_freqs_cache(self, seqlen: int) -> None:
647
+ if seqlen > self._seq_len_cached:
648
+ seqlen *= 2
649
+ self._seq_len_cached = seqlen
650
+ self.inv_freq = 1.0 / (self.theta**(torch.arange(
651
+ 0,
652
+ self.dim,
653
+ 2,
654
+ dtype=torch.float,
655
+ device=self.inv_freq.device,
656
+ ) / self.dim))
657
+ seq = torch.arange(seqlen,
658
+ device=self.inv_freq.device,
659
+ dtype=self.inv_freq.dtype)
660
+ freqs = torch.outer(seq, self.inv_freq)
661
+ self._freqs_cached = freqs
662
+
663
+ def forward(self, seqlen: int) -> torch.Tensor:
664
+ self.update_freqs_cache(seqlen)
665
+ return self._freqs_cached[:seqlen]
666
+
667
+
668
+ class Glm4vVisionTransformer(nn.Module):
669
+
670
+ def __init__(
671
+ self,
672
+ vision_config: Glm4vVisionConfig,
673
+ norm_eps: float = 1e-6,
674
+ quant_config: Optional[QuantizationConfig] = None,
675
+ prefix: str = "",
676
+ use_data_parallel: bool = False,
677
+ ) -> None:
678
+ super().__init__()
679
+
680
+ patch_size = vision_config.patch_size
681
+ temporal_patch_size = vision_config.temporal_patch_size
682
+ in_channels = vision_config.in_channels
683
+ depth = vision_config.depth
684
+ self.hidden_size = vision_config.hidden_size
685
+ self.num_heads = vision_config.num_heads
686
+ self.use_data_parallel = use_data_parallel
687
+
688
+ self.patch_size = vision_config.patch_size
689
+ self.spatial_merge_size = vision_config.spatial_merge_size
690
+ self.out_hidden_size = vision_config.out_hidden_size
691
+
692
+ self.patch_embed = Glm4vVisionPatchEmbed(
693
+ patch_size=patch_size,
694
+ temporal_patch_size=temporal_patch_size,
695
+ in_channels=in_channels,
696
+ hidden_size=self.hidden_size,
697
+ )
698
+
699
+ norm_layer = partial(RMSNorm, eps=norm_eps)
700
+ head_dim = self.hidden_size // self.num_heads
701
+ self.rotary_pos_emb = Glm4vVisionRotaryEmbedding(head_dim // 2)
702
+ self.blocks = nn.ModuleList([
703
+ Glm4vVisionBlock(
704
+ dim=self.hidden_size,
705
+ num_heads=self.num_heads,
706
+ mlp_hidden_dim=vision_config.out_hidden_size,
707
+ norm_layer=norm_layer,
708
+ quant_config=quant_config,
709
+ prefix=f"{prefix}.blocks.{layer_idx}",
710
+ use_data_parallel=self.use_data_parallel,
711
+ ) for layer_idx in range(depth)
712
+ ])
713
+ self.merger = Glm4vPatchMerger(
714
+ d_model=vision_config.out_hidden_size,
715
+ context_dim=vision_config.intermediate_size,
716
+ quant_config=quant_config,
717
+ bias=False,
718
+ prefix=f"{prefix}.merger",
719
+ use_data_parallel=self.use_data_parallel,
720
+ )
721
+ self.embeddings = Glm4vVisionEmbeddings(vision_config)
722
+
723
+ self.post_conv_layernorm = RMSNorm(vision_config.hidden_size,
724
+ eps=vision_config.rms_norm_eps)
725
+ self.downsample = nn.Conv2d(
726
+ in_channels=vision_config.hidden_size,
727
+ out_channels=vision_config.out_hidden_size,
728
+ kernel_size=vision_config.spatial_merge_size,
729
+ stride=vision_config.spatial_merge_size,
730
+ )
731
+ self.post_layernorm = RMSNorm(vision_config.hidden_size,
732
+ eps=vision_config.rms_norm_eps)
733
+
734
+ self.attn_backend = get_vit_attn_backend(
735
+ head_size=head_dim, dtype=torch.get_default_dtype())
736
+ if self.attn_backend != _Backend.FLASH_ATTN and \
737
+ check_upstream_fa_availability(torch.get_default_dtype()):
738
+ self.attn_backend = _Backend.FLASH_ATTN
739
+
740
+ @property
741
+ def dtype(self) -> torch.dtype:
742
+ return self.patch_embed.proj.weight.dtype
743
+
744
+ @property
745
+ def device(self) -> torch.device:
746
+ return self.patch_embed.proj.weight.device
747
+
748
+ def rot_pos_emb(self, grid_thw: torch.Tensor) -> torch.Tensor:
749
+ pos_ids = []
750
+ for t, h, w in grid_thw:
751
+ hpos_ids = torch.arange(h).unsqueeze(1).expand(-1, w)
752
+ wpos_ids = torch.arange(w).unsqueeze(0).expand(h, -1)
753
+ hpos_ids = (hpos_ids.reshape(
754
+ h // self.spatial_merge_size,
755
+ self.spatial_merge_size,
756
+ w // self.spatial_merge_size,
757
+ self.spatial_merge_size,
758
+ ).permute(0, 2, 1, 3).flatten())
759
+ wpos_ids = (wpos_ids.reshape(
760
+ h // self.spatial_merge_size,
761
+ self.spatial_merge_size,
762
+ w // self.spatial_merge_size,
763
+ self.spatial_merge_size,
764
+ ).permute(0, 2, 1, 3).flatten())
765
+ pos_ids.append(
766
+ torch.stack([hpos_ids, wpos_ids], dim=-1).repeat(t, 1))
767
+ pos_ids = torch.cat(pos_ids, dim=0)
768
+ max_grid_size = grid_thw[:, 1:].max()
769
+ rotary_pos_emb_full = self.rotary_pos_emb(max_grid_size)
770
+ rotary_pos_emb = rotary_pos_emb_full[pos_ids].flatten(1)
771
+ return rotary_pos_emb, pos_ids
772
+
773
+ def compute_attn_mask_seqlen(
774
+ self,
775
+ cu_seqlens: torch.Tensor,
776
+ ) -> tuple[Optional[int], Optional[list[int]]]:
777
+ max_seqlen, seqlens = None, None
778
+ seqlens = (cu_seqlens[1:] - cu_seqlens[:-1]).tolist()
779
+ if self.attn_backend == _Backend.FLASH_ATTN:
780
+ max_seqlen = (cu_seqlens[1:] - cu_seqlens[:-1]).max().item()
781
+ return max_seqlen, seqlens
782
+
783
+ def forward(
784
+ self,
785
+ x: torch.Tensor,
786
+ grid_thw: list[list[int]],
787
+ ) -> torch.Tensor:
788
+ # Convert grid_thw to tensor (always expecting list format now)
789
+ grid_thw = torch.tensor(grid_thw, device=x.device, dtype=torch.long)
790
+
791
+ # patchify
792
+ x = x.to(device=self.device, dtype=self.dtype)
793
+ x = self.patch_embed(x)
794
+ x = self.post_conv_layernorm(x)
795
+
796
+ # compute position embedding
797
+ rotary_pos_emb, image_type_ids = self.rot_pos_emb(grid_thw)
798
+ # compute cu_seqlens
799
+ cu_seqlens = torch.repeat_interleave(grid_thw[:, 1] * grid_thw[:, 2],
800
+ grid_thw[:, 0]).cumsum(
801
+ dim=0, dtype=torch.int32)
802
+ cu_seqlens = F.pad(cu_seqlens, (1, 0), "constant", 0)
803
+
804
+ # pre-compute seqlens for attn mask to reduce cuMemcpy operations
805
+ max_seqlen, seqlens = self.compute_attn_mask_seqlen(cu_seqlens)
806
+ x = self.embeddings(x, seqlens, grid_thw, image_type_ids[:, 0],
807
+ image_type_ids[:, 1])
808
+
809
+ # transformers
810
+ x = x.unsqueeze(1)
811
+ for blk in self.blocks:
812
+ x = blk(
813
+ x,
814
+ cu_seqlens=cu_seqlens,
815
+ rotary_pos_emb=rotary_pos_emb,
816
+ max_seqlen=max_seqlen,
817
+ seqlens=seqlens,
818
+ )
819
+
820
+ # adapter
821
+ x = self.post_layernorm(x)
822
+
823
+ x = x.view(-1, self.spatial_merge_size, self.spatial_merge_size,
824
+ x.shape[-1])
825
+ x = x.permute(0, 3, 1, 2)
826
+ x = self.downsample(x).view(-1, self.out_hidden_size)
827
+ x = self.merger(x)
828
+
829
+ return x
830
+
831
+ def load_weights(self, weights: Iterable[tuple[str,
832
+ torch.Tensor]]) -> set[str]:
833
+ stacked_params_mapping = [
834
+ # (param_name, shard_name, shard_id)
835
+ ("attn.qkv.", "attn.q.", "q"),
836
+ ("attn.qkv.", "attn.k.", "k"),
837
+ ("attn.qkv.", "attn.v.", "v"),
838
+ ("gate_up_proj", "gate_proj", 0),
839
+ ("gate_up_proj", "up_proj", 1),
840
+ ]
841
+ params_dict = dict(self.named_parameters(remove_duplicate=False))
842
+ loaded_params: set[str] = set()
843
+
844
+ for name, loaded_weight in weights:
845
+ for param_name, weight_name, shard_id in stacked_params_mapping:
846
+ if weight_name not in name:
847
+ continue
848
+ name = name.replace(weight_name, param_name)
849
+
850
+ param = params_dict[name]
851
+ weight_loader = param.weight_loader
852
+ weight_loader(param, loaded_weight, shard_id)
853
+ break
854
+ else:
855
+ param = params_dict[name]
856
+ weight_loader = getattr(param, "weight_loader",
857
+ default_weight_loader)
858
+ weight_loader(param, loaded_weight)
859
+ loaded_params.add(name)
860
+ return loaded_params
861
+
862
+
863
+ class Glm4vProcessingInfo(BaseProcessingInfo):
864
+
865
+ def get_hf_config(self):
866
+ return self.ctx.get_hf_config()
867
+
868
+ def get_tokenizer(self):
869
+ return self.ctx.tokenizer
870
+
871
+ def get_supported_mm_limits(self) -> Mapping[str, Optional[int]]:
872
+ return {"image": None, "video": 1}
873
+
874
+ def get_image_processor(self, **kwargs: object) -> Glm4vImageProcessor:
875
+ return self.get_hf_processor(**kwargs).image_processor
876
+
877
+ def get_video_processor(self, **kwargs: object) -> Glm4vVideoProcessor:
878
+ return self.get_hf_processor(**kwargs).video_processor
879
+
880
+ def _get_vision_info(
881
+ self,
882
+ *,
883
+ image_width: int,
884
+ image_height: int,
885
+ num_frames: int = 16,
886
+ do_resize: bool = True,
887
+ max_image_pixels: int = 28 * 28 * 2 * 30000,
888
+ ) -> tuple[ImageSize, int]:
889
+ hf_config = self.get_hf_config()
890
+ vision_config = hf_config.vision_config
891
+ patch_size = vision_config.patch_size
892
+ merge_size = vision_config.spatial_merge_size
893
+ temporal_patch_size = vision_config.temporal_patch_size
894
+ if do_resize:
895
+ resized_height, resized_width = smart_resize(
896
+ num_frames=num_frames
897
+ if num_frames > temporal_patch_size else temporal_patch_size,
898
+ height=image_height,
899
+ width=image_width,
900
+ factor=patch_size * merge_size,
901
+ max_pixels=max_image_pixels,
902
+ )
903
+ preprocessed_size = ImageSize(width=resized_width,
904
+ height=resized_height)
905
+ else:
906
+ preprocessed_size = ImageSize(width=image_width,
907
+ height=image_height)
908
+
909
+ # NOTE: Frames are padded to be divisible by `temporal_patch_size`
910
+ # https://github.com/huggingface/transformers/blob/v4.48.3/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py#L294
911
+ padded_num_frames = num_frames + num_frames % temporal_patch_size
912
+
913
+ grid_t = max(padded_num_frames // temporal_patch_size, 1)
914
+ grid_h = preprocessed_size.height // patch_size
915
+ grid_w = preprocessed_size.width // patch_size
916
+
917
+ num_patches = grid_t * grid_h * grid_w
918
+ num_vision_tokens = num_patches // (merge_size**2)
919
+
920
+ return preprocessed_size, num_vision_tokens
921
+
922
+ def get_image_size_with_most_features(self) -> ImageSize:
923
+ max_image_size, _ = self._get_vision_info(image_width=9999999,
924
+ image_height=9999999)
925
+ return max_image_size
926
+
927
+ def get_num_image_tokens(
928
+ self,
929
+ *,
930
+ image_width: int,
931
+ image_height: int,
932
+ ) -> int:
933
+ _, num_image_tokens = self._get_vision_info(
934
+ image_width=image_width,
935
+ image_height=image_height,
936
+ max_image_pixels=28 * 28 * 2 * 6144,
937
+ )
938
+ return num_image_tokens
939
+
940
+ def get_max_image_tokens(self) -> int:
941
+ target_width, target_height = self.get_image_size_with_most_features()
942
+
943
+ return self.get_num_image_tokens(
944
+ image_width=target_width,
945
+ image_height=target_height,
946
+ )
947
+
948
+ def get_num_video_tokens(
949
+ self,
950
+ *,
951
+ image_width: int,
952
+ image_height: int,
953
+ num_frames: int,
954
+ ) -> int:
955
+ _, num_video_tokens = self._get_vision_info(
956
+ image_width=image_width,
957
+ image_height=image_height,
958
+ num_frames=num_frames,
959
+ max_image_pixels=28 * 28 * 2 * 30000,
960
+ )
961
+ return num_video_tokens
962
+
963
+ def _get_max_video_frames(self, max_tokens: int) -> int:
964
+ target_width, target_height = self.get_image_size_with_most_features()
965
+
966
+ num_frames = 0
967
+
968
+ while True:
969
+ next_num_frames = num_frames + 1
970
+ next_max_tokens = self.get_num_video_tokens(
971
+ image_width=target_width,
972
+ image_height=target_height,
973
+ num_frames=next_num_frames,
974
+ )
975
+ if next_max_tokens > max_tokens or next_max_tokens == 0:
976
+ break
977
+
978
+ num_frames = next_num_frames
979
+
980
+ return num_frames
981
+
982
+ def get_num_frames_with_most_features(
983
+ self,
984
+ seq_len: int,
985
+ mm_counts: Mapping[str, int],
986
+ ) -> int:
987
+ max_images = mm_counts.get("image", 0)
988
+ max_videos = mm_counts.get("video", 0)
989
+
990
+ max_image_tokens = self.get_max_image_tokens() * max_images
991
+ max_total_frames = self._get_max_video_frames(seq_len -
992
+ max_image_tokens)
993
+ max_frames_per_video = min(max_total_frames // max(max_videos, 1),
994
+ _MAX_FRAMES_PER_VIDEO)
995
+
996
+ return max(max_frames_per_video, 1)
997
+
998
+ def _get_video_second_idx(self, metadata: dict[str, Any],
999
+ total_frames: int) -> list[int]:
1000
+ video_processor = self.get_video_processor()
1001
+
1002
+ video_fps = metadata.get("fps", video_processor.fps)
1003
+ meta_frames = metadata.get("total_num_frames", total_frames)
1004
+ max_frame_idx = meta_frames - 1
1005
+ duration = metadata.get("duration",
1006
+ round(max_frame_idx / video_fps) + 1)
1007
+ do_sample_frames = metadata["do_sample_frames"]
1008
+ if not do_sample_frames:
1009
+ frame_indices = metadata["frames_indices"]
1010
+ else:
1011
+ if duration <= video_processor.max_duration:
1012
+ n = int(math.floor(duration * video_processor.fps))
1013
+ frame_indices = [
1014
+ min(
1015
+ max_frame_idx,
1016
+ int(math.ceil(i * video_fps / video_processor.fps)),
1017
+ ) for i in range(n)
1018
+ ]
1019
+ else:
1020
+ num_samples = int(video_processor.max_duration *
1021
+ video_processor.fps)
1022
+ if num_samples >= meta_frames:
1023
+ frame_indices = list(range(meta_frames))
1024
+ else:
1025
+ target_seconds = np.linspace(0,
1026
+ duration,
1027
+ num_samples,
1028
+ endpoint=True)
1029
+ frame_indices = [
1030
+ min(max_frame_idx, int(math.ceil(t * video_fps)))
1031
+ for t in target_seconds
1032
+ ]
1033
+
1034
+ seen, uniq = set(), []
1035
+ for idx in frame_indices:
1036
+ if idx not in seen:
1037
+ seen.add(idx)
1038
+ uniq.append(idx)
1039
+ if len(uniq) & 1:
1040
+ uniq.append(uniq[-1])
1041
+ frame_indices = uniq
1042
+
1043
+ full_second_idxs = [int(idx / video_fps) for idx in frame_indices]
1044
+ timestamps_list = full_second_idxs[::2]
1045
+ selected_timestamps = []
1046
+ for idx in range(0, len(timestamps_list)):
1047
+ selected_timestamps.append(timestamps_list[idx])
1048
+ return selected_timestamps
1049
+
1050
+ def _construct_video_placeholder(
1051
+ self,
1052
+ video_array: np.ndarray,
1053
+ metadata: dict[str, Any],
1054
+ grid_thw: torch.Tensor,
1055
+ ) -> str:
1056
+ hf_processor = self.get_hf_processor()
1057
+ tokenizer = self.get_tokenizer()
1058
+ image_processor = hf_processor.image_processor
1059
+
1060
+ hf_config = self.get_hf_config()
1061
+ boi_token_id = hf_config.image_start_token_id
1062
+ eoi_token_id = hf_config.image_end_token_id
1063
+ bov_token_id = hf_config.video_start_token_id
1064
+ eov_token_id = hf_config.video_end_token_id
1065
+ merge_length = image_processor.merge_size**2
1066
+
1067
+ assert isinstance(grid_thw, torch.Tensor)
1068
+ timestamps = self._get_video_second_idx(metadata, len(video_array))
1069
+ frames_idx_token = [
1070
+ tokenizer.encode(str(i), add_special_tokens=False)
1071
+ for i in timestamps
1072
+ ]
1073
+ T, H, W = grid_thw
1074
+ num_tokens_per_frame = int(H * W) // merge_length
1075
+ placeholder = []
1076
+ placeholder.append(bov_token_id)
1077
+ for frame_idx in frames_idx_token:
1078
+ placeholder.append(boi_token_id)
1079
+ placeholder.extend([hf_processor.video_token_id] *
1080
+ num_tokens_per_frame)
1081
+ placeholder.append(eoi_token_id)
1082
+ placeholder.extend(frame_idx)
1083
+ placeholder.append(eov_token_id)
1084
+
1085
+ return placeholder
1086
+
1087
+
1088
+ class Glm4vDummyInputsBuilder(BaseDummyInputsBuilder[Glm4vProcessingInfo]):
1089
+
1090
+ def get_dummy_text(self, mm_counts: Mapping[str, int]) -> str:
1091
+ num_images = mm_counts.get("image", 0)
1092
+ num_videos = mm_counts.get("video", 0)
1093
+
1094
+ hf_config = self.info.get_hf_config()
1095
+ hf_processor = self.info.get_hf_processor()
1096
+ tokenizer = self.info.get_tokenizer()
1097
+
1098
+ image_token: str = hf_processor.image_token
1099
+ video_token_ids = [
1100
+ hf_config.video_start_token_id,
1101
+ hf_processor.video_token_id,
1102
+ hf_config.video_end_token_id,
1103
+ ]
1104
+ video_token = tokenizer.decode(video_token_ids)
1105
+
1106
+ return image_token * num_images + video_token * num_videos
1107
+
1108
+ def get_dummy_mm_data(
1109
+ self,
1110
+ seq_len: int,
1111
+ mm_counts: Mapping[str, int],
1112
+ ) -> MultiModalDataDict:
1113
+ num_images = mm_counts.get("image", 0)
1114
+ num_videos = mm_counts.get("video", 0)
1115
+
1116
+ target_width, target_height = (
1117
+ self.info.get_image_size_with_most_features())
1118
+ target_num_frames = self.info.get_num_frames_with_most_features(
1119
+ seq_len, mm_counts)
1120
+ return {
1121
+ "image":
1122
+ self._get_dummy_images(width=target_width,
1123
+ height=target_height,
1124
+ num_images=num_images),
1125
+ "video":
1126
+ self._get_dummy_videos(
1127
+ width=target_width,
1128
+ height=target_height,
1129
+ num_frames=target_num_frames,
1130
+ num_videos=num_videos,
1131
+ ),
1132
+ }
1133
+
1134
+ def _get_dummy_videos(
1135
+ self,
1136
+ *,
1137
+ width: int,
1138
+ height: int,
1139
+ num_frames: int,
1140
+ num_videos: int,
1141
+ ) -> list[VideoItem]:
1142
+ video = np.full((num_frames, width, height, 3), 255, dtype=np.uint8)
1143
+ video_items = []
1144
+ for i in range(num_videos):
1145
+ video_metadata = {
1146
+ "fps": 2.0,
1147
+ "duration": num_frames / 2.0,
1148
+ "total_num_frames": num_frames,
1149
+ "frames_indices": [i for i in range(num_frames)],
1150
+ "video_backend": "opencv",
1151
+ "do_sample_frames": False,
1152
+ }
1153
+ video_item = (video.copy(), video_metadata)
1154
+ video_items.append(video_item)
1155
+
1156
+ return video_items
1157
+
1158
+
1159
+ class Glm4vMultiModalProcessor(BaseMultiModalProcessor[Glm4vProcessingInfo]):
1160
+
1161
+ def _get_data_parser(self) -> MultiModalDataParser:
1162
+ return MultiModalDataParser(video_needs_metadata=True)
1163
+
1164
+ def _call_hf_processor(
1165
+ self,
1166
+ prompt: str,
1167
+ mm_data: Mapping[str, object],
1168
+ mm_kwargs: Mapping[str, object],
1169
+ tok_kwargs: Mapping[str, object],
1170
+ ) -> BatchFeature:
1171
+ mm_data = dict(mm_data)
1172
+ processor = self.info.get_hf_processor(**mm_kwargs)
1173
+
1174
+ # GLM-4.1V use `image_token_id` as video placeholder, we need to
1175
+ # replace it with `video_token_id` for video processing. So we
1176
+ # separate video processing from image processing.
1177
+ if ("videos" in mm_data and isinstance(mm_data["videos"], list)
1178
+ and len(mm_data["videos"]) > 0):
1179
+ video_grid_thw_lst = []
1180
+ pixel_values_videos_lst = []
1181
+ for item in mm_data.pop("videos", []):
1182
+ video_array, metadata = item
1183
+
1184
+ # don't update mm_kwargs inplace
1185
+ video_mm_kwargs = dict(**mm_kwargs)
1186
+ video_mm_kwargs["do_sample_frames"] = metadata.get(
1187
+ "do_sample_frames", True)
1188
+
1189
+ video_mm_data = dict()
1190
+ video_mm_data["videos"] = [[video_array]]
1191
+
1192
+ # backward compatibility for Transformers 4.55
1193
+ unuse_metadata = ["do_sample_frames"]
1194
+ if not hasattr(
1195
+ VideoMetadata,
1196
+ "frames_indices") and "frames_indices" in metadata:
1197
+ unuse_metadata.append("frames_indices")
1198
+
1199
+ video_mm_data["video_metadata"] = [[
1200
+ VideoMetadata(
1201
+ **{
1202
+ k: metadata[k]
1203
+ for k in metadata if k not in unuse_metadata
1204
+ })
1205
+ ]]
1206
+
1207
+ video_outputs = super()._call_hf_processor(
1208
+ prompt="<|begin_of_video|><|video|><|end_of_video|>",
1209
+ mm_data=video_mm_data,
1210
+ mm_kwargs=video_mm_kwargs,
1211
+ tok_kwargs=tok_kwargs,
1212
+ )
1213
+ if not video_mm_kwargs["do_sample_frames"] and Version(
1214
+ TRANSFORMERS_VERSION) < Version("4.56.0"):
1215
+ # Transformers v4.55 has incorrect timestamps issue for
1216
+ # skip sampling. We construct the placeholder manually to
1217
+ # get placeholders with correct timestamps.
1218
+ placeholder = self.info._construct_video_placeholder(
1219
+ video_array,
1220
+ metadata,
1221
+ video_outputs["video_grid_thw"].squeeze(0),
1222
+ )
1223
+ video_placeholder = processor.tokenizer.decode(placeholder)
1224
+ else:
1225
+ input_ids = video_outputs.pop("input_ids")
1226
+ input_ids[input_ids == processor.image_token_id] = (
1227
+ processor.video_token_id)
1228
+ video_placeholder = processor.tokenizer.batch_decode(
1229
+ input_ids)[0]
1230
+ prompt = prompt.replace(
1231
+ "<|begin_of_video|><|video|><|end_of_video|>",
1232
+ video_placeholder,
1233
+ 1,
1234
+ )
1235
+
1236
+ video_grid_thw_lst.append(video_outputs["video_grid_thw"])
1237
+ pixel_values_videos_lst.append(
1238
+ video_outputs["pixel_values_videos"])
1239
+ video_outputs = dict(
1240
+ pixel_values_videos=torch.cat(pixel_values_videos_lst),
1241
+ video_grid_thw=torch.cat(video_grid_thw_lst),
1242
+ )
1243
+ else:
1244
+ video_outputs = dict()
1245
+
1246
+ processed_outputs = super()._call_hf_processor(
1247
+ prompt=prompt,
1248
+ mm_data=mm_data,
1249
+ mm_kwargs=mm_kwargs,
1250
+ tok_kwargs=tok_kwargs,
1251
+ )
1252
+ combined_outputs = dict(
1253
+ processed_outputs,
1254
+ **video_outputs,
1255
+ )
1256
+ return BatchFeature(combined_outputs)
1257
+
1258
+ def _get_mm_fields_config(
1259
+ self,
1260
+ hf_inputs: BatchFeature,
1261
+ hf_processor_mm_kwargs: Mapping[str, object],
1262
+ ) -> Mapping[str, MultiModalFieldConfig]:
1263
+ return _create_qwen2vl_field_factory(
1264
+ self.info.get_hf_config().vision_config.spatial_merge_size)(
1265
+ hf_inputs)
1266
+
1267
+ def _get_prompt_updates(
1268
+ self,
1269
+ mm_items: MultiModalDataItems,
1270
+ hf_processor_mm_kwargs: Mapping[str, Any],
1271
+ out_mm_kwargs: MultiModalKwargsItems,
1272
+ ) -> Sequence[PromptUpdate]:
1273
+ hf_processor = self.info.get_hf_processor(**hf_processor_mm_kwargs)
1274
+ image_processor = self.info.get_image_processor(
1275
+ **hf_processor_mm_kwargs)
1276
+
1277
+ merge_length = image_processor.merge_size**2
1278
+
1279
+ def get_image_replacement_glm4v(item_idx: int):
1280
+ out_item = out_mm_kwargs["image"][item_idx]
1281
+ grid_thw = out_item["image_grid_thw"].data
1282
+ assert isinstance(grid_thw, torch.Tensor)
1283
+
1284
+ num_tokens = int(grid_thw.prod()) // merge_length
1285
+ return [hf_processor.image_token_id] * num_tokens
1286
+
1287
+ def get_video_replacement_glm4v(item_idx: int):
1288
+ out_item = out_mm_kwargs["video"][item_idx]
1289
+ grid_thw = out_item["video_grid_thw"].data
1290
+ assert isinstance(grid_thw, torch.Tensor)
1291
+
1292
+ video, metadata = mm_items["video"][item_idx]
1293
+ placeholder = self.info._construct_video_placeholder(
1294
+ video, metadata, grid_thw)
1295
+ return PromptUpdateDetails.select_token_id(
1296
+ placeholder,
1297
+ embed_token_id=hf_processor.video_token_id,
1298
+ )
1299
+
1300
+ return [
1301
+ PromptReplacement(
1302
+ modality="image",
1303
+ target=hf_processor.image_token,
1304
+ replacement=get_image_replacement_glm4v,
1305
+ ),
1306
+ PromptReplacement(
1307
+ modality="video",
1308
+ target="<|begin_of_video|><|video|><|end_of_video|>",
1309
+ replacement=get_video_replacement_glm4v,
1310
+ ),
1311
+ ]
1312
+
1313
+
1314
+ @MULTIMODAL_REGISTRY.register_processor(
1315
+ Glm4vMultiModalProcessor,
1316
+ info=Glm4vProcessingInfo,
1317
+ dummy_inputs=Glm4vDummyInputsBuilder,
1318
+ )
1319
+ class Glm4vForConditionalGeneration(nn.Module, SupportsMultiModal,
1320
+ SupportsLoRA, SupportsPP):
1321
+ packed_modules_mapping = {
1322
+ "qkv_proj": [
1323
+ "q_proj",
1324
+ "k_proj",
1325
+ "v_proj",
1326
+ ],
1327
+ "gate_up_proj": ["gate_up_proj"]
1328
+ }
1329
+
1330
+ # To ensure correct weight loading and mapping.
1331
+ hf_to_vllm_mapper = WeightsMapper(
1332
+ orig_to_new_prefix={
1333
+ "lm_head.": "language_model.lm_head.",
1334
+ "model.language_model.": "language_model.model.",
1335
+ "model.visual.": "visual.",
1336
+ })
1337
+
1338
+ supports_encoder_tp_data = True
1339
+
1340
+ @classmethod
1341
+ def get_placeholder_str(cls, modality: str, i: int) -> Optional[str]:
1342
+ if modality.startswith("image"):
1343
+ return "<|begin_of_image|><|image|><|end_of_image|>"
1344
+ if modality.startswith("video"):
1345
+ return "<|begin_of_video|><|video|><|end_of_video|>"
1346
+
1347
+ raise ValueError("Only image or video modality is supported")
1348
+
1349
+ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
1350
+ super().__init__()
1351
+ config = vllm_config.model_config.hf_config
1352
+ quant_config = vllm_config.quant_config
1353
+ multimodal_config = vllm_config.model_config.multimodal_config
1354
+
1355
+ self.config = config
1356
+ self.multimodal_config = multimodal_config
1357
+ self.use_data_parallel = multimodal_config.mm_encoder_tp_mode == "data"
1358
+
1359
+ self.visual = Glm4vVisionTransformer(
1360
+ config.vision_config,
1361
+ norm_eps=getattr(config, "rms_norm_eps", 1e-5),
1362
+ quant_config=quant_config,
1363
+ prefix=maybe_prefix(prefix, "visual"),
1364
+ use_data_parallel=self.use_data_parallel,
1365
+ )
1366
+
1367
+ if config.model_type == "glm4v":
1368
+ architectures = ["Glm4ForCausalLM"]
1369
+ elif config.model_type == "glm4v_moe":
1370
+ architectures = ["Glm4MoeForCausalLM"]
1371
+ else:
1372
+ architectures = None
1373
+
1374
+ self.language_model = init_vllm_registered_model(
1375
+ vllm_config=vllm_config,
1376
+ hf_config=config.text_config,
1377
+ prefix=maybe_prefix(prefix, "language_model"),
1378
+ architectures=architectures)
1379
+
1380
+ self.make_empty_intermediate_tensors = (
1381
+ self.language_model.make_empty_intermediate_tensors)
1382
+
1383
+ def _validate_and_reshape_mm_tensor(self, mm_input: object,
1384
+ name: str) -> torch.Tensor:
1385
+ if not isinstance(mm_input, (torch.Tensor, list)):
1386
+ raise ValueError(
1387
+ f"Incorrect type of {name}. Got type: {type(mm_input)}")
1388
+ if isinstance(mm_input, torch.Tensor):
1389
+ if mm_input.ndim == 2:
1390
+ return mm_input
1391
+ if mm_input.ndim != 3:
1392
+ raise ValueError(f"{name} should be 2D or batched 3D tensor. "
1393
+ f"Got ndim: {mm_input.ndim} "
1394
+ f"(shape={mm_input.shape})")
1395
+ return mm_input.reshape(-1, mm_input.shape[-1])
1396
+ else:
1397
+ return torch.concat(mm_input)
1398
+
1399
+ def _parse_and_validate_image_input(
1400
+ self, **kwargs: object) -> Optional[Glm4vImageInputs]:
1401
+ pixel_values = kwargs.pop("pixel_values", None)
1402
+ image_embeds = kwargs.pop("image_embeds", None)
1403
+ image_grid_thw = kwargs.pop("image_grid_thw", None)
1404
+
1405
+ if pixel_values is None and image_embeds is None:
1406
+ return None
1407
+
1408
+ if pixel_values is not None:
1409
+ pixel_values = self._validate_and_reshape_mm_tensor(
1410
+ pixel_values, "image pixel values")
1411
+ image_grid_thw = self._validate_and_reshape_mm_tensor(
1412
+ image_grid_thw, "image grid_thw")
1413
+
1414
+ return Glm4vImagePixelInputs(
1415
+ type="pixel_values",
1416
+ pixel_values=pixel_values,
1417
+ image_grid_thw=image_grid_thw,
1418
+ )
1419
+
1420
+ if image_embeds is not None:
1421
+ image_embeds = self._validate_and_reshape_mm_tensor(
1422
+ image_embeds, "image embeds")
1423
+ image_grid_thw = self._validate_and_reshape_mm_tensor(
1424
+ image_grid_thw, "image grid_thw")
1425
+
1426
+ return Glm4vImageEmbeddingInputs(
1427
+ type="image_embeds",
1428
+ image_embeds=image_embeds,
1429
+ image_grid_thw=image_grid_thw,
1430
+ )
1431
+
1432
+ def _parse_and_validate_video_input(
1433
+ self, **kwargs: object) -> Optional[Glm4vVideoInputs]:
1434
+ pixel_values_videos = kwargs.pop("pixel_values_videos", None)
1435
+ video_embeds = kwargs.pop("video_embeds", None)
1436
+ video_grid_thw = kwargs.pop("video_grid_thw", None)
1437
+
1438
+ if pixel_values_videos is None and video_embeds is None:
1439
+ return None
1440
+
1441
+ if pixel_values_videos is not None:
1442
+ pixel_values_videos = self._validate_and_reshape_mm_tensor(
1443
+ pixel_values_videos, "video pixel values")
1444
+ video_grid_thw = self._validate_and_reshape_mm_tensor(
1445
+ video_grid_thw, "video grid_thw")
1446
+
1447
+ return Glm4vVideoPixelInputs(
1448
+ type="pixel_values_videos",
1449
+ pixel_values_videos=pixel_values_videos,
1450
+ video_grid_thw=video_grid_thw,
1451
+ )
1452
+
1453
+ if video_embeds is not None:
1454
+ video_embeds = self._validate_and_reshape_mm_tensor(
1455
+ video_embeds, "video embeds")
1456
+ video_grid_thw = self._validate_and_reshape_mm_tensor(
1457
+ video_grid_thw, "video grid_thw")
1458
+
1459
+ return Glm4vVideoEmbeddingInputs(
1460
+ type="video_embeds",
1461
+ video_embeds=video_embeds,
1462
+ video_grid_thw=video_grid_thw,
1463
+ )
1464
+
1465
+ def _process_image_input(
1466
+ self, image_input: Glm4vImageInputs) -> tuple[torch.Tensor, ...]:
1467
+ grid_thw = image_input["image_grid_thw"]
1468
+ assert grid_thw.ndim == 2
1469
+ grid_thw_list = grid_thw.tolist()
1470
+
1471
+ if image_input["type"] == "image_embeds":
1472
+ image_embeds = image_input["image_embeds"].type(self.visual.dtype)
1473
+ else:
1474
+ pixel_values = image_input["pixel_values"].type(self.visual.dtype)
1475
+ if self.use_data_parallel:
1476
+ return run_dp_sharded_mrope_vision_model(self.visual,
1477
+ pixel_values,
1478
+ grid_thw.tolist(),
1479
+ rope_type="rope_3d")
1480
+ else:
1481
+ image_embeds = self.visual(pixel_values,
1482
+ grid_thw=grid_thw.tolist())
1483
+ merge_size = self.visual.spatial_merge_size
1484
+ sizes = (torch.tensor(grid_thw_list, dtype=torch.long).prod(-1) //
1485
+ (merge_size * merge_size)).tolist()
1486
+ return image_embeds.split(sizes)
1487
+
1488
+ def _process_video_input(
1489
+ self, video_input: Glm4vVideoInputs) -> tuple[torch.Tensor, ...]:
1490
+ grid_thw = video_input["video_grid_thw"]
1491
+ assert grid_thw.ndim == 2
1492
+ grid_thw_list = grid_thw.tolist()
1493
+
1494
+ if video_input["type"] == "video_embeds":
1495
+ video_embeds = video_input["video_embeds"].type(self.visual.dtype)
1496
+ else:
1497
+ pixel_values_videos = video_input["pixel_values_videos"].type(
1498
+ self.visual.dtype)
1499
+ if self.use_data_parallel:
1500
+ return run_dp_sharded_mrope_vision_model(self.visual,
1501
+ pixel_values_videos,
1502
+ grid_thw.tolist(),
1503
+ rope_type="rope_3d")
1504
+ else:
1505
+ video_embeds = self.visual(pixel_values_videos,
1506
+ grid_thw=grid_thw.tolist())
1507
+ # Split concatenated embeddings for each video item.
1508
+ merge_size = self.visual.spatial_merge_size
1509
+ sizes = (torch.tensor(grid_thw_list, dtype=torch.long).prod(-1) //
1510
+ (merge_size * merge_size)).tolist()
1511
+ return video_embeds.split(sizes)
1512
+
1513
+ def _parse_and_validate_multimodal_inputs(self, **kwargs: object) -> dict:
1514
+ mm_input_by_modality = {}
1515
+
1516
+ # Preserve the order of modalities if there are multiple of them
1517
+ # from the order of kwargs.
1518
+ for input_key in kwargs:
1519
+ if (input_key in ("pixel_values", "image_embeds")
1520
+ and "image" not in mm_input_by_modality):
1521
+ mm_input_by_modality["image"] = (
1522
+ self._parse_and_validate_image_input(**kwargs))
1523
+ if (input_key in ("pixel_values_videos", "video_embeds")
1524
+ and "video" not in mm_input_by_modality):
1525
+ mm_input_by_modality["video"] = (
1526
+ self._parse_and_validate_video_input(**kwargs))
1527
+ return mm_input_by_modality
1528
+
1529
+ def get_language_model(self) -> torch.nn.Module:
1530
+ return self.language_model
1531
+
1532
+ def get_multimodal_embeddings(
1533
+ self, **kwargs: object) -> Optional[MultiModalEmbeddings]:
1534
+ mm_input_by_modality = self._parse_and_validate_multimodal_inputs(
1535
+ **kwargs)
1536
+ if not mm_input_by_modality:
1537
+ return None
1538
+
1539
+ # The result multimodal_embeddings is tuple of tensors, with each
1540
+ # tensor corresponding to a multimodal data item (image or video).
1541
+ multimodal_embeddings: tuple[torch.Tensor, ...] = ()
1542
+
1543
+ # NOTE: It is important to iterate over the keys in this dictionary
1544
+ # to preserve the order of the modalities.
1545
+ for modality in mm_input_by_modality:
1546
+ multimodal_input = mm_input_by_modality[modality]
1547
+ if modality == "image":
1548
+ vision_embeddings = self._process_image_input(multimodal_input)
1549
+ multimodal_embeddings += vision_embeddings
1550
+ if modality == "video":
1551
+ video_embeddings = self._process_video_input(multimodal_input)
1552
+ multimodal_embeddings += video_embeddings
1553
+ return multimodal_embeddings
1554
+
1555
+ def get_input_embeddings(
1556
+ self,
1557
+ input_ids: torch.Tensor,
1558
+ multimodal_embeddings: Optional[MultiModalEmbeddings] = None,
1559
+ ) -> torch.Tensor:
1560
+ inputs_embeds = self.language_model.get_input_embeddings(input_ids)
1561
+ if (multimodal_embeddings is not None
1562
+ and len(multimodal_embeddings) != 0
1563
+ and all(embed.numel() > 0 for embed in multimodal_embeddings)):
1564
+ inputs_embeds = merge_multimodal_embeddings(
1565
+ input_ids,
1566
+ inputs_embeds,
1567
+ multimodal_embeddings,
1568
+ [self.config.image_token_id, self.config.video_token_id],
1569
+ )
1570
+ return inputs_embeds
1571
+
1572
+ def get_input_embeddings_v0(
1573
+ self,
1574
+ input_ids: torch.Tensor,
1575
+ image_input: Optional[Glm4vImageInputs] = None,
1576
+ video_input: Optional[Glm4vVideoInputs] = None,
1577
+ ) -> torch.Tensor:
1578
+ inputs_embeds = self.get_input_embeddings(input_ids)
1579
+ if image_input is not None:
1580
+ image_embeds = self._process_image_input(image_input)
1581
+ inputs_embeds = merge_multimodal_embeddings(
1582
+ input_ids,
1583
+ inputs_embeds,
1584
+ image_embeds,
1585
+ placeholder_token_id=self.config.image_token_id,
1586
+ )
1587
+
1588
+ if video_input is not None:
1589
+ video_embeds = self._process_video_input(video_input)
1590
+ inputs_embeds = merge_multimodal_embeddings(
1591
+ input_ids,
1592
+ inputs_embeds,
1593
+ video_embeds,
1594
+ placeholder_token_id=self.config.video_token_id,
1595
+ )
1596
+ return inputs_embeds
1597
+
1598
+ def forward(
1599
+ self,
1600
+ input_ids: torch.Tensor,
1601
+ positions: torch.Tensor,
1602
+ intermediate_tensors: Optional[IntermediateTensors] = None,
1603
+ inputs_embeds: Optional[torch.Tensor] = None,
1604
+ **kwargs: object,
1605
+ ) -> Union[torch.Tensor, IntermediateTensors]:
1606
+ """Run forward pass for GLM-4V.
1607
+
1608
+ Args:
1609
+ input_ids: Flattened (concatenated) input_ids corresponding to a
1610
+ batch.
1611
+ positions: Flattened (concatenated) position ids corresponding to a
1612
+ batch.
1613
+ **NOTE**: If mrope is enabled (default setting for GLM-4V
1614
+ opensource models), the shape will be `(3, seq_len)`,
1615
+ otherwise it will be `(seq_len,).
1616
+ intermediate_tensors: Optional intermediate tensors for pipeline
1617
+ parallelism.
1618
+ inputs_embeds: Optional pre-computed input embeddings.
1619
+ **kwargs: Additional keyword arguments.
1620
+ """
1621
+ if intermediate_tensors is not None:
1622
+ inputs_embeds = None
1623
+
1624
+ # NOTE: In v1, inputs_embeds is always generated at model runner from
1625
+ # `get_multimodal_embeddings` and `get_input_embeddings`, this
1626
+ # condition is only for v0 compatibility.
1627
+ elif inputs_embeds is None:
1628
+ image_input = self._parse_and_validate_image_input(**kwargs)
1629
+ video_input = self._parse_and_validate_video_input(**kwargs)
1630
+
1631
+ if image_input is None and video_input is None:
1632
+ inputs_embeds = None
1633
+ else:
1634
+ if uses_mrope(self.config):
1635
+ assert positions.ndim == 2 and positions.size(0) == 3, (
1636
+ "multimodal section rotary embedding requires "
1637
+ f"(3, seq_len) positions, but got {positions.size()}")
1638
+ inputs_embeds = self.get_input_embeddings_v0(
1639
+ input_ids,
1640
+ image_input=image_input,
1641
+ video_input=video_input)
1642
+ input_ids = None
1643
+
1644
+ hidden_states = self.language_model.model(
1645
+ input_ids=input_ids,
1646
+ positions=positions,
1647
+ intermediate_tensors=intermediate_tensors,
1648
+ inputs_embeds=inputs_embeds,
1649
+ )
1650
+ return hidden_states
1651
+
1652
+ def compute_logits(
1653
+ self,
1654
+ hidden_states: torch.Tensor,
1655
+ ) -> Optional[torch.Tensor]:
1656
+ return self.language_model.compute_logits(hidden_states)
1657
+
1658
+ def load_weights(self, weights: Iterable[tuple[str,
1659
+ torch.Tensor]]) -> set[str]:
1660
+ loader = AutoWeightsLoader(self)
1661
+ return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
1662
+
1663
+ def get_mm_mapping(self) -> MultiModelKeys:
1664
+ """
1665
+ Get the module prefix in multimodal models
1666
+ """
1667
+ return MultiModelKeys.from_string_field(
1668
+ language_model="language_model.model",
1669
+ connector="visual.merger.",
1670
+ tower_model="visual.",
1671
+ )
1672
+
1673
+
1674
+ @MULTIMODAL_REGISTRY.register_processor(
1675
+ Glm4vMultiModalProcessor,
1676
+ info=Glm4vProcessingInfo,
1677
+ dummy_inputs=Glm4vDummyInputsBuilder,
1678
+ )
1679
+ class Glm4vMoeForConditionalGeneration(Glm4vForConditionalGeneration):
1680
+ packed_modules_mapping = {
1681
+ "qkv_proj": [
1682
+ "q_proj",
1683
+ "k_proj",
1684
+ "v_proj",
1685
+ ],
1686
+ "gate_up_proj": [
1687
+ "gate_proj",
1688
+ "up_proj",
1689
+ ],
1690
+ }