vllm-cpu-amxbf16 0.11.2.post2__cp310-cp310-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.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +225 -0
- vllm/_aiter_ops.py +983 -0
- vllm/_bc_linter.py +54 -0
- vllm/_custom_ops.py +2863 -0
- vllm/_ipex_ops.py +457 -0
- vllm/_version.py +34 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +43 -0
- vllm/assets/base.py +40 -0
- vllm/assets/image.py +59 -0
- vllm/assets/video.py +149 -0
- vllm/attention/__init__.py +18 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +391 -0
- vllm/attention/backends/registry.py +195 -0
- vllm/attention/backends/utils.py +33 -0
- vllm/attention/layer.py +1052 -0
- vllm/attention/layers/__init__.py +0 -0
- vllm/attention/layers/chunked_local_attention.py +121 -0
- vllm/attention/layers/cross_attention.py +178 -0
- vllm/attention/layers/encoder_only_attention.py +103 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +401 -0
- vllm/attention/ops/common.py +414 -0
- vllm/attention/ops/flashmla.py +251 -0
- vllm/attention/ops/merge_attn_states.py +47 -0
- vllm/attention/ops/paged_attn.py +262 -0
- vllm/attention/ops/pallas_kv_cache_update.py +130 -0
- vllm/attention/ops/prefix_prefill.py +814 -0
- vllm/attention/ops/rocm_aiter_paged_attn.py +123 -0
- vllm/attention/ops/triton_decode_attention.py +712 -0
- vllm/attention/ops/triton_merge_attn_states.py +105 -0
- vllm/attention/ops/triton_reshape_and_cache_flash.py +184 -0
- vllm/attention/ops/triton_unified_attention.py +941 -0
- vllm/attention/ops/vit_attn_wrappers.py +178 -0
- vllm/attention/selector.py +231 -0
- vllm/attention/utils/__init__.py +0 -0
- vllm/attention/utils/fa_utils.py +109 -0
- vllm/attention/utils/kv_sharing_utils.py +33 -0
- vllm/attention/utils/kv_transfer_utils.py +60 -0
- vllm/beam_search.py +88 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +3222 -0
- vllm/benchmarks/latency.py +172 -0
- vllm/benchmarks/lib/__init__.py +3 -0
- vllm/benchmarks/lib/endpoint_request_func.py +777 -0
- vllm/benchmarks/lib/ready_checker.py +72 -0
- vllm/benchmarks/lib/utils.py +79 -0
- vllm/benchmarks/serve.py +1531 -0
- vllm/benchmarks/sweep/__init__.py +0 -0
- vllm/benchmarks/sweep/cli.py +38 -0
- vllm/benchmarks/sweep/param_sweep.py +91 -0
- vllm/benchmarks/sweep/plot.py +580 -0
- vllm/benchmarks/sweep/serve.py +416 -0
- vllm/benchmarks/sweep/serve_sla.py +492 -0
- vllm/benchmarks/sweep/server.py +114 -0
- vllm/benchmarks/sweep/sla_sweep.py +132 -0
- vllm/benchmarks/sweep/utils.py +4 -0
- vllm/benchmarks/throughput.py +799 -0
- vllm/collect_env.py +857 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +209 -0
- vllm/compilation/backends.py +759 -0
- vllm/compilation/base_static_graph.py +57 -0
- vllm/compilation/caching.py +178 -0
- vllm/compilation/collective_fusion.py +1234 -0
- vllm/compilation/compiler_interface.py +639 -0
- vllm/compilation/counter.py +48 -0
- vllm/compilation/cuda_graph.py +208 -0
- vllm/compilation/decorators.py +571 -0
- vllm/compilation/fix_functionalization.py +253 -0
- vllm/compilation/fusion.py +374 -0
- vllm/compilation/fusion_attn.py +359 -0
- vllm/compilation/fx_utils.py +91 -0
- vllm/compilation/inductor_pass.py +133 -0
- vllm/compilation/matcher_utils.py +317 -0
- vllm/compilation/monitor.py +62 -0
- vllm/compilation/noop_elimination.py +134 -0
- vllm/compilation/partition_rules.py +72 -0
- vllm/compilation/pass_manager.py +135 -0
- vllm/compilation/piecewise_backend.py +121 -0
- vllm/compilation/post_cleanup.py +21 -0
- vllm/compilation/qk_norm_rope_fusion.py +238 -0
- vllm/compilation/sequence_parallelism.py +363 -0
- vllm/compilation/torch25_custom_graph_pass.py +44 -0
- vllm/compilation/vllm_inductor_pass.py +173 -0
- vllm/compilation/wrapper.py +238 -0
- vllm/config/__init__.py +102 -0
- vllm/config/cache.py +207 -0
- vllm/config/compilation.py +975 -0
- vllm/config/device.py +75 -0
- vllm/config/ec_transfer.py +110 -0
- vllm/config/kv_events.py +56 -0
- vllm/config/kv_transfer.py +114 -0
- vllm/config/load.py +124 -0
- vllm/config/lora.py +112 -0
- vllm/config/model.py +2162 -0
- vllm/config/multimodal.py +248 -0
- vllm/config/observability.py +123 -0
- vllm/config/parallel.py +655 -0
- vllm/config/pooler.py +122 -0
- vllm/config/scheduler.py +298 -0
- vllm/config/speculative.py +654 -0
- vllm/config/speech_to_text.py +38 -0
- vllm/config/structured_outputs.py +92 -0
- vllm/config/utils.py +178 -0
- vllm/config/vllm.py +1166 -0
- vllm/connections.py +189 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +327 -0
- vllm/distributed/__init__.py +6 -0
- vllm/distributed/communication_op.py +43 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/all2all.py +490 -0
- vllm/distributed/device_communicators/all_reduce_utils.py +344 -0
- vllm/distributed/device_communicators/base_device_communicator.py +297 -0
- vllm/distributed/device_communicators/cpu_communicator.py +209 -0
- vllm/distributed/device_communicators/cuda_communicator.py +340 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +216 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +326 -0
- vllm/distributed/device_communicators/mnnvl_compat.py +27 -0
- vllm/distributed/device_communicators/pynccl.py +386 -0
- vllm/distributed/device_communicators/pynccl_allocator.py +191 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +564 -0
- vllm/distributed/device_communicators/quick_all_reduce.py +290 -0
- vllm/distributed/device_communicators/ray_communicator.py +259 -0
- vllm/distributed/device_communicators/shm_broadcast.py +733 -0
- vllm/distributed/device_communicators/shm_object_storage.py +660 -0
- vllm/distributed/device_communicators/symm_mem.py +156 -0
- vllm/distributed/device_communicators/tpu_communicator.py +107 -0
- vllm/distributed/device_communicators/xpu_communicator.py +95 -0
- vllm/distributed/ec_transfer/__init__.py +14 -0
- vllm/distributed/ec_transfer/ec_connector/__init__.py +0 -0
- vllm/distributed/ec_transfer/ec_connector/base.py +247 -0
- vllm/distributed/ec_transfer/ec_connector/factory.py +88 -0
- vllm/distributed/ec_transfer/ec_connector/shared_storage_connector.py +201 -0
- vllm/distributed/ec_transfer/ec_transfer_state.py +42 -0
- vllm/distributed/eplb/__init__.py +8 -0
- vllm/distributed/eplb/eplb_state.py +837 -0
- vllm/distributed/eplb/rebalance_algo.py +260 -0
- vllm/distributed/eplb/rebalance_execute.py +431 -0
- vllm/distributed/kv_events.py +371 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +20 -0
- vllm/distributed/kv_transfer/disagg_prefill_workflow.jpg +0 -0
- vllm/distributed/kv_transfer/kv_connector/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/base.py +10 -0
- vllm/distributed/kv_transfer/kv_connector/factory.py +192 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +268 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +19 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +546 -0
- vllm/distributed/kv_transfer/kv_connector/v1/decode_bench_connector.py +419 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +216 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/__init__.py +18 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/multi_process_adapter.py +379 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py +221 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/vllm_v1_adapter.py +1411 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py +867 -0
- vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +189 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +454 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +2440 -0
- vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +504 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py +531 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +632 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +273 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +450 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +179 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +164 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +242 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +66 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +295 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +285 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +78 -0
- vllm/distributed/parallel_state.py +1759 -0
- vllm/distributed/tpu_distributed_utils.py +188 -0
- vllm/distributed/utils.py +543 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +2144 -0
- vllm/engine/async_llm_engine.py +6 -0
- vllm/engine/llm_engine.py +6 -0
- vllm/engine/protocol.py +170 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/anthropic/__init__.py +0 -0
- vllm/entrypoints/anthropic/protocol.py +162 -0
- vllm/entrypoints/anthropic/serving_messages.py +460 -0
- vllm/entrypoints/api_server.py +184 -0
- vllm/entrypoints/chat_utils.py +1690 -0
- vllm/entrypoints/cli/__init__.py +13 -0
- vllm/entrypoints/cli/benchmark/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/base.py +25 -0
- vllm/entrypoints/cli/benchmark/latency.py +21 -0
- vllm/entrypoints/cli/benchmark/main.py +56 -0
- vllm/entrypoints/cli/benchmark/serve.py +21 -0
- vllm/entrypoints/cli/benchmark/sweep.py +21 -0
- vllm/entrypoints/cli/benchmark/throughput.py +21 -0
- vllm/entrypoints/cli/collect_env.py +38 -0
- vllm/entrypoints/cli/main.py +79 -0
- vllm/entrypoints/cli/openai.py +256 -0
- vllm/entrypoints/cli/run_batch.py +68 -0
- vllm/entrypoints/cli/serve.py +249 -0
- vllm/entrypoints/cli/types.py +29 -0
- vllm/entrypoints/constants.py +10 -0
- vllm/entrypoints/context.py +572 -0
- vllm/entrypoints/dynamic_lora.py +57 -0
- vllm/entrypoints/harmony_utils.py +535 -0
- vllm/entrypoints/launcher.py +175 -0
- vllm/entrypoints/llm.py +1768 -0
- vllm/entrypoints/logger.py +84 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +2096 -0
- vllm/entrypoints/openai/cli_args.py +302 -0
- vllm/entrypoints/openai/orca_metrics.py +120 -0
- vllm/entrypoints/openai/protocol.py +3299 -0
- vllm/entrypoints/openai/run_batch.py +547 -0
- vllm/entrypoints/openai/serving_chat.py +1772 -0
- vllm/entrypoints/openai/serving_classification.py +235 -0
- vllm/entrypoints/openai/serving_completion.py +715 -0
- vllm/entrypoints/openai/serving_embedding.py +695 -0
- vllm/entrypoints/openai/serving_engine.py +1433 -0
- vllm/entrypoints/openai/serving_models.py +304 -0
- vllm/entrypoints/openai/serving_pooling.py +346 -0
- vllm/entrypoints/openai/serving_responses.py +2021 -0
- vllm/entrypoints/openai/serving_score.py +503 -0
- vllm/entrypoints/openai/serving_tokenization.py +203 -0
- vllm/entrypoints/openai/serving_tokens.py +269 -0
- vllm/entrypoints/openai/serving_transcription.py +148 -0
- vllm/entrypoints/openai/speech_to_text.py +405 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +142 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/ernie45_tool_parser.py +210 -0
- vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +200 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +253 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +494 -0
- vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +420 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +227 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +323 -0
- vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +590 -0
- vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +341 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +290 -0
- vllm/entrypoints/openai/tool_parsers/longcat_tool_parser.py +37 -0
- vllm/entrypoints/openai/tool_parsers/minimax_m2_tool_parser.py +643 -0
- vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +849 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/olmo3_tool_parser.py +366 -0
- vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +97 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +120 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +332 -0
- vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +781 -0
- vllm/entrypoints/openai/tool_parsers/qwen3xml_tool_parser.py +1316 -0
- vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +744 -0
- vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +303 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +229 -0
- vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +556 -0
- vllm/entrypoints/renderer.py +409 -0
- vllm/entrypoints/responses_utils.py +77 -0
- vllm/entrypoints/sagemaker/__init__.py +4 -0
- vllm/entrypoints/sagemaker/routes.py +72 -0
- vllm/entrypoints/score_utils.py +242 -0
- vllm/entrypoints/ssl.py +78 -0
- vllm/entrypoints/tool.py +143 -0
- vllm/entrypoints/tool_server.py +209 -0
- vllm/entrypoints/utils.py +319 -0
- vllm/env_override.py +378 -0
- vllm/envs.py +1659 -0
- vllm/forward_context.py +356 -0
- vllm/inputs/__init__.py +44 -0
- vllm/inputs/data.py +359 -0
- vllm/inputs/parse.py +137 -0
- vllm/inputs/preprocess.py +727 -0
- vllm/logger.py +267 -0
- vllm/logging_utils/__init__.py +10 -0
- vllm/logging_utils/dump_input.py +83 -0
- vllm/logging_utils/formatter.py +77 -0
- vllm/logging_utils/log_time.py +34 -0
- vllm/logits_process.py +121 -0
- vllm/logprobs.py +208 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/layers/__init__.py +41 -0
- vllm/lora/layers/base.py +67 -0
- vllm/lora/layers/base_linear.py +164 -0
- vllm/lora/layers/column_parallel_linear.py +578 -0
- vllm/lora/layers/fused_moe.py +472 -0
- vllm/lora/layers/logits_processor.py +252 -0
- vllm/lora/layers/replicated_linear.py +70 -0
- vllm/lora/layers/row_parallel_linear.py +181 -0
- vllm/lora/layers/utils.py +65 -0
- vllm/lora/layers/vocal_parallel_embedding.py +166 -0
- vllm/lora/lora_weights.py +198 -0
- vllm/lora/models.py +890 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/ipex_ops/__init__.py +6 -0
- vllm/lora/ops/ipex_ops/lora_ops.py +57 -0
- vllm/lora/ops/torch_ops/__init__.py +20 -0
- vllm/lora/ops/torch_ops/lora_ops.py +128 -0
- vllm/lora/ops/triton_ops/README_TUNING.md +60 -0
- vllm/lora/ops/triton_ops/__init__.py +21 -0
- vllm/lora/ops/triton_ops/fused_moe_lora_op.py +641 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +340 -0
- vllm/lora/ops/triton_ops/lora_expand_op.py +310 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +154 -0
- vllm/lora/ops/triton_ops/lora_shrink_op.py +287 -0
- vllm/lora/ops/triton_ops/utils.py +295 -0
- vllm/lora/ops/xla_ops/__init__.py +6 -0
- vllm/lora/ops/xla_ops/lora_ops.py +141 -0
- vllm/lora/peft_helper.py +128 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +492 -0
- vllm/lora/punica_wrapper/punica_cpu.py +351 -0
- vllm/lora/punica_wrapper/punica_gpu.py +411 -0
- vllm/lora/punica_wrapper/punica_selector.py +21 -0
- vllm/lora/punica_wrapper/punica_tpu.py +359 -0
- vllm/lora/punica_wrapper/punica_xpu.py +279 -0
- vllm/lora/punica_wrapper/utils.py +150 -0
- vllm/lora/request.py +100 -0
- vllm/lora/resolver.py +88 -0
- vllm/lora/utils.py +293 -0
- vllm/lora/worker_manager.py +279 -0
- vllm/model_executor/__init__.py +11 -0
- vllm/model_executor/custom_op.py +194 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +569 -0
- vllm/model_executor/layers/attention_layer_base.py +35 -0
- vllm/model_executor/layers/batch_invariant.py +854 -0
- vllm/model_executor/layers/conv.py +236 -0
- vllm/model_executor/layers/fla/__init__.py +8 -0
- vllm/model_executor/layers/fla/ops/__init__.py +17 -0
- vllm/model_executor/layers/fla/ops/chunk.py +240 -0
- vllm/model_executor/layers/fla/ops/chunk_delta_h.py +344 -0
- vllm/model_executor/layers/fla/ops/chunk_o.py +183 -0
- vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +154 -0
- vllm/model_executor/layers/fla/ops/cumsum.py +280 -0
- vllm/model_executor/layers/fla/ops/fused_recurrent.py +390 -0
- vllm/model_executor/layers/fla/ops/index.py +41 -0
- vllm/model_executor/layers/fla/ops/kda.py +1351 -0
- vllm/model_executor/layers/fla/ops/l2norm.py +146 -0
- vllm/model_executor/layers/fla/ops/layernorm_guard.py +396 -0
- vllm/model_executor/layers/fla/ops/op.py +60 -0
- vllm/model_executor/layers/fla/ops/solve_tril.py +556 -0
- vllm/model_executor/layers/fla/ops/utils.py +194 -0
- vllm/model_executor/layers/fla/ops/wy_fast.py +158 -0
- vllm/model_executor/layers/fused_moe/__init__.py +106 -0
- vllm/model_executor/layers/fused_moe/all2all_utils.py +160 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +406 -0
- vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +180 -0
- vllm/model_executor/layers/fused_moe/config.py +916 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H100,dtype=fp8_w8a8.json +123 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=352,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +122 -0
- 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
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +114 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI308X.json +213 -0
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI300X.json +201 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=320,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI355_OAM,dtype=fp8_w8a8.json +164 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=256,N=384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- 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
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=40,N=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- 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
- 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
- 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
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=128,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H100_PCIe,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- 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
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/README +12 -0
- vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +354 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +1052 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +387 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +416 -0
- vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +420 -0
- vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +367 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +307 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +192 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +1012 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +792 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +2175 -0
- vllm/model_executor/layers/fused_moe/fused_moe_method_base.py +112 -0
- vllm/model_executor/layers/fused_moe/fused_moe_modular_method.py +164 -0
- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +316 -0
- vllm/model_executor/layers/fused_moe/layer.py +1944 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +1222 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +174 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +83 -0
- vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +229 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +77 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +265 -0
- vllm/model_executor/layers/fused_moe/routing_simulator.py +310 -0
- vllm/model_executor/layers/fused_moe/shared_fused_moe.py +97 -0
- vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +171 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +163 -0
- vllm/model_executor/layers/fused_moe/trtllm_moe.py +143 -0
- vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py +578 -0
- vllm/model_executor/layers/fused_moe/utils.py +332 -0
- vllm/model_executor/layers/kda.py +448 -0
- vllm/model_executor/layers/layernorm.py +442 -0
- vllm/model_executor/layers/lightning_attn.py +729 -0
- vllm/model_executor/layers/linear.py +1424 -0
- vllm/model_executor/layers/logits_processor.py +106 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/abstract.py +71 -0
- vllm/model_executor/layers/mamba/linear_attn.py +402 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +535 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +928 -0
- vllm/model_executor/layers/mamba/mamba_utils.py +225 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +1240 -0
- vllm/model_executor/layers/mamba/ops/layernorm_gated.py +172 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +478 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +211 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +456 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +700 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +230 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +157 -0
- vllm/model_executor/layers/mamba/short_conv.py +264 -0
- vllm/model_executor/layers/mla.py +168 -0
- vllm/model_executor/layers/pooler.py +817 -0
- vllm/model_executor/layers/quantization/__init__.py +174 -0
- vllm/model_executor/layers/quantization/auto_round.py +454 -0
- vllm/model_executor/layers/quantization/awq.py +277 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +659 -0
- vllm/model_executor/layers/quantization/awq_triton.py +337 -0
- vllm/model_executor/layers/quantization/base_config.py +170 -0
- vllm/model_executor/layers/quantization/bitblas.py +502 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +658 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +3 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +914 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2284 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +35 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +392 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +176 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +124 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +218 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +183 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +153 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +138 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +200 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +125 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +219 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +260 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +173 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/linear_qutlass_nvfp4.py +64 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +224 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +218 -0
- vllm/model_executor/layers/quantization/experts_int8.py +240 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +195 -0
- vllm/model_executor/layers/quantization/fp8.py +1333 -0
- vllm/model_executor/layers/quantization/fp_quant.py +420 -0
- vllm/model_executor/layers/quantization/gguf.py +643 -0
- vllm/model_executor/layers/quantization/gptq.py +393 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +482 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +789 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +320 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +371 -0
- vllm/model_executor/layers/quantization/inc.py +65 -0
- vllm/model_executor/layers/quantization/input_quant_fp8.py +171 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +467 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +94 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +105 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +115 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +323 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +98 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +119 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +111 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +161 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +159 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +166 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +73 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +97 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +120 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +219 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +140 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +42 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +105 -0
- vllm/model_executor/layers/quantization/kv_cache.py +146 -0
- vllm/model_executor/layers/quantization/modelopt.py +1788 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +541 -0
- vllm/model_executor/layers/quantization/mxfp4.py +1162 -0
- vllm/model_executor/layers/quantization/petit.py +320 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +137 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +528 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +683 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py +306 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +179 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +139 -0
- vllm/model_executor/layers/quantization/quark/utils.py +105 -0
- vllm/model_executor/layers/quantization/qutlass_utils.py +185 -0
- vllm/model_executor/layers/quantization/rtn.py +652 -0
- vllm/model_executor/layers/quantization/schema.py +90 -0
- vllm/model_executor/layers/quantization/torchao.py +380 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +139 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +67 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +229 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- vllm/model_executor/layers/quantization/utils/configs/README.md +3 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +89 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +298 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +1203 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +158 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +489 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +41 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +56 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +575 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +397 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +351 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +161 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +467 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +181 -0
- vllm/model_executor/layers/quantization/utils/mxfp6_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +24 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +63 -0
- vllm/model_executor/layers/quantization/utils/ocp_mx_utils.py +51 -0
- vllm/model_executor/layers/quantization/utils/petit_utils.py +124 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +687 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +516 -0
- vllm/model_executor/layers/resampler.py +283 -0
- vllm/model_executor/layers/rotary_embedding/__init__.py +278 -0
- vllm/model_executor/layers/rotary_embedding/base.py +235 -0
- vllm/model_executor/layers/rotary_embedding/common.py +188 -0
- vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +165 -0
- vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +215 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +43 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +68 -0
- vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +75 -0
- vllm/model_executor/layers/rotary_embedding/linear_scaling_rope.py +115 -0
- vllm/model_executor/layers/rotary_embedding/llama3_rope.py +54 -0
- vllm/model_executor/layers/rotary_embedding/llama4_vision_rope.py +80 -0
- vllm/model_executor/layers/rotary_embedding/mrope.py +397 -0
- vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +47 -0
- vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +159 -0
- vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +81 -0
- vllm/model_executor/layers/utils.py +251 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +558 -0
- vllm/model_executor/model_loader/__init__.py +148 -0
- vllm/model_executor/model_loader/base_loader.py +57 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +822 -0
- vllm/model_executor/model_loader/default_loader.py +327 -0
- vllm/model_executor/model_loader/dummy_loader.py +28 -0
- vllm/model_executor/model_loader/gguf_loader.py +176 -0
- vllm/model_executor/model_loader/online_quantization.py +224 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +116 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +206 -0
- vllm/model_executor/model_loader/tensorizer.py +790 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +151 -0
- vllm/model_executor/model_loader/tpu.py +118 -0
- vllm/model_executor/model_loader/utils.py +288 -0
- vllm/model_executor/model_loader/weight_utils.py +1084 -0
- vllm/model_executor/models/__init__.py +44 -0
- vllm/model_executor/models/adapters.py +543 -0
- vllm/model_executor/models/afmoe.py +711 -0
- vllm/model_executor/models/aimv2.py +247 -0
- vllm/model_executor/models/apertus.py +587 -0
- vllm/model_executor/models/arcee.py +439 -0
- vllm/model_executor/models/arctic.py +635 -0
- vllm/model_executor/models/aria.py +655 -0
- vllm/model_executor/models/aya_vision.py +450 -0
- vllm/model_executor/models/baichuan.py +496 -0
- vllm/model_executor/models/bailing_moe.py +646 -0
- vllm/model_executor/models/bamba.py +522 -0
- vllm/model_executor/models/bee.py +157 -0
- vllm/model_executor/models/bert.py +925 -0
- vllm/model_executor/models/bert_with_rope.py +732 -0
- vllm/model_executor/models/blip.py +349 -0
- vllm/model_executor/models/blip2.py +695 -0
- vllm/model_executor/models/bloom.py +390 -0
- vllm/model_executor/models/chameleon.py +1120 -0
- vllm/model_executor/models/chatglm.py +498 -0
- vllm/model_executor/models/clip.py +965 -0
- vllm/model_executor/models/cohere2_vision.py +472 -0
- vllm/model_executor/models/commandr.py +473 -0
- vllm/model_executor/models/config.py +503 -0
- vllm/model_executor/models/dbrx.py +482 -0
- vllm/model_executor/models/deepencoder.py +673 -0
- vllm/model_executor/models/deepseek_eagle.py +260 -0
- vllm/model_executor/models/deepseek_mtp.py +360 -0
- vllm/model_executor/models/deepseek_ocr.py +593 -0
- vllm/model_executor/models/deepseek_v2.py +1649 -0
- vllm/model_executor/models/deepseek_vl2.py +655 -0
- vllm/model_executor/models/dots1.py +574 -0
- vllm/model_executor/models/dots_ocr.py +900 -0
- vllm/model_executor/models/ernie45.py +53 -0
- vllm/model_executor/models/ernie45_moe.py +759 -0
- vllm/model_executor/models/ernie45_vl.py +1742 -0
- vllm/model_executor/models/ernie45_vl_moe.py +803 -0
- vllm/model_executor/models/ernie_mtp.py +279 -0
- vllm/model_executor/models/exaone.py +545 -0
- vllm/model_executor/models/exaone4.py +531 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +545 -0
- vllm/model_executor/models/falcon_h1.py +685 -0
- vllm/model_executor/models/flex_olmo.py +155 -0
- vllm/model_executor/models/fuyu.py +373 -0
- vllm/model_executor/models/gemma.py +426 -0
- vllm/model_executor/models/gemma2.py +439 -0
- vllm/model_executor/models/gemma3.py +571 -0
- vllm/model_executor/models/gemma3_mm.py +741 -0
- vllm/model_executor/models/gemma3n.py +1165 -0
- vllm/model_executor/models/gemma3n_mm.py +811 -0
- vllm/model_executor/models/glm.py +23 -0
- vllm/model_executor/models/glm4.py +305 -0
- vllm/model_executor/models/glm4_1v.py +1821 -0
- vllm/model_executor/models/glm4_moe.py +747 -0
- vllm/model_executor/models/glm4_moe_mtp.py +359 -0
- vllm/model_executor/models/glm4v.py +784 -0
- vllm/model_executor/models/gpt2.py +397 -0
- vllm/model_executor/models/gpt_bigcode.py +339 -0
- vllm/model_executor/models/gpt_j.py +346 -0
- vllm/model_executor/models/gpt_neox.py +344 -0
- vllm/model_executor/models/gpt_oss.py +738 -0
- vllm/model_executor/models/granite.py +516 -0
- vllm/model_executor/models/granite_speech.py +913 -0
- vllm/model_executor/models/granitemoe.py +569 -0
- vllm/model_executor/models/granitemoehybrid.py +709 -0
- vllm/model_executor/models/granitemoeshared.py +333 -0
- vllm/model_executor/models/gritlm.py +245 -0
- vllm/model_executor/models/grok1.py +558 -0
- vllm/model_executor/models/h2ovl.py +554 -0
- vllm/model_executor/models/hunyuan_v1.py +1053 -0
- vllm/model_executor/models/hyperclovax_vision.py +1166 -0
- vllm/model_executor/models/idefics2_vision_model.py +426 -0
- vllm/model_executor/models/idefics3.py +717 -0
- vllm/model_executor/models/interfaces.py +1092 -0
- vllm/model_executor/models/interfaces_base.py +214 -0
- vllm/model_executor/models/intern_vit.py +453 -0
- vllm/model_executor/models/internlm2.py +460 -0
- vllm/model_executor/models/internlm2_ve.py +142 -0
- vllm/model_executor/models/interns1.py +830 -0
- vllm/model_executor/models/interns1_vit.py +432 -0
- vllm/model_executor/models/internvl.py +1452 -0
- vllm/model_executor/models/jais.py +397 -0
- vllm/model_executor/models/jamba.py +610 -0
- vllm/model_executor/models/jina_vl.py +147 -0
- vllm/model_executor/models/keye.py +1761 -0
- vllm/model_executor/models/keye_vl1_5.py +726 -0
- vllm/model_executor/models/kimi_linear.py +663 -0
- vllm/model_executor/models/kimi_vl.py +578 -0
- vllm/model_executor/models/lfm2.py +532 -0
- vllm/model_executor/models/lfm2_moe.py +762 -0
- vllm/model_executor/models/lightonocr.py +195 -0
- vllm/model_executor/models/llama.py +732 -0
- vllm/model_executor/models/llama4.py +859 -0
- vllm/model_executor/models/llama4_eagle.py +223 -0
- vllm/model_executor/models/llama_eagle.py +218 -0
- vllm/model_executor/models/llama_eagle3.py +367 -0
- vllm/model_executor/models/llava.py +842 -0
- vllm/model_executor/models/llava_next.py +583 -0
- vllm/model_executor/models/llava_next_video.py +467 -0
- vllm/model_executor/models/llava_onevision.py +923 -0
- vllm/model_executor/models/longcat_flash.py +749 -0
- vllm/model_executor/models/longcat_flash_mtp.py +349 -0
- vllm/model_executor/models/mamba.py +276 -0
- vllm/model_executor/models/mamba2.py +289 -0
- vllm/model_executor/models/medusa.py +179 -0
- vllm/model_executor/models/midashenglm.py +827 -0
- vllm/model_executor/models/mimo.py +188 -0
- vllm/model_executor/models/mimo_mtp.py +294 -0
- vllm/model_executor/models/minicpm.py +664 -0
- vllm/model_executor/models/minicpm3.py +242 -0
- vllm/model_executor/models/minicpm_eagle.py +389 -0
- vllm/model_executor/models/minicpmo.py +768 -0
- vllm/model_executor/models/minicpmv.py +1745 -0
- vllm/model_executor/models/minimax_m2.py +552 -0
- vllm/model_executor/models/minimax_text_01.py +1012 -0
- vllm/model_executor/models/minimax_vl_01.py +396 -0
- vllm/model_executor/models/mistral3.py +637 -0
- vllm/model_executor/models/mixtral.py +621 -0
- vllm/model_executor/models/mllama4.py +1147 -0
- vllm/model_executor/models/mlp_speculator.py +235 -0
- vllm/model_executor/models/modernbert.py +450 -0
- vllm/model_executor/models/module_mapping.py +74 -0
- vllm/model_executor/models/molmo.py +1555 -0
- vllm/model_executor/models/moonvit.py +677 -0
- vllm/model_executor/models/mpt.py +335 -0
- vllm/model_executor/models/nano_nemotron_vl.py +1740 -0
- vllm/model_executor/models/nemotron.py +518 -0
- vllm/model_executor/models/nemotron_h.py +852 -0
- vllm/model_executor/models/nemotron_nas.py +491 -0
- vllm/model_executor/models/nemotron_vl.py +653 -0
- vllm/model_executor/models/nvlm_d.py +216 -0
- vllm/model_executor/models/olmo.py +414 -0
- vllm/model_executor/models/olmo2.py +454 -0
- vllm/model_executor/models/olmoe.py +498 -0
- vllm/model_executor/models/openpangu.py +1062 -0
- vllm/model_executor/models/openpangu_mtp.py +265 -0
- vllm/model_executor/models/opt.py +426 -0
- vllm/model_executor/models/orion.py +372 -0
- vllm/model_executor/models/ouro.py +516 -0
- vllm/model_executor/models/ovis.py +559 -0
- vllm/model_executor/models/ovis2_5.py +673 -0
- vllm/model_executor/models/paddleocr_vl.py +1407 -0
- vllm/model_executor/models/paligemma.py +412 -0
- vllm/model_executor/models/persimmon.py +377 -0
- vllm/model_executor/models/phi.py +374 -0
- vllm/model_executor/models/phi3.py +18 -0
- vllm/model_executor/models/phi3v.py +737 -0
- vllm/model_executor/models/phi4_multimodal.py +1447 -0
- vllm/model_executor/models/phi4mm.py +1253 -0
- vllm/model_executor/models/phi4mm_audio.py +1296 -0
- vllm/model_executor/models/phi4mm_utils.py +1907 -0
- vllm/model_executor/models/phimoe.py +675 -0
- vllm/model_executor/models/pixtral.py +1352 -0
- vllm/model_executor/models/plamo2.py +981 -0
- vllm/model_executor/models/qwen.py +368 -0
- vllm/model_executor/models/qwen2.py +541 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +1246 -0
- vllm/model_executor/models/qwen2_5_vl.py +1613 -0
- vllm/model_executor/models/qwen2_audio.py +473 -0
- vllm/model_executor/models/qwen2_moe.py +596 -0
- vllm/model_executor/models/qwen2_rm.py +123 -0
- vllm/model_executor/models/qwen2_vl.py +1670 -0
- vllm/model_executor/models/qwen3.py +336 -0
- vllm/model_executor/models/qwen3_moe.py +744 -0
- vllm/model_executor/models/qwen3_next.py +1395 -0
- vllm/model_executor/models/qwen3_next_mtp.py +296 -0
- vllm/model_executor/models/qwen3_omni_moe_thinker.py +1721 -0
- vllm/model_executor/models/qwen3_vl.py +1673 -0
- vllm/model_executor/models/qwen3_vl_moe.py +415 -0
- vllm/model_executor/models/qwen_vl.py +802 -0
- vllm/model_executor/models/radio.py +555 -0
- vllm/model_executor/models/registry.py +1155 -0
- vllm/model_executor/models/roberta.py +259 -0
- vllm/model_executor/models/rvl.py +107 -0
- vllm/model_executor/models/seed_oss.py +497 -0
- vllm/model_executor/models/siglip.py +1174 -0
- vllm/model_executor/models/siglip2navit.py +724 -0
- vllm/model_executor/models/skyworkr1v.py +953 -0
- vllm/model_executor/models/smolvlm.py +38 -0
- vllm/model_executor/models/solar.py +502 -0
- vllm/model_executor/models/stablelm.py +359 -0
- vllm/model_executor/models/starcoder2.py +367 -0
- vllm/model_executor/models/step3_text.py +559 -0
- vllm/model_executor/models/step3_vl.py +1148 -0
- vllm/model_executor/models/swin.py +514 -0
- vllm/model_executor/models/tarsier.py +619 -0
- vllm/model_executor/models/telechat2.py +153 -0
- vllm/model_executor/models/teleflm.py +78 -0
- vllm/model_executor/models/terratorch.py +319 -0
- vllm/model_executor/models/transformers/__init__.py +127 -0
- vllm/model_executor/models/transformers/base.py +464 -0
- vllm/model_executor/models/transformers/causal.py +65 -0
- vllm/model_executor/models/transformers/legacy.py +90 -0
- vllm/model_executor/models/transformers/moe.py +318 -0
- vllm/model_executor/models/transformers/multimodal.py +411 -0
- vllm/model_executor/models/transformers/pooling.py +119 -0
- vllm/model_executor/models/transformers/utils.py +207 -0
- vllm/model_executor/models/ultravox.py +681 -0
- vllm/model_executor/models/utils.py +877 -0
- vllm/model_executor/models/vision.py +552 -0
- vllm/model_executor/models/voxtral.py +845 -0
- vllm/model_executor/models/whisper.py +959 -0
- vllm/model_executor/models/zamba2.py +986 -0
- vllm/model_executor/parameter.py +642 -0
- vllm/model_executor/utils.py +94 -0
- vllm/model_executor/warmup/__init__.py +0 -0
- vllm/model_executor/warmup/deep_gemm_warmup.py +314 -0
- vllm/model_executor/warmup/kernel_warmup.py +98 -0
- vllm/multimodal/__init__.py +40 -0
- vllm/multimodal/audio.py +118 -0
- vllm/multimodal/base.py +26 -0
- vllm/multimodal/cache.py +755 -0
- vllm/multimodal/evs.py +294 -0
- vllm/multimodal/hasher.py +106 -0
- vllm/multimodal/image.py +130 -0
- vllm/multimodal/inputs.py +1036 -0
- vllm/multimodal/parse.py +544 -0
- vllm/multimodal/processing.py +2186 -0
- vllm/multimodal/profiling.py +369 -0
- vllm/multimodal/registry.py +360 -0
- vllm/multimodal/utils.py +512 -0
- vllm/multimodal/video.py +306 -0
- vllm/outputs.py +345 -0
- vllm/platforms/__init__.py +277 -0
- vllm/platforms/cpu.py +414 -0
- vllm/platforms/cuda.py +657 -0
- vllm/platforms/interface.py +639 -0
- vllm/platforms/rocm.py +466 -0
- vllm/platforms/tpu.py +276 -0
- vllm/platforms/xpu.py +274 -0
- vllm/plugins/__init__.py +78 -0
- vllm/plugins/io_processors/__init__.py +68 -0
- vllm/plugins/io_processors/interface.py +77 -0
- vllm/plugins/lora_resolvers/__init__.py +0 -0
- vllm/plugins/lora_resolvers/filesystem_resolver.py +52 -0
- vllm/pooling_params.py +228 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/gpu_profiler.py +37 -0
- vllm/profiler/layerwise_profile.py +392 -0
- vllm/profiler/utils.py +151 -0
- vllm/py.typed +2 -0
- vllm/ray/__init__.py +0 -0
- vllm/ray/lazy_utils.py +26 -0
- vllm/ray/ray_env.py +79 -0
- vllm/reasoning/__init__.py +92 -0
- vllm/reasoning/abs_reasoning_parsers.py +290 -0
- vllm/reasoning/basic_parsers.py +162 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
- vllm/reasoning/deepseek_v3_reasoning_parser.py +62 -0
- vllm/reasoning/ernie45_reasoning_parser.py +165 -0
- vllm/reasoning/glm4_moe_reasoning_parser.py +171 -0
- vllm/reasoning/gptoss_reasoning_parser.py +173 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/hunyuan_a13b_reasoning_parser.py +237 -0
- vllm/reasoning/identity_reasoning_parser.py +58 -0
- vllm/reasoning/minimax_m2_reasoning_parser.py +67 -0
- vllm/reasoning/mistral_reasoning_parser.py +55 -0
- vllm/reasoning/olmo3_reasoning_parser.py +302 -0
- vllm/reasoning/qwen3_reasoning_parser.py +67 -0
- vllm/reasoning/seedoss_reasoning_parser.py +27 -0
- vllm/reasoning/step3_reasoning_parser.py +107 -0
- vllm/sampling_params.py +669 -0
- vllm/scalar_type.py +355 -0
- vllm/scripts.py +17 -0
- vllm/sequence.py +98 -0
- vllm/tasks.py +13 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tracing.py +135 -0
- vllm/transformers_utils/__init__.py +26 -0
- vllm/transformers_utils/chat_templates/__init__.py +5 -0
- vllm/transformers_utils/chat_templates/registry.py +73 -0
- vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
- vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
- vllm/transformers_utils/chat_templates/template_deepseek_ocr.jinja +14 -0
- vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
- vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
- vllm/transformers_utils/config.py +1203 -0
- vllm/transformers_utils/config_parser_base.py +20 -0
- vllm/transformers_utils/configs/__init__.py +70 -0
- vllm/transformers_utils/configs/afmoe.py +84 -0
- vllm/transformers_utils/configs/arctic.py +206 -0
- vllm/transformers_utils/configs/chatglm.py +75 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +126 -0
- vllm/transformers_utils/configs/dotsocr.py +71 -0
- vllm/transformers_utils/configs/eagle.py +84 -0
- vllm/transformers_utils/configs/falcon.py +89 -0
- vllm/transformers_utils/configs/flex_olmo.py +77 -0
- vllm/transformers_utils/configs/jais.py +243 -0
- vllm/transformers_utils/configs/kimi_linear.py +144 -0
- vllm/transformers_utils/configs/kimi_vl.py +38 -0
- vllm/transformers_utils/configs/lfm2_moe.py +159 -0
- vllm/transformers_utils/configs/medusa.py +65 -0
- vllm/transformers_utils/configs/midashenglm.py +103 -0
- vllm/transformers_utils/configs/mistral.py +174 -0
- vllm/transformers_utils/configs/mlp_speculator.py +69 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/nemotron.py +212 -0
- vllm/transformers_utils/configs/nemotron_h.py +282 -0
- vllm/transformers_utils/configs/olmo3.py +79 -0
- vllm/transformers_utils/configs/ovis.py +182 -0
- vllm/transformers_utils/configs/qwen3_next.py +274 -0
- vllm/transformers_utils/configs/radio.py +89 -0
- vllm/transformers_utils/configs/speculators/__init__.py +2 -0
- vllm/transformers_utils/configs/speculators/algos.py +38 -0
- vllm/transformers_utils/configs/speculators/base.py +114 -0
- vllm/transformers_utils/configs/step3_vl.py +174 -0
- vllm/transformers_utils/configs/ultravox.py +118 -0
- vllm/transformers_utils/detokenizer_utils.py +198 -0
- vllm/transformers_utils/dynamic_module.py +59 -0
- vllm/transformers_utils/processor.py +402 -0
- vllm/transformers_utils/processors/__init__.py +15 -0
- vllm/transformers_utils/processors/deepseek_ocr.py +438 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +406 -0
- vllm/transformers_utils/processors/ovis.py +453 -0
- vllm/transformers_utils/processors/ovis2_5.py +468 -0
- vllm/transformers_utils/runai_utils.py +104 -0
- vllm/transformers_utils/s3_utils.py +95 -0
- vllm/transformers_utils/tokenizer.py +293 -0
- vllm/transformers_utils/tokenizer_base.py +155 -0
- vllm/transformers_utils/tokenizers/__init__.py +16 -0
- vllm/transformers_utils/tokenizers/mistral.py +502 -0
- vllm/transformers_utils/utils.py +130 -0
- vllm/triton_utils/__init__.py +19 -0
- vllm/triton_utils/importing.py +103 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +294 -0
- vllm/utils/__init__.py +82 -0
- vllm/utils/argparse_utils.py +487 -0
- vllm/utils/async_utils.py +303 -0
- vllm/utils/cache.py +214 -0
- vllm/utils/collection_utils.py +139 -0
- vllm/utils/counter.py +45 -0
- vllm/utils/deep_gemm.py +391 -0
- vllm/utils/flashinfer.py +490 -0
- vllm/utils/func_utils.py +236 -0
- vllm/utils/gc_utils.py +147 -0
- vllm/utils/hashing.py +63 -0
- vllm/utils/import_utils.py +411 -0
- vllm/utils/jsontree.py +165 -0
- vllm/utils/math_utils.py +32 -0
- vllm/utils/mem_constants.py +13 -0
- vllm/utils/mem_utils.py +232 -0
- vllm/utils/nccl.py +64 -0
- vllm/utils/network_utils.py +331 -0
- vllm/utils/platform_utils.py +59 -0
- vllm/utils/profiling.py +56 -0
- vllm/utils/registry.py +49 -0
- vllm/utils/serial_utils.py +169 -0
- vllm/utils/system_utils.py +229 -0
- vllm/utils/tensor_schema.py +255 -0
- vllm/utils/torch_utils.py +657 -0
- vllm/v1/__init__.py +0 -0
- vllm/v1/attention/__init__.py +0 -0
- vllm/v1/attention/backends/__init__.py +0 -0
- vllm/v1/attention/backends/cpu_attn.py +496 -0
- vllm/v1/attention/backends/flash_attn.py +1028 -0
- vllm/v1/attention/backends/flashinfer.py +1572 -0
- vllm/v1/attention/backends/flex_attention.py +926 -0
- vllm/v1/attention/backends/gdn_attn.py +387 -0
- vllm/v1/attention/backends/linear_attn.py +74 -0
- vllm/v1/attention/backends/mamba1_attn.py +165 -0
- vllm/v1/attention/backends/mamba2_attn.py +354 -0
- vllm/v1/attention/backends/mamba_attn.py +115 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/common.py +2031 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +275 -0
- vllm/v1/attention/backends/mla/flashattn_mla.py +337 -0
- vllm/v1/attention/backends/mla/flashinfer_mla.py +171 -0
- vllm/v1/attention/backends/mla/flashmla.py +314 -0
- vllm/v1/attention/backends/mla/flashmla_sparse.py +548 -0
- vllm/v1/attention/backends/mla/indexer.py +362 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +294 -0
- vllm/v1/attention/backends/mla/triton_mla.py +171 -0
- vllm/v1/attention/backends/pallas.py +436 -0
- vllm/v1/attention/backends/rocm_aiter_fa.py +816 -0
- vllm/v1/attention/backends/rocm_aiter_unified_attn.py +196 -0
- vllm/v1/attention/backends/rocm_attn.py +362 -0
- vllm/v1/attention/backends/short_conv_attn.py +105 -0
- vllm/v1/attention/backends/tree_attn.py +425 -0
- vllm/v1/attention/backends/triton_attn.py +373 -0
- vllm/v1/attention/backends/utils.py +1116 -0
- vllm/v1/attention/backends/xformers.py +417 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +428 -0
- vllm/v1/core/encoder_cache_manager.py +343 -0
- vllm/v1/core/kv_cache_coordinator.py +480 -0
- vllm/v1/core/kv_cache_manager.py +420 -0
- vllm/v1/core/kv_cache_utils.py +1340 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/async_scheduler.py +62 -0
- vllm/v1/core/sched/interface.py +181 -0
- vllm/v1/core/sched/output.py +202 -0
- vllm/v1/core/sched/request_queue.py +221 -0
- vllm/v1/core/sched/scheduler.py +1617 -0
- vllm/v1/core/sched/utils.py +72 -0
- vllm/v1/core/single_type_kv_cache_manager.py +736 -0
- vllm/v1/cudagraph_dispatcher.py +148 -0
- vllm/v1/engine/__init__.py +206 -0
- vllm/v1/engine/async_llm.py +797 -0
- vllm/v1/engine/coordinator.py +377 -0
- vllm/v1/engine/core.py +1420 -0
- vllm/v1/engine/core_client.py +1400 -0
- vllm/v1/engine/detokenizer.py +351 -0
- vllm/v1/engine/exceptions.py +18 -0
- vllm/v1/engine/llm_engine.py +408 -0
- vllm/v1/engine/logprobs.py +182 -0
- vllm/v1/engine/output_processor.py +642 -0
- vllm/v1/engine/parallel_sampling.py +145 -0
- vllm/v1/engine/processor.py +621 -0
- vllm/v1/engine/utils.py +1072 -0
- vllm/v1/executor/__init__.py +6 -0
- vllm/v1/executor/abstract.py +352 -0
- vllm/v1/executor/multiproc_executor.py +877 -0
- vllm/v1/executor/ray_distributed_executor.py +8 -0
- vllm/v1/executor/ray_executor.py +626 -0
- vllm/v1/executor/ray_utils.py +465 -0
- vllm/v1/executor/uniproc_executor.py +183 -0
- vllm/v1/kv_cache_interface.py +403 -0
- vllm/v1/kv_offload/__init__.py +0 -0
- vllm/v1/kv_offload/abstract.py +161 -0
- vllm/v1/kv_offload/arc_manager.py +237 -0
- vllm/v1/kv_offload/backend.py +97 -0
- vllm/v1/kv_offload/backends/__init__.py +0 -0
- vllm/v1/kv_offload/backends/cpu.py +62 -0
- vllm/v1/kv_offload/cpu.py +93 -0
- vllm/v1/kv_offload/factory.py +56 -0
- vllm/v1/kv_offload/lru_manager.py +139 -0
- vllm/v1/kv_offload/mediums.py +39 -0
- vllm/v1/kv_offload/spec.py +62 -0
- vllm/v1/kv_offload/worker/__init__.py +0 -0
- vllm/v1/kv_offload/worker/cpu_gpu.py +185 -0
- vllm/v1/kv_offload/worker/worker.py +144 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +1238 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +169 -0
- vllm/v1/metrics/reader.py +257 -0
- vllm/v1/metrics/stats.py +420 -0
- vllm/v1/outputs.py +249 -0
- vllm/v1/pool/__init__.py +0 -0
- vllm/v1/pool/metadata.py +82 -0
- vllm/v1/request.py +259 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/logits_processor/__init__.py +352 -0
- vllm/v1/sample/logits_processor/builtin.py +274 -0
- vllm/v1/sample/logits_processor/interface.py +106 -0
- vllm/v1/sample/logits_processor/state.py +165 -0
- vllm/v1/sample/metadata.py +44 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +52 -0
- vllm/v1/sample/ops/logprobs.py +25 -0
- vllm/v1/sample/ops/penalties.py +57 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +290 -0
- vllm/v1/sample/rejection_sampler.py +793 -0
- vllm/v1/sample/sampler.py +316 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +120 -0
- vllm/v1/sample/tpu/sampler.py +215 -0
- vllm/v1/serial_utils.py +532 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +1225 -0
- vllm/v1/spec_decode/medusa.py +73 -0
- vllm/v1/spec_decode/metadata.py +66 -0
- vllm/v1/spec_decode/metrics.py +224 -0
- vllm/v1/spec_decode/ngram_proposer.py +291 -0
- vllm/v1/spec_decode/suffix_decoding.py +103 -0
- vllm/v1/spec_decode/utils.py +16 -0
- vllm/v1/structured_output/__init__.py +338 -0
- vllm/v1/structured_output/backend_guidance.py +265 -0
- vllm/v1/structured_output/backend_lm_format_enforcer.py +177 -0
- vllm/v1/structured_output/backend_outlines.py +324 -0
- vllm/v1/structured_output/backend_types.py +136 -0
- vllm/v1/structured_output/backend_xgrammar.py +362 -0
- vllm/v1/structured_output/request.py +94 -0
- vllm/v1/structured_output/utils.py +469 -0
- vllm/v1/utils.py +414 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +327 -0
- vllm/v1/worker/cpu_model_runner.py +122 -0
- vllm/v1/worker/cpu_worker.py +206 -0
- vllm/v1/worker/dp_utils.py +230 -0
- vllm/v1/worker/ec_connector_model_runner_mixin.py +87 -0
- vllm/v1/worker/gpu_input_batch.py +975 -0
- vllm/v1/worker/gpu_model_runner.py +5102 -0
- vllm/v1/worker/gpu_ubatch_wrapper.py +466 -0
- vllm/v1/worker/gpu_worker.py +894 -0
- vllm/v1/worker/kv_connector_model_runner_mixin.py +144 -0
- vllm/v1/worker/lora_model_runner_mixin.py +213 -0
- vllm/v1/worker/tpu_input_batch.py +593 -0
- vllm/v1/worker/tpu_model_runner.py +2173 -0
- vllm/v1/worker/tpu_worker.py +355 -0
- vllm/v1/worker/ubatch_utils.py +73 -0
- vllm/v1/worker/ubatching.py +231 -0
- vllm/v1/worker/utils.py +366 -0
- vllm/v1/worker/worker_base.py +375 -0
- vllm/v1/worker/xpu_model_runner.py +55 -0
- vllm/v1/worker/xpu_worker.py +189 -0
- vllm/version.py +39 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/METADATA +345 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/RECORD +1536 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/WHEEL +5 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/entry_points.txt +5 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1333 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from enum import Enum
|
|
6
|
+
from functools import partial
|
|
7
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
8
|
+
|
|
9
|
+
import torch
|
|
10
|
+
from torch.nn import Module
|
|
11
|
+
from torch.nn.parameter import Parameter
|
|
12
|
+
|
|
13
|
+
import vllm.envs as envs
|
|
14
|
+
import vllm.model_executor.layers.fused_moe.modular_kernel as mk
|
|
15
|
+
from vllm import _custom_ops as ops
|
|
16
|
+
from vllm._aiter_ops import rocm_aiter_ops
|
|
17
|
+
from vllm.distributed import get_tensor_model_parallel_world_size
|
|
18
|
+
from vllm.logger import init_logger
|
|
19
|
+
from vllm.model_executor.layers.batch_invariant import (
|
|
20
|
+
vllm_is_batch_invariant,
|
|
21
|
+
)
|
|
22
|
+
from vllm.model_executor.layers.fused_moe import (
|
|
23
|
+
FusedMoE,
|
|
24
|
+
FusedMoEActivationFormat,
|
|
25
|
+
FusedMoEMethodBase,
|
|
26
|
+
FusedMoEPermuteExpertsUnpermute,
|
|
27
|
+
FusedMoEPrepareAndFinalize,
|
|
28
|
+
FusedMoeWeightScaleSupported,
|
|
29
|
+
)
|
|
30
|
+
from vllm.model_executor.layers.fused_moe.config import (
|
|
31
|
+
FusedMoEQuantConfig,
|
|
32
|
+
RoutingMethodType,
|
|
33
|
+
fp8_w8a8_moe_quant_config,
|
|
34
|
+
)
|
|
35
|
+
from vllm.model_executor.layers.fused_moe.fused_marlin_moe import fused_marlin_moe
|
|
36
|
+
from vllm.model_executor.layers.fused_moe.layer import UnquantizedFusedMoEMethod
|
|
37
|
+
from vllm.model_executor.layers.linear import (
|
|
38
|
+
LinearBase,
|
|
39
|
+
LinearMethodBase,
|
|
40
|
+
UnquantizedLinearMethod,
|
|
41
|
+
)
|
|
42
|
+
from vllm.model_executor.layers.quantization import QuantizationMethods
|
|
43
|
+
from vllm.model_executor.layers.quantization.base_config import (
|
|
44
|
+
QuantizationConfig,
|
|
45
|
+
QuantizeMethodBase,
|
|
46
|
+
)
|
|
47
|
+
from vllm.model_executor.layers.quantization.kv_cache import BaseKVCacheMethod
|
|
48
|
+
from vllm.model_executor.layers.quantization.utils.flashinfer_utils import (
|
|
49
|
+
FlashinferMoeBackend,
|
|
50
|
+
apply_flashinfer_per_tensor_scale_fp8,
|
|
51
|
+
build_flashinfer_fp8_cutlass_moe_prepare_finalize,
|
|
52
|
+
flashinfer_cutlass_moe_fp8,
|
|
53
|
+
get_flashinfer_moe_backend,
|
|
54
|
+
register_moe_scaling_factors,
|
|
55
|
+
rotate_flashinfer_fp8_moe_weights,
|
|
56
|
+
select_cutlass_fp8_gemm_impl,
|
|
57
|
+
swap_w13_to_w31,
|
|
58
|
+
)
|
|
59
|
+
from vllm.model_executor.layers.quantization.utils.fp8_utils import (
|
|
60
|
+
W8A8BlockFp8LinearOp,
|
|
61
|
+
create_fp8_input_scale,
|
|
62
|
+
create_fp8_scale_parameter,
|
|
63
|
+
create_fp8_weight_parameter,
|
|
64
|
+
deepgemm_post_process_fp8_weight_block,
|
|
65
|
+
maybe_post_process_fp8_weight_block,
|
|
66
|
+
process_fp8_weight_block_strategy,
|
|
67
|
+
process_fp8_weight_tensor_strategy,
|
|
68
|
+
validate_fp8_block_shape,
|
|
69
|
+
)
|
|
70
|
+
from vllm.model_executor.layers.quantization.utils.marlin_utils_fp8 import (
|
|
71
|
+
apply_fp8_marlin_linear,
|
|
72
|
+
prepare_fp8_layer_for_marlin,
|
|
73
|
+
prepare_moe_fp8_layer_for_marlin,
|
|
74
|
+
)
|
|
75
|
+
from vllm.model_executor.layers.quantization.utils.quant_utils import (
|
|
76
|
+
GroupShape,
|
|
77
|
+
is_layer_skipped,
|
|
78
|
+
)
|
|
79
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
80
|
+
Fp8LinearOp,
|
|
81
|
+
all_close_1d,
|
|
82
|
+
cutlass_block_fp8_supported,
|
|
83
|
+
cutlass_fp8_supported,
|
|
84
|
+
maybe_create_device_identity,
|
|
85
|
+
normalize_e4m3fn_to_e4m3fnuz,
|
|
86
|
+
per_tensor_dequantize,
|
|
87
|
+
)
|
|
88
|
+
from vllm.model_executor.parameter import (
|
|
89
|
+
BlockQuantScaleParameter,
|
|
90
|
+
ModelWeightParameter,
|
|
91
|
+
PerTensorScaleParameter,
|
|
92
|
+
)
|
|
93
|
+
from vllm.model_executor.utils import set_weight_attrs
|
|
94
|
+
from vllm.platforms import current_platform
|
|
95
|
+
from vllm.scalar_type import scalar_types
|
|
96
|
+
from vllm.utils.deep_gemm import (
|
|
97
|
+
is_deep_gemm_e8m0_used,
|
|
98
|
+
is_deep_gemm_supported,
|
|
99
|
+
)
|
|
100
|
+
from vllm.utils.flashinfer import has_flashinfer_moe
|
|
101
|
+
from vllm.utils.import_utils import has_deep_gemm
|
|
102
|
+
|
|
103
|
+
if TYPE_CHECKING:
|
|
104
|
+
from vllm.model_executor.models.utils import WeightsMapper
|
|
105
|
+
|
|
106
|
+
ACTIVATION_SCHEMES = ["static", "dynamic"]
|
|
107
|
+
|
|
108
|
+
logger = init_logger(__name__)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class Fp8MoeBackend(Enum):
|
|
112
|
+
NONE = 0
|
|
113
|
+
FLASHINFER_TRTLLM = 1
|
|
114
|
+
FLASHINFER_CUTLASS = 2
|
|
115
|
+
DEEPGEMM = 3
|
|
116
|
+
CUTLASS_BLOCK_SCALED_GROUPED_GEMM = 4
|
|
117
|
+
MARLIN = 5
|
|
118
|
+
TRITON = 6
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def get_fp8_moe_backend(block_quant: bool) -> Fp8MoeBackend:
|
|
122
|
+
"""
|
|
123
|
+
Select the primary FP8 MoE backend
|
|
124
|
+
Note: Shape-specific fallbacks may still occur at runtime.
|
|
125
|
+
"""
|
|
126
|
+
# Prefer FlashInfer backends on supported GPUs; allow SM90 and SM100.
|
|
127
|
+
if (
|
|
128
|
+
current_platform.is_cuda()
|
|
129
|
+
and (
|
|
130
|
+
current_platform.is_device_capability(100)
|
|
131
|
+
or current_platform.is_device_capability(90)
|
|
132
|
+
)
|
|
133
|
+
and envs.VLLM_USE_FLASHINFER_MOE_FP8
|
|
134
|
+
and has_flashinfer_moe()
|
|
135
|
+
):
|
|
136
|
+
backend = get_flashinfer_moe_backend()
|
|
137
|
+
if backend == FlashinferMoeBackend.TENSORRT_LLM:
|
|
138
|
+
logger.info_once("Using FlashInfer FP8 MoE TRTLLM backend for SM100")
|
|
139
|
+
return Fp8MoeBackend.FLASHINFER_TRTLLM
|
|
140
|
+
else:
|
|
141
|
+
if block_quant and current_platform.is_device_capability(100):
|
|
142
|
+
raise ValueError(
|
|
143
|
+
"FlashInfer FP8 MoE throughput backend does not "
|
|
144
|
+
"support block quantization. Please use "
|
|
145
|
+
"VLLM_FLASHINFER_MOE_BACKEND=latency "
|
|
146
|
+
"instead."
|
|
147
|
+
)
|
|
148
|
+
logger.info_once("Using FlashInfer FP8 MoE CUTLASS backend for SM90/SM100")
|
|
149
|
+
return Fp8MoeBackend.FLASHINFER_CUTLASS
|
|
150
|
+
|
|
151
|
+
# weight-only path for older GPUs without native FP8
|
|
152
|
+
use_marlin = (
|
|
153
|
+
not current_platform.has_device_capability(89)
|
|
154
|
+
or envs.VLLM_TEST_FORCE_FP8_MARLIN
|
|
155
|
+
)
|
|
156
|
+
if current_platform.is_rocm():
|
|
157
|
+
use_marlin = False
|
|
158
|
+
if use_marlin:
|
|
159
|
+
logger.info_once("Using Marlin backend for FP8 MoE")
|
|
160
|
+
return Fp8MoeBackend.MARLIN
|
|
161
|
+
|
|
162
|
+
# deepGEMM on supported platforms with block-quantized weights
|
|
163
|
+
if envs.VLLM_USE_DEEP_GEMM and envs.VLLM_MOE_USE_DEEP_GEMM and block_quant:
|
|
164
|
+
if not has_deep_gemm():
|
|
165
|
+
logger.warning_once("DeepGEMM backend requested but not available.")
|
|
166
|
+
elif is_deep_gemm_supported():
|
|
167
|
+
logger.info_once("Using DeepGEMM backend for FP8 MoE")
|
|
168
|
+
return Fp8MoeBackend.DEEPGEMM
|
|
169
|
+
|
|
170
|
+
# CUTLASS BlockScaled GroupedGemm on SM100 with block-quantized weights
|
|
171
|
+
if (
|
|
172
|
+
current_platform.is_cuda()
|
|
173
|
+
and current_platform.is_device_capability(100)
|
|
174
|
+
and block_quant
|
|
175
|
+
):
|
|
176
|
+
logger.info_once("Using Cutlass BlockScaled GroupedGemm backend for FP8 MoE")
|
|
177
|
+
return Fp8MoeBackend.CUTLASS_BLOCK_SCALED_GROUPED_GEMM
|
|
178
|
+
|
|
179
|
+
# default to Triton
|
|
180
|
+
logger.info_once("Using Triton backend for FP8 MoE")
|
|
181
|
+
return Fp8MoeBackend.TRITON
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class Fp8Config(QuantizationConfig):
|
|
185
|
+
"""Config class for FP8."""
|
|
186
|
+
|
|
187
|
+
def __init__(
|
|
188
|
+
self,
|
|
189
|
+
is_checkpoint_fp8_serialized: bool = False,
|
|
190
|
+
activation_scheme: str = "dynamic",
|
|
191
|
+
ignored_layers: list[str] | None = None,
|
|
192
|
+
weight_block_size: list[int] | None = None,
|
|
193
|
+
) -> None:
|
|
194
|
+
super().__init__()
|
|
195
|
+
|
|
196
|
+
self.is_checkpoint_fp8_serialized = is_checkpoint_fp8_serialized
|
|
197
|
+
|
|
198
|
+
if activation_scheme not in ACTIVATION_SCHEMES:
|
|
199
|
+
raise ValueError(f"Unsupported activation scheme {activation_scheme}")
|
|
200
|
+
self.activation_scheme = activation_scheme
|
|
201
|
+
self.ignored_layers = ignored_layers or []
|
|
202
|
+
if weight_block_size is not None:
|
|
203
|
+
if not is_checkpoint_fp8_serialized:
|
|
204
|
+
raise ValueError(
|
|
205
|
+
"The block-wise quantization only supports fp8-serialized "
|
|
206
|
+
"checkpoint for now."
|
|
207
|
+
)
|
|
208
|
+
if len(weight_block_size) != 2:
|
|
209
|
+
raise ValueError(
|
|
210
|
+
"The quantization block size of weight must have 2 "
|
|
211
|
+
f"dimensions, but got {len(weight_block_size)} dimensions"
|
|
212
|
+
)
|
|
213
|
+
if activation_scheme != "dynamic":
|
|
214
|
+
raise ValueError(
|
|
215
|
+
"The block-wise quantization only supports "
|
|
216
|
+
"dynamic activation scheme for now, but got "
|
|
217
|
+
f"{activation_scheme} activation scheme."
|
|
218
|
+
)
|
|
219
|
+
self.weight_block_size = weight_block_size
|
|
220
|
+
|
|
221
|
+
@classmethod
|
|
222
|
+
def get_name(cls) -> QuantizationMethods:
|
|
223
|
+
return "fp8"
|
|
224
|
+
|
|
225
|
+
@classmethod
|
|
226
|
+
def get_supported_act_dtypes(cls) -> list[torch.dtype]:
|
|
227
|
+
return [torch.bfloat16, torch.half]
|
|
228
|
+
|
|
229
|
+
@classmethod
|
|
230
|
+
def get_min_capability(cls) -> int:
|
|
231
|
+
return 80
|
|
232
|
+
|
|
233
|
+
@classmethod
|
|
234
|
+
def get_config_filenames(cls) -> list[str]:
|
|
235
|
+
return []
|
|
236
|
+
|
|
237
|
+
def apply_vllm_mapper(self, hf_to_vllm_mapper: "WeightsMapper"):
|
|
238
|
+
if self.ignored_layers is not None:
|
|
239
|
+
self.ignored_layers = hf_to_vllm_mapper.apply_list(self.ignored_layers)
|
|
240
|
+
|
|
241
|
+
@classmethod
|
|
242
|
+
def from_config(cls, config: dict[str, Any]) -> "Fp8Config":
|
|
243
|
+
quant_method = cls.get_from_keys(config, ["quant_method"])
|
|
244
|
+
is_checkpoint_fp8_serialized = "fp8" in quant_method
|
|
245
|
+
activation_scheme = cls.get_from_keys(config, ["activation_scheme"])
|
|
246
|
+
ignored_layers = cls.get_from_keys_or(config, ["ignored_layers"], None)
|
|
247
|
+
weight_block_size = cls.get_from_keys_or(config, ["weight_block_size"], None)
|
|
248
|
+
if not ignored_layers:
|
|
249
|
+
ignored_layers = cls.get_from_keys_or(
|
|
250
|
+
config, ["modules_to_not_convert"], None
|
|
251
|
+
)
|
|
252
|
+
return cls(
|
|
253
|
+
is_checkpoint_fp8_serialized=is_checkpoint_fp8_serialized,
|
|
254
|
+
activation_scheme=activation_scheme,
|
|
255
|
+
ignored_layers=ignored_layers,
|
|
256
|
+
weight_block_size=weight_block_size,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
def get_xpu_quant_method(
|
|
260
|
+
self, layer: torch.nn.Module, prefix: str
|
|
261
|
+
) -> Optional["QuantizeMethodBase"]:
|
|
262
|
+
from vllm.attention.layer import Attention
|
|
263
|
+
from vllm.model_executor.layers.quantization.ipex_quant import (
|
|
264
|
+
XPUFp8LinearMethod,
|
|
265
|
+
XPUFp8MoEMethod,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
fp8_config = Fp8Config(
|
|
269
|
+
is_checkpoint_fp8_serialized=self.is_checkpoint_fp8_serialized,
|
|
270
|
+
activation_scheme=self.activation_scheme,
|
|
271
|
+
ignored_layers=self.ignored_layers,
|
|
272
|
+
weight_block_size=self.weight_block_size,
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
if isinstance(layer, LinearBase):
|
|
276
|
+
if is_layer_skipped(
|
|
277
|
+
prefix=prefix,
|
|
278
|
+
ignored_layers=self.ignored_layers,
|
|
279
|
+
fused_mapping=self.packed_modules_mapping,
|
|
280
|
+
):
|
|
281
|
+
return UnquantizedLinearMethod()
|
|
282
|
+
return XPUFp8LinearMethod(fp8_config)
|
|
283
|
+
elif isinstance(layer, FusedMoE):
|
|
284
|
+
return XPUFp8MoEMethod(fp8_config, layer)
|
|
285
|
+
elif isinstance(layer, Attention):
|
|
286
|
+
return Fp8KVCacheMethod(self)
|
|
287
|
+
return None
|
|
288
|
+
|
|
289
|
+
def get_quant_method(
|
|
290
|
+
self, layer: torch.nn.Module, prefix: str
|
|
291
|
+
) -> Optional["QuantizeMethodBase"]:
|
|
292
|
+
from vllm.attention.layer import Attention # Avoid circular import
|
|
293
|
+
|
|
294
|
+
if current_platform.is_xpu():
|
|
295
|
+
return self.get_xpu_quant_method(layer, prefix)
|
|
296
|
+
if isinstance(layer, LinearBase):
|
|
297
|
+
if is_layer_skipped(
|
|
298
|
+
prefix=prefix,
|
|
299
|
+
ignored_layers=self.ignored_layers,
|
|
300
|
+
fused_mapping=self.packed_modules_mapping,
|
|
301
|
+
):
|
|
302
|
+
return UnquantizedLinearMethod()
|
|
303
|
+
return Fp8LinearMethod(self)
|
|
304
|
+
elif isinstance(layer, FusedMoE):
|
|
305
|
+
if is_layer_skipped(
|
|
306
|
+
prefix=prefix,
|
|
307
|
+
ignored_layers=self.ignored_layers,
|
|
308
|
+
fused_mapping=self.packed_modules_mapping,
|
|
309
|
+
):
|
|
310
|
+
return UnquantizedFusedMoEMethod(layer.moe_config)
|
|
311
|
+
return Fp8MoEMethod(self, layer)
|
|
312
|
+
elif isinstance(layer, Attention):
|
|
313
|
+
return Fp8KVCacheMethod(self)
|
|
314
|
+
return None
|
|
315
|
+
|
|
316
|
+
def get_cache_scale(self, name: str) -> str | None:
|
|
317
|
+
"""
|
|
318
|
+
Check whether the param name matches the format for k/v cache scales
|
|
319
|
+
in compressed-tensors. If this is the case, return its equivalent
|
|
320
|
+
param name expected by vLLM
|
|
321
|
+
|
|
322
|
+
:param name: param name
|
|
323
|
+
:return: matching param name for KV cache scale in vLLM
|
|
324
|
+
"""
|
|
325
|
+
if name.endswith(".output_scale") and ".k_proj" in name:
|
|
326
|
+
return name.replace(".k_proj.output_scale", ".attn.k_scale")
|
|
327
|
+
if name.endswith(".output_scale") and ".v_proj" in name:
|
|
328
|
+
return name.replace(".v_proj.output_scale", ".attn.v_scale")
|
|
329
|
+
if name.endswith(".output_scale") and ".q_proj" in name:
|
|
330
|
+
return name.replace(".q_proj.output_scale", ".attn.q_scale")
|
|
331
|
+
if name.endswith("self_attn.prob_output_scale"):
|
|
332
|
+
return name.replace(".prob_output_scale", ".attn.prob_scale")
|
|
333
|
+
# If no matches, return None
|
|
334
|
+
return None
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class Fp8LinearMethod(LinearMethodBase):
|
|
338
|
+
"""Linear method for FP8.
|
|
339
|
+
Supports loading FP8 checkpoints with static weight scale and
|
|
340
|
+
dynamic/static activation scale.
|
|
341
|
+
|
|
342
|
+
Also supports loading quantized FP16/BF16 model checkpoints with dynamic
|
|
343
|
+
activation scaling. The weight scaling factor will be initialized after
|
|
344
|
+
the model weights are loaded.
|
|
345
|
+
|
|
346
|
+
Limitations:
|
|
347
|
+
1. Only support per-tensor quantization due to torch._scaled_mm support.
|
|
348
|
+
2. Only support float8_e4m3fn data type due to the limitation of
|
|
349
|
+
torch._scaled_mm (https://github.com/pytorch/pytorch/blob/2e48b39603411a41c5025efbe52f89560b827825/aten/src/ATen/native/cuda/Blas.cpp#L854-L856)
|
|
350
|
+
|
|
351
|
+
Args:
|
|
352
|
+
quant_config: The quantization config.
|
|
353
|
+
"""
|
|
354
|
+
|
|
355
|
+
def __init__(self, quant_config: Fp8Config):
|
|
356
|
+
self.quant_config = quant_config
|
|
357
|
+
self.cutlass_block_fp8_supported = cutlass_block_fp8_supported()
|
|
358
|
+
self.out_dtype = torch.get_default_dtype()
|
|
359
|
+
|
|
360
|
+
# For GPUs that lack FP8 hardware support, we can leverage the Marlin
|
|
361
|
+
# kernel for fast weight-only FP8 quantization
|
|
362
|
+
self.use_marlin = (
|
|
363
|
+
not current_platform.has_device_capability(89)
|
|
364
|
+
or envs.VLLM_TEST_FORCE_FP8_MARLIN
|
|
365
|
+
)
|
|
366
|
+
# Disable marlin for rocm
|
|
367
|
+
if current_platform.is_rocm():
|
|
368
|
+
self.use_marlin = False
|
|
369
|
+
if vllm_is_batch_invariant():
|
|
370
|
+
self.use_marlin = False
|
|
371
|
+
|
|
372
|
+
self.use_aiter_and_is_supported = rocm_aiter_ops.is_linear_fp8_enaled()
|
|
373
|
+
self.use_deep_gemm = is_deep_gemm_supported()
|
|
374
|
+
|
|
375
|
+
self.weight_block_size = self.quant_config.weight_block_size
|
|
376
|
+
self.block_quant = self.weight_block_size is not None
|
|
377
|
+
self.act_q_static = self.quant_config.activation_scheme == "static"
|
|
378
|
+
if self.weight_block_size:
|
|
379
|
+
self.act_q_group_shape = GroupShape(1, self.weight_block_size[0])
|
|
380
|
+
else:
|
|
381
|
+
# Use per-token quantization for better perf if dynamic and cutlass
|
|
382
|
+
if not self.act_q_static and cutlass_fp8_supported():
|
|
383
|
+
self.act_q_group_shape = GroupShape.PER_TOKEN
|
|
384
|
+
else:
|
|
385
|
+
self.act_q_group_shape = GroupShape.PER_TENSOR
|
|
386
|
+
|
|
387
|
+
if self.block_quant:
|
|
388
|
+
assert not self.act_q_static
|
|
389
|
+
assert self.weight_block_size is not None
|
|
390
|
+
self.w8a8_block_fp8_linear = W8A8BlockFp8LinearOp(
|
|
391
|
+
weight_group_shape=GroupShape(*self.weight_block_size),
|
|
392
|
+
act_quant_group_shape=self.act_q_group_shape,
|
|
393
|
+
cutlass_block_fp8_supported=self.cutlass_block_fp8_supported,
|
|
394
|
+
use_aiter_and_is_supported=self.use_aiter_and_is_supported,
|
|
395
|
+
)
|
|
396
|
+
else:
|
|
397
|
+
self.fp8_linear = Fp8LinearOp(
|
|
398
|
+
act_quant_static=self.act_q_static,
|
|
399
|
+
act_quant_group_shape=self.act_q_group_shape,
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
def create_weights(
|
|
403
|
+
self,
|
|
404
|
+
layer: torch.nn.Module,
|
|
405
|
+
input_size_per_partition: int,
|
|
406
|
+
output_partition_sizes: list[int],
|
|
407
|
+
input_size: int,
|
|
408
|
+
output_size: int,
|
|
409
|
+
params_dtype: torch.dtype,
|
|
410
|
+
**extra_weight_attrs,
|
|
411
|
+
):
|
|
412
|
+
maybe_create_device_identity()
|
|
413
|
+
|
|
414
|
+
output_size_per_partition = sum(output_partition_sizes)
|
|
415
|
+
weight_loader = extra_weight_attrs.get("weight_loader")
|
|
416
|
+
layer.logical_widths = output_partition_sizes
|
|
417
|
+
layer.input_size_per_partition = input_size_per_partition
|
|
418
|
+
layer.output_size_per_partition = output_size_per_partition
|
|
419
|
+
layer.orig_dtype = params_dtype
|
|
420
|
+
layer.weight_block_size = None
|
|
421
|
+
|
|
422
|
+
if self.block_quant:
|
|
423
|
+
assert self.weight_block_size is not None
|
|
424
|
+
layer.weight_block_size = self.weight_block_size
|
|
425
|
+
validate_fp8_block_shape(
|
|
426
|
+
layer,
|
|
427
|
+
input_size,
|
|
428
|
+
output_size,
|
|
429
|
+
input_size_per_partition,
|
|
430
|
+
output_partition_sizes,
|
|
431
|
+
self.weight_block_size,
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
# WEIGHT
|
|
435
|
+
if self.quant_config.is_checkpoint_fp8_serialized:
|
|
436
|
+
weight = create_fp8_weight_parameter(
|
|
437
|
+
output_size_per_partition, input_size_per_partition, weight_loader
|
|
438
|
+
)
|
|
439
|
+
else:
|
|
440
|
+
# For non-serialized checkpoints, use original dtype
|
|
441
|
+
weight = ModelWeightParameter(
|
|
442
|
+
data=torch.empty(
|
|
443
|
+
output_size_per_partition,
|
|
444
|
+
input_size_per_partition,
|
|
445
|
+
dtype=params_dtype,
|
|
446
|
+
),
|
|
447
|
+
input_dim=1,
|
|
448
|
+
output_dim=0,
|
|
449
|
+
weight_loader=weight_loader,
|
|
450
|
+
)
|
|
451
|
+
layer.register_parameter("weight", weight)
|
|
452
|
+
|
|
453
|
+
# If checkpoint is serialized fp8, load them.
|
|
454
|
+
# Otherwise, wait until process_weights_after_loading.
|
|
455
|
+
if self.quant_config.is_checkpoint_fp8_serialized:
|
|
456
|
+
# WEIGHT SCALE
|
|
457
|
+
if not self.block_quant:
|
|
458
|
+
scale = create_fp8_scale_parameter(
|
|
459
|
+
PerTensorScaleParameter,
|
|
460
|
+
output_partition_sizes,
|
|
461
|
+
input_size_per_partition,
|
|
462
|
+
None,
|
|
463
|
+
weight_loader,
|
|
464
|
+
)
|
|
465
|
+
set_weight_attrs(scale, {"scale_type": "weight_scale"})
|
|
466
|
+
layer.register_parameter("weight_scale", scale)
|
|
467
|
+
else:
|
|
468
|
+
assert not self.act_q_static
|
|
469
|
+
assert self.weight_block_size is not None
|
|
470
|
+
scale = create_fp8_scale_parameter(
|
|
471
|
+
BlockQuantScaleParameter,
|
|
472
|
+
output_partition_sizes,
|
|
473
|
+
input_size_per_partition,
|
|
474
|
+
self.weight_block_size,
|
|
475
|
+
weight_loader,
|
|
476
|
+
)
|
|
477
|
+
set_weight_attrs(scale, {"scale_type": "weight_scale"})
|
|
478
|
+
# The weight_scale_inv name is intentional for deepseekv3
|
|
479
|
+
layer.register_parameter("weight_scale_inv", scale)
|
|
480
|
+
|
|
481
|
+
# INPUT ACTIVATION SCALE
|
|
482
|
+
if self.act_q_static:
|
|
483
|
+
scale = create_fp8_input_scale(output_partition_sizes, weight_loader)
|
|
484
|
+
set_weight_attrs(scale, {"scale_type": "input_scale"})
|
|
485
|
+
layer.register_parameter("input_scale", scale)
|
|
486
|
+
else:
|
|
487
|
+
layer.register_parameter("input_scale", None)
|
|
488
|
+
|
|
489
|
+
def process_weights_after_loading(self, layer: Module) -> None:
|
|
490
|
+
size_k_first = True
|
|
491
|
+
input_scale = None
|
|
492
|
+
# TODO(rob): refactor block quant into separate class.
|
|
493
|
+
if self.block_quant:
|
|
494
|
+
assert not self.act_q_static
|
|
495
|
+
size_k_first = False
|
|
496
|
+
|
|
497
|
+
weight, weight_scale = process_fp8_weight_block_strategy(
|
|
498
|
+
layer.weight, layer.weight_scale_inv
|
|
499
|
+
)
|
|
500
|
+
# Delete the weight_scale_inv parameter to avoid confusion
|
|
501
|
+
# with the weight_scale parameter
|
|
502
|
+
del layer.weight_scale_inv
|
|
503
|
+
|
|
504
|
+
# If checkpoint not serialized fp8, quantize the weights.
|
|
505
|
+
elif not self.quant_config.is_checkpoint_fp8_serialized:
|
|
506
|
+
qweight, weight_scale = ops.scaled_fp8_quant(layer.weight, scale=None)
|
|
507
|
+
weight = qweight.t()
|
|
508
|
+
|
|
509
|
+
# If checkpoint is fp8 per-tensor, handle that there are N scales for N
|
|
510
|
+
# shards in a fused module
|
|
511
|
+
else:
|
|
512
|
+
weight = layer.weight
|
|
513
|
+
weight_scale = layer.weight_scale
|
|
514
|
+
|
|
515
|
+
# If using w8a8, torch._scaled_mm needs per tensor, so
|
|
516
|
+
# requantize the logical shards as a single weight.
|
|
517
|
+
if not self.use_marlin:
|
|
518
|
+
weight, weight_scale, input_scale = process_fp8_weight_tensor_strategy(
|
|
519
|
+
weight,
|
|
520
|
+
weight_scale,
|
|
521
|
+
layer.logical_widths,
|
|
522
|
+
getattr(layer, "input_scale", None),
|
|
523
|
+
)
|
|
524
|
+
if self.act_q_static:
|
|
525
|
+
assert input_scale is not None
|
|
526
|
+
input_scale = input_scale.max()
|
|
527
|
+
weight = weight.t()
|
|
528
|
+
|
|
529
|
+
# Update layer with new values.
|
|
530
|
+
layer.weight = Parameter(weight.data, requires_grad=False)
|
|
531
|
+
layer.weight_scale = Parameter(weight_scale.data, requires_grad=False)
|
|
532
|
+
layer.input_scale = (
|
|
533
|
+
Parameter(input_scale, requires_grad=False)
|
|
534
|
+
if input_scale is not None
|
|
535
|
+
else None
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
if self.use_marlin:
|
|
539
|
+
prepare_fp8_layer_for_marlin(layer, size_k_first)
|
|
540
|
+
# Activations not quantized for marlin.
|
|
541
|
+
del layer.input_scale
|
|
542
|
+
return
|
|
543
|
+
|
|
544
|
+
if self.block_quant:
|
|
545
|
+
maybe_post_process_fp8_weight_block(layer)
|
|
546
|
+
|
|
547
|
+
def apply(
|
|
548
|
+
self,
|
|
549
|
+
layer: torch.nn.Module,
|
|
550
|
+
x: torch.Tensor,
|
|
551
|
+
bias: torch.Tensor | None = None,
|
|
552
|
+
) -> torch.Tensor:
|
|
553
|
+
# if batch invariant mode is enabled, prefer DeepGEMM FP8 path
|
|
554
|
+
# we will use BF16 dequant when DeepGEMM is not supported.
|
|
555
|
+
if vllm_is_batch_invariant():
|
|
556
|
+
if self.block_quant:
|
|
557
|
+
assert self.weight_block_size is not None
|
|
558
|
+
return self.w8a8_block_fp8_linear.apply(
|
|
559
|
+
input=x,
|
|
560
|
+
weight=layer.weight,
|
|
561
|
+
weight_scale=layer.weight_scale,
|
|
562
|
+
input_scale=layer.input_scale,
|
|
563
|
+
bias=bias,
|
|
564
|
+
)
|
|
565
|
+
else:
|
|
566
|
+
# per-tensor/channel: dequant to BF16 and run GEMM
|
|
567
|
+
weight_fp8 = layer.weight.to(torch.bfloat16)
|
|
568
|
+
weight_scale = layer.weight_scale.to(torch.bfloat16)
|
|
569
|
+
if weight_scale.numel() == 1:
|
|
570
|
+
# Per-tensor: simple scalar multiplication
|
|
571
|
+
weight_bf16 = weight_fp8 * weight_scale
|
|
572
|
+
else:
|
|
573
|
+
# Multiple scales (fused modules like QKV)
|
|
574
|
+
# Try to infer correct broadcasting
|
|
575
|
+
# weight is [K, N], scale could be [num_logical_weights]
|
|
576
|
+
# Need to figure out how to broadcast - for now just try
|
|
577
|
+
# direct multiplication
|
|
578
|
+
if (
|
|
579
|
+
weight_scale.dim() == 1
|
|
580
|
+
and weight_scale.shape[0] == weight_fp8.shape[0]
|
|
581
|
+
):
|
|
582
|
+
# Per-row scaling
|
|
583
|
+
weight_bf16 = weight_fp8 * weight_scale.unsqueeze(1)
|
|
584
|
+
else:
|
|
585
|
+
# Fallback
|
|
586
|
+
weight_bf16 = weight_fp8 * weight_scale
|
|
587
|
+
return torch.nn.functional.linear(x, weight_bf16.t(), bias)
|
|
588
|
+
|
|
589
|
+
if self.use_marlin:
|
|
590
|
+
return apply_fp8_marlin_linear(
|
|
591
|
+
input=x,
|
|
592
|
+
weight=layer.weight,
|
|
593
|
+
weight_scale=layer.weight_scale,
|
|
594
|
+
workspace=layer.workspace,
|
|
595
|
+
size_n=layer.output_size_per_partition,
|
|
596
|
+
size_k=layer.input_size_per_partition,
|
|
597
|
+
bias=bias,
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
if self.block_quant:
|
|
601
|
+
assert self.weight_block_size is not None
|
|
602
|
+
|
|
603
|
+
return self.w8a8_block_fp8_linear.apply(
|
|
604
|
+
input=x,
|
|
605
|
+
weight=layer.weight,
|
|
606
|
+
weight_scale=layer.weight_scale,
|
|
607
|
+
input_scale=layer.input_scale,
|
|
608
|
+
bias=bias,
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
return self.fp8_linear.apply(
|
|
612
|
+
input=x,
|
|
613
|
+
weight=layer.weight,
|
|
614
|
+
weight_scale=layer.weight_scale,
|
|
615
|
+
out_dtype=self.out_dtype,
|
|
616
|
+
input_scale=layer.input_scale,
|
|
617
|
+
bias=bias,
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
class Fp8MoEMethod(FusedMoEMethodBase):
|
|
622
|
+
"""MoE method for FP8.
|
|
623
|
+
Supports loading FP8 checkpoints with static weight scale and
|
|
624
|
+
dynamic/static activation scale.
|
|
625
|
+
|
|
626
|
+
Also supports loading quantized FP16/BF16 model checkpoints with dynamic
|
|
627
|
+
activation scaling. The weight scaling factor will be initialized after
|
|
628
|
+
the model weights are loaded.
|
|
629
|
+
|
|
630
|
+
Args:
|
|
631
|
+
quant_config: The quantization config.
|
|
632
|
+
"""
|
|
633
|
+
|
|
634
|
+
def __init__(self, quant_config: Fp8Config, layer: torch.nn.Module):
|
|
635
|
+
super().__init__(layer.moe_config)
|
|
636
|
+
self.layer = layer
|
|
637
|
+
self.quant_config = quant_config
|
|
638
|
+
self.weight_block_size = self.quant_config.weight_block_size
|
|
639
|
+
self.block_quant: bool = self.weight_block_size is not None
|
|
640
|
+
self.fp8_backend = get_fp8_moe_backend(self.block_quant)
|
|
641
|
+
|
|
642
|
+
self.use_marlin = self.fp8_backend == Fp8MoeBackend.MARLIN
|
|
643
|
+
self.flashinfer_moe_backend: FlashinferMoeBackend | None = None
|
|
644
|
+
if self.fp8_backend == Fp8MoeBackend.FLASHINFER_TRTLLM:
|
|
645
|
+
self.flashinfer_moe_backend = FlashinferMoeBackend.TENSORRT_LLM
|
|
646
|
+
elif self.fp8_backend == Fp8MoeBackend.FLASHINFER_CUTLASS:
|
|
647
|
+
self.flashinfer_moe_backend = FlashinferMoeBackend.CUTLASS
|
|
648
|
+
if self.block_quant:
|
|
649
|
+
assert self.weight_block_size == [128, 128], (
|
|
650
|
+
f"Only support weight_block_size == [128, 128], "
|
|
651
|
+
f"got {self.weight_block_size}"
|
|
652
|
+
)
|
|
653
|
+
self.flashinfer_moe_fn = partial(
|
|
654
|
+
flashinfer_cutlass_moe_fp8,
|
|
655
|
+
moe=self.moe,
|
|
656
|
+
use_deepseek_fp8_block_scale=self.block_quant,
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
self.allow_deep_gemm = self.fp8_backend == Fp8MoeBackend.DEEPGEMM
|
|
660
|
+
self.allow_cutlass_block_scaled_grouped_gemm = (
|
|
661
|
+
self.fp8_backend == Fp8MoeBackend.CUTLASS_BLOCK_SCALED_GROUPED_GEMM
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
def create_weights(
|
|
665
|
+
self,
|
|
666
|
+
layer: Module,
|
|
667
|
+
num_experts: int,
|
|
668
|
+
hidden_size: int,
|
|
669
|
+
intermediate_size_per_partition: int,
|
|
670
|
+
params_dtype: torch.dtype,
|
|
671
|
+
**extra_weight_attrs,
|
|
672
|
+
):
|
|
673
|
+
layer.intermediate_size_per_partition = intermediate_size_per_partition
|
|
674
|
+
layer.hidden_size = hidden_size
|
|
675
|
+
layer.num_experts = num_experts
|
|
676
|
+
layer.orig_dtype = params_dtype
|
|
677
|
+
layer.weight_block_size = None
|
|
678
|
+
|
|
679
|
+
if self.quant_config.is_checkpoint_fp8_serialized:
|
|
680
|
+
params_dtype = torch.float8_e4m3fn
|
|
681
|
+
if self.block_quant:
|
|
682
|
+
assert self.weight_block_size is not None
|
|
683
|
+
layer.weight_block_size = self.weight_block_size
|
|
684
|
+
tp_size = get_tensor_model_parallel_world_size()
|
|
685
|
+
block_n, block_k = (
|
|
686
|
+
self.weight_block_size[0],
|
|
687
|
+
self.weight_block_size[1],
|
|
688
|
+
)
|
|
689
|
+
# NOTE: To ensure proper alignment of the block-wise quantization
|
|
690
|
+
# scales, the output_size of the weights for both the gate and up
|
|
691
|
+
# layers must be divisible by block_n.
|
|
692
|
+
# Required by column parallel or enabling merged weights
|
|
693
|
+
if intermediate_size_per_partition % block_n != 0:
|
|
694
|
+
raise ValueError(
|
|
695
|
+
f"The output_size of gate's and up's weight = "
|
|
696
|
+
f"{intermediate_size_per_partition} is not divisible by "
|
|
697
|
+
f"weight quantization block_n = {block_n}."
|
|
698
|
+
)
|
|
699
|
+
if tp_size > 1 and intermediate_size_per_partition % block_k != 0:
|
|
700
|
+
# Required by row parallel
|
|
701
|
+
raise ValueError(
|
|
702
|
+
f"The input_size of down's weight = "
|
|
703
|
+
f"{intermediate_size_per_partition} is not divisible by "
|
|
704
|
+
f"weight quantization block_k = {block_k}."
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
# WEIGHTS
|
|
708
|
+
w13_weight = torch.nn.Parameter(
|
|
709
|
+
torch.empty(
|
|
710
|
+
num_experts,
|
|
711
|
+
2 * intermediate_size_per_partition,
|
|
712
|
+
hidden_size,
|
|
713
|
+
dtype=params_dtype,
|
|
714
|
+
),
|
|
715
|
+
requires_grad=False,
|
|
716
|
+
)
|
|
717
|
+
layer.register_parameter("w13_weight", w13_weight)
|
|
718
|
+
set_weight_attrs(w13_weight, extra_weight_attrs)
|
|
719
|
+
|
|
720
|
+
w2_weight = torch.nn.Parameter(
|
|
721
|
+
torch.empty(
|
|
722
|
+
num_experts,
|
|
723
|
+
hidden_size,
|
|
724
|
+
intermediate_size_per_partition,
|
|
725
|
+
dtype=params_dtype,
|
|
726
|
+
),
|
|
727
|
+
requires_grad=False,
|
|
728
|
+
)
|
|
729
|
+
layer.register_parameter("w2_weight", w2_weight)
|
|
730
|
+
set_weight_attrs(w2_weight, extra_weight_attrs)
|
|
731
|
+
|
|
732
|
+
# WEIGHT_SCALES
|
|
733
|
+
if not self.block_quant:
|
|
734
|
+
# Allocate 2 scales for w1 and w3 respectively.
|
|
735
|
+
# They will be combined to a single scale after weight loading.
|
|
736
|
+
w13_weight_scale = torch.nn.Parameter(
|
|
737
|
+
torch.ones(num_experts, 2, dtype=torch.float32), requires_grad=False
|
|
738
|
+
)
|
|
739
|
+
w2_weight_scale = torch.nn.Parameter(
|
|
740
|
+
torch.ones(num_experts, dtype=torch.float32), requires_grad=False
|
|
741
|
+
)
|
|
742
|
+
layer.register_parameter("w13_weight_scale", w13_weight_scale)
|
|
743
|
+
layer.register_parameter("w2_weight_scale", w2_weight_scale)
|
|
744
|
+
else:
|
|
745
|
+
w13_weight_scale = torch.nn.Parameter(
|
|
746
|
+
torch.ones(
|
|
747
|
+
num_experts,
|
|
748
|
+
2 * ((intermediate_size_per_partition + block_n - 1) // block_n),
|
|
749
|
+
(hidden_size + block_k - 1) // block_k,
|
|
750
|
+
dtype=torch.float32,
|
|
751
|
+
),
|
|
752
|
+
requires_grad=False,
|
|
753
|
+
)
|
|
754
|
+
w2_weight_scale = torch.nn.Parameter(
|
|
755
|
+
torch.ones(
|
|
756
|
+
num_experts,
|
|
757
|
+
(hidden_size + block_n - 1) // block_n,
|
|
758
|
+
(intermediate_size_per_partition + block_k - 1) // block_k,
|
|
759
|
+
dtype=torch.float32,
|
|
760
|
+
),
|
|
761
|
+
requires_grad=False,
|
|
762
|
+
)
|
|
763
|
+
layer.register_parameter("w13_weight_scale_inv", w13_weight_scale)
|
|
764
|
+
layer.register_parameter("w2_weight_scale_inv", w2_weight_scale)
|
|
765
|
+
assert self.quant_config.activation_scheme == "dynamic"
|
|
766
|
+
|
|
767
|
+
# Add the quantization method used (per tensor/grouped/channel)
|
|
768
|
+
# to ensure the weight scales are loaded in properly
|
|
769
|
+
extra_weight_attrs.update(
|
|
770
|
+
{"quant_method": FusedMoeWeightScaleSupported.BLOCK.value}
|
|
771
|
+
if self.block_quant
|
|
772
|
+
else {"quant_method": FusedMoeWeightScaleSupported.TENSOR.value}
|
|
773
|
+
)
|
|
774
|
+
# If loading fp8 checkpoint, pass the weight loaders.
|
|
775
|
+
# If loading an fp16 checkpoint, do not (we will quantize in
|
|
776
|
+
# process_weights_after_loading()
|
|
777
|
+
if self.quant_config.is_checkpoint_fp8_serialized:
|
|
778
|
+
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
|
|
779
|
+
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
|
|
780
|
+
|
|
781
|
+
# INPUT_SCALES
|
|
782
|
+
if self.quant_config.activation_scheme == "static":
|
|
783
|
+
if not self.quant_config.is_checkpoint_fp8_serialized:
|
|
784
|
+
raise ValueError(
|
|
785
|
+
"Found static activation scheme for checkpoint that "
|
|
786
|
+
"was not serialized fp8."
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
w13_input_scale = torch.nn.Parameter(
|
|
790
|
+
torch.ones(num_experts, dtype=torch.float32), requires_grad=False
|
|
791
|
+
)
|
|
792
|
+
layer.register_parameter("w13_input_scale", w13_input_scale)
|
|
793
|
+
set_weight_attrs(w13_input_scale, extra_weight_attrs)
|
|
794
|
+
|
|
795
|
+
w2_input_scale = torch.nn.Parameter(
|
|
796
|
+
torch.ones(num_experts, dtype=torch.float32), requires_grad=False
|
|
797
|
+
)
|
|
798
|
+
layer.register_parameter("w2_input_scale", w2_input_scale)
|
|
799
|
+
set_weight_attrs(w2_input_scale, extra_weight_attrs)
|
|
800
|
+
|
|
801
|
+
else:
|
|
802
|
+
layer.w13_input_scale = None
|
|
803
|
+
layer.w2_input_scale = None
|
|
804
|
+
|
|
805
|
+
self.rocm_aiter_moe_enabled = False
|
|
806
|
+
|
|
807
|
+
def process_weights_after_loading(self, layer: Module) -> None:
|
|
808
|
+
# Lazy import to avoid importing triton too early.
|
|
809
|
+
|
|
810
|
+
self.rocm_aiter_moe_enabled = rocm_aiter_ops.is_fused_moe_enabled()
|
|
811
|
+
|
|
812
|
+
# TODO (rob): refactor block quant into separate class.
|
|
813
|
+
if self.block_quant:
|
|
814
|
+
assert self.quant_config.activation_scheme == "dynamic"
|
|
815
|
+
if current_platform.is_fp8_fnuz():
|
|
816
|
+
w13_weight, w13_weight_scale_inv, w13_input_scale = (
|
|
817
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
818
|
+
layer.w13_weight,
|
|
819
|
+
layer.w13_weight_scale_inv,
|
|
820
|
+
layer.w13_input_scale,
|
|
821
|
+
)
|
|
822
|
+
)
|
|
823
|
+
w2_weight, w2_weight_scale_inv, w2_input_scale = (
|
|
824
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
825
|
+
layer.w2_weight, layer.w2_weight_scale_inv, layer.w2_input_scale
|
|
826
|
+
)
|
|
827
|
+
)
|
|
828
|
+
elif self.flashinfer_moe_backend is not None:
|
|
829
|
+
# NOTE: weights have to be swapped since the activation is
|
|
830
|
+
# applied on different half for flashinfer vs vllm
|
|
831
|
+
w13_weight = swap_w13_to_w31(layer.w13_weight.data)
|
|
832
|
+
w13_weight_scale_inv = swap_w13_to_w31(layer.w13_weight_scale_inv.data)
|
|
833
|
+
w2_weight = layer.w2_weight.data
|
|
834
|
+
w2_weight_scale_inv = layer.w2_weight_scale_inv.data
|
|
835
|
+
else:
|
|
836
|
+
w13_weight = layer.w13_weight.data
|
|
837
|
+
w13_weight_scale_inv = layer.w13_weight_scale_inv.data
|
|
838
|
+
w2_weight = layer.w2_weight
|
|
839
|
+
w2_weight_scale_inv = layer.w2_weight_scale_inv
|
|
840
|
+
|
|
841
|
+
# torch.compile() cannot use Parameter subclasses.
|
|
842
|
+
layer.w13_weight = Parameter(w13_weight, requires_grad=False)
|
|
843
|
+
layer.w13_weight_scale_inv = Parameter(
|
|
844
|
+
w13_weight_scale_inv, requires_grad=False
|
|
845
|
+
)
|
|
846
|
+
layer.w2_weight = Parameter(w2_weight, requires_grad=False)
|
|
847
|
+
layer.w2_weight_scale_inv = Parameter(
|
|
848
|
+
w2_weight_scale_inv, requires_grad=False
|
|
849
|
+
)
|
|
850
|
+
if self.rocm_aiter_moe_enabled:
|
|
851
|
+
# reshaping weights is required for aiter moe kernel.
|
|
852
|
+
shuffled_w13, shuffled_w2 = rocm_aiter_ops.shuffle_weights(
|
|
853
|
+
layer.w13_weight.data, layer.w2_weight.data
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
layer.w13_weight = torch.nn.Parameter(shuffled_w13, requires_grad=False)
|
|
857
|
+
layer.w2_weight = torch.nn.Parameter(shuffled_w2, requires_grad=False)
|
|
858
|
+
|
|
859
|
+
# DeepGemm scales need to be transposed and aligned. We try to do
|
|
860
|
+
# it ahead of time for performance reasons.
|
|
861
|
+
if self.allow_deep_gemm:
|
|
862
|
+
dg_w13_weight, dg_w13_weight_scale_inv = (
|
|
863
|
+
deepgemm_post_process_fp8_weight_block(
|
|
864
|
+
wq=layer.w13_weight.data,
|
|
865
|
+
ws=layer.w13_weight_scale_inv.data,
|
|
866
|
+
quant_block_shape=tuple(layer.weight_block_size),
|
|
867
|
+
use_e8m0=is_deep_gemm_e8m0_used(),
|
|
868
|
+
)
|
|
869
|
+
)
|
|
870
|
+
dg_w2_weight, dg_w2_weight_scale_inv = (
|
|
871
|
+
deepgemm_post_process_fp8_weight_block(
|
|
872
|
+
wq=layer.w2_weight.data,
|
|
873
|
+
ws=layer.w2_weight_scale_inv.data,
|
|
874
|
+
quant_block_shape=tuple(layer.weight_block_size),
|
|
875
|
+
use_e8m0=is_deep_gemm_e8m0_used(),
|
|
876
|
+
)
|
|
877
|
+
)
|
|
878
|
+
layer.w13_weight = Parameter(dg_w13_weight, requires_grad=False)
|
|
879
|
+
layer.w13_weight_scale_inv = Parameter(
|
|
880
|
+
dg_w13_weight_scale_inv, requires_grad=False
|
|
881
|
+
)
|
|
882
|
+
layer.w2_weight = Parameter(dg_w2_weight, requires_grad=False)
|
|
883
|
+
layer.w2_weight_scale_inv = Parameter(
|
|
884
|
+
dg_w2_weight_scale_inv, requires_grad=False
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
# If checkpoint is fp16, quantize in place.
|
|
888
|
+
elif not self.quant_config.is_checkpoint_fp8_serialized:
|
|
889
|
+
fp8_dtype = current_platform.fp8_dtype()
|
|
890
|
+
w13_weight = torch.empty_like(layer.w13_weight.data, dtype=fp8_dtype)
|
|
891
|
+
w2_weight = torch.empty_like(layer.w2_weight.data, dtype=fp8_dtype)
|
|
892
|
+
|
|
893
|
+
# Re-initialize w13_scale because we directly quantize
|
|
894
|
+
# merged w13 weights and generate a single scaling factor.
|
|
895
|
+
layer.w13_weight_scale = torch.nn.Parameter(
|
|
896
|
+
torch.ones(
|
|
897
|
+
layer.local_num_experts,
|
|
898
|
+
dtype=torch.float32,
|
|
899
|
+
device=w13_weight.device,
|
|
900
|
+
),
|
|
901
|
+
requires_grad=False,
|
|
902
|
+
)
|
|
903
|
+
for expert in range(layer.local_num_experts):
|
|
904
|
+
w13_weight[expert, :, :], layer.w13_weight_scale[expert] = (
|
|
905
|
+
ops.scaled_fp8_quant(layer.w13_weight.data[expert, :, :])
|
|
906
|
+
)
|
|
907
|
+
w2_weight[expert, :, :], layer.w2_weight_scale[expert] = (
|
|
908
|
+
ops.scaled_fp8_quant(layer.w2_weight.data[expert, :, :])
|
|
909
|
+
)
|
|
910
|
+
layer.w13_weight = torch.nn.Parameter(w13_weight, requires_grad=False)
|
|
911
|
+
layer.w2_weight = torch.nn.Parameter(w2_weight, requires_grad=False)
|
|
912
|
+
if self.rocm_aiter_moe_enabled:
|
|
913
|
+
# reshaping weights is required for aiter moe kernel.
|
|
914
|
+
shuffled_w13, shuffled_w2 = rocm_aiter_ops.shuffle_weights(
|
|
915
|
+
layer.w13_weight, layer.w2_weight
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
layer.w13_weight = torch.nn.Parameter(shuffled_w13, requires_grad=False)
|
|
919
|
+
layer.w2_weight = torch.nn.Parameter(shuffled_w2, requires_grad=False)
|
|
920
|
+
# If checkpoint is fp8, we need to handle that the
|
|
921
|
+
# MoE kernels require single activation scale and single weight
|
|
922
|
+
# scale for w13 per expert.
|
|
923
|
+
else:
|
|
924
|
+
# Fp8 moe kernels require a single activation scale.
|
|
925
|
+
# We take the max of all the scales in case they differ.
|
|
926
|
+
if self.quant_config.activation_scheme == "static":
|
|
927
|
+
if layer.w13_input_scale is None or layer.w2_input_scale is None:
|
|
928
|
+
raise ValueError(
|
|
929
|
+
"QuantConfig has static quantization, but found "
|
|
930
|
+
"activation scales are None."
|
|
931
|
+
)
|
|
932
|
+
if not all_close_1d(layer.w13_input_scale) or not all_close_1d(
|
|
933
|
+
layer.w2_input_scale
|
|
934
|
+
):
|
|
935
|
+
logger.warning_once(
|
|
936
|
+
"Found input_scales that are not equal for "
|
|
937
|
+
"fp8 MoE layer. Using the maximum across experts "
|
|
938
|
+
"for each layer."
|
|
939
|
+
)
|
|
940
|
+
layer.w13_input_scale = torch.nn.Parameter(
|
|
941
|
+
layer.w13_input_scale.max(), requires_grad=False
|
|
942
|
+
)
|
|
943
|
+
layer.w2_input_scale = torch.nn.Parameter(
|
|
944
|
+
layer.w2_input_scale.max(), requires_grad=False
|
|
945
|
+
)
|
|
946
|
+
if current_platform.is_fp8_fnuz():
|
|
947
|
+
# Normalize the weights and scales
|
|
948
|
+
w13_weight, w13_weight_scale, w13_input_scale = (
|
|
949
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
950
|
+
layer.w13_weight, layer.w13_weight_scale, layer.w13_input_scale
|
|
951
|
+
)
|
|
952
|
+
)
|
|
953
|
+
w2_weight, w2_weight_scale, w2_input_scale = (
|
|
954
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
955
|
+
layer.w2_weight, layer.w2_weight_scale, layer.w2_input_scale
|
|
956
|
+
)
|
|
957
|
+
)
|
|
958
|
+
# Reset the parameter
|
|
959
|
+
layer.w13_weight = torch.nn.Parameter(w13_weight, requires_grad=False)
|
|
960
|
+
layer.w13_weight_scale = torch.nn.Parameter(
|
|
961
|
+
w13_weight_scale, requires_grad=False
|
|
962
|
+
)
|
|
963
|
+
if w13_input_scale is not None:
|
|
964
|
+
layer.w13_input_scale = torch.nn.Parameter(
|
|
965
|
+
w13_input_scale, requires_grad=False
|
|
966
|
+
)
|
|
967
|
+
layer.w2_weight = torch.nn.Parameter(w2_weight, requires_grad=False)
|
|
968
|
+
layer.w2_weight_scale = torch.nn.Parameter(
|
|
969
|
+
w2_weight_scale, requires_grad=False
|
|
970
|
+
)
|
|
971
|
+
if w2_input_scale is not None:
|
|
972
|
+
layer.w2_input_scale = torch.nn.Parameter(
|
|
973
|
+
w2_input_scale, requires_grad=False
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
# Fp8 moe kernel needs single weight scale for w13 per expert.
|
|
977
|
+
# We take the max then dequant and requant each expert.
|
|
978
|
+
assert layer.w13_weight_scale is not None
|
|
979
|
+
shard_size = layer.intermediate_size_per_partition
|
|
980
|
+
max_w13_scales = layer.w13_weight_scale.max(dim=1).values
|
|
981
|
+
for expert_id in range(layer.local_num_experts):
|
|
982
|
+
start = 0
|
|
983
|
+
for shard_id in range(2):
|
|
984
|
+
dq_weight = per_tensor_dequantize(
|
|
985
|
+
layer.w13_weight[expert_id][start : start + shard_size, :],
|
|
986
|
+
layer.w13_weight_scale[expert_id][shard_id],
|
|
987
|
+
)
|
|
988
|
+
layer.w13_weight[expert_id][start : start + shard_size, :], _ = (
|
|
989
|
+
ops.scaled_fp8_quant(dq_weight, max_w13_scales[expert_id])
|
|
990
|
+
)
|
|
991
|
+
start += shard_size
|
|
992
|
+
|
|
993
|
+
if self.rocm_aiter_moe_enabled:
|
|
994
|
+
shuffled_w13, shuffled_w2 = rocm_aiter_ops.shuffle_weights(
|
|
995
|
+
layer.w13_weight, layer.w2_weight
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
layer.w13_weight = torch.nn.Parameter(shuffled_w13, requires_grad=False)
|
|
999
|
+
layer.w2_weight = torch.nn.Parameter(shuffled_w2, requires_grad=False)
|
|
1000
|
+
|
|
1001
|
+
layer.w13_weight_scale = torch.nn.Parameter(
|
|
1002
|
+
max_w13_scales, requires_grad=False
|
|
1003
|
+
)
|
|
1004
|
+
|
|
1005
|
+
if self.flashinfer_moe_backend is not None:
|
|
1006
|
+
# NOTE: weights have to be swapped since the activation is
|
|
1007
|
+
# applied on different half for flashinfer vs vllm
|
|
1008
|
+
assert not self.block_quant
|
|
1009
|
+
register_moe_scaling_factors(layer)
|
|
1010
|
+
w13_weight = swap_w13_to_w31(layer.w13_weight.data)
|
|
1011
|
+
if self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
|
|
1012
|
+
rotate_flashinfer_fp8_moe_weights(w13_weight, w2_weight)
|
|
1013
|
+
layer.w13_weight.data = w13_weight.data
|
|
1014
|
+
|
|
1015
|
+
if self.use_marlin:
|
|
1016
|
+
prepare_moe_fp8_layer_for_marlin(layer, False)
|
|
1017
|
+
# Activations not quantized for marlin.
|
|
1018
|
+
del layer.w13_input_scale
|
|
1019
|
+
del layer.w2_input_scale
|
|
1020
|
+
|
|
1021
|
+
def maybe_make_prepare_finalize(self) -> mk.FusedMoEPrepareAndFinalize | None:
|
|
1022
|
+
if (
|
|
1023
|
+
self.rocm_aiter_moe_enabled
|
|
1024
|
+
or self.use_marlin
|
|
1025
|
+
or self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM
|
|
1026
|
+
):
|
|
1027
|
+
return None
|
|
1028
|
+
elif self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS:
|
|
1029
|
+
if self.block_quant:
|
|
1030
|
+
assert self.weight_block_size == [128, 128], (
|
|
1031
|
+
f"Only support weight_block_size == [128, 128], "
|
|
1032
|
+
f"got {self.weight_block_size}"
|
|
1033
|
+
)
|
|
1034
|
+
# Wire block-scale flag through prepare/finalize when using CUTLASS
|
|
1035
|
+
prepare_finalize = build_flashinfer_fp8_cutlass_moe_prepare_finalize(
|
|
1036
|
+
self.moe,
|
|
1037
|
+
use_deepseek_fp8_block_scale=self.block_quant,
|
|
1038
|
+
)
|
|
1039
|
+
logger.debug_once("%s", prepare_finalize.__class__.__name__)
|
|
1040
|
+
return prepare_finalize
|
|
1041
|
+
else:
|
|
1042
|
+
return super().maybe_make_prepare_finalize()
|
|
1043
|
+
|
|
1044
|
+
def select_gemm_impl(
|
|
1045
|
+
self,
|
|
1046
|
+
prepare_finalize: FusedMoEPrepareAndFinalize,
|
|
1047
|
+
layer: torch.nn.Module,
|
|
1048
|
+
) -> FusedMoEPermuteExpertsUnpermute:
|
|
1049
|
+
from vllm.model_executor.layers.fused_moe import (
|
|
1050
|
+
BatchedDeepGemmExperts,
|
|
1051
|
+
BatchedTritonExperts,
|
|
1052
|
+
TritonOrDeepGemmExperts,
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
assert not self.use_marlin and not self.rocm_aiter_moe_enabled, (
|
|
1056
|
+
"Marlin and ROCm AITER are not supported with all2all yet."
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
assert self.moe_quant_config is not None
|
|
1060
|
+
|
|
1061
|
+
if (
|
|
1062
|
+
prepare_finalize.activation_format
|
|
1063
|
+
== FusedMoEActivationFormat.BatchedExperts
|
|
1064
|
+
):
|
|
1065
|
+
max_num_tokens_per_rank = prepare_finalize.max_num_tokens_per_rank()
|
|
1066
|
+
assert max_num_tokens_per_rank is not None
|
|
1067
|
+
|
|
1068
|
+
experts_impl = (
|
|
1069
|
+
BatchedDeepGemmExperts if self.allow_deep_gemm else BatchedTritonExperts
|
|
1070
|
+
)
|
|
1071
|
+
logger.debug(
|
|
1072
|
+
"%s(%s): max_tokens_per_rank=%s, block_size=%s, per_act_token=%s",
|
|
1073
|
+
experts_impl.__name__,
|
|
1074
|
+
self.__class__.__name__,
|
|
1075
|
+
max_num_tokens_per_rank,
|
|
1076
|
+
self.weight_block_size,
|
|
1077
|
+
False,
|
|
1078
|
+
)
|
|
1079
|
+
return experts_impl(
|
|
1080
|
+
max_num_tokens=max_num_tokens_per_rank,
|
|
1081
|
+
num_dispatchers=prepare_finalize.num_dispatchers(),
|
|
1082
|
+
quant_config=self.moe_quant_config,
|
|
1083
|
+
)
|
|
1084
|
+
|
|
1085
|
+
elif self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS:
|
|
1086
|
+
# Select GEMM experts with block-scale when weights are block-quantized
|
|
1087
|
+
experts = select_cutlass_fp8_gemm_impl(
|
|
1088
|
+
self.moe,
|
|
1089
|
+
self.moe_quant_config,
|
|
1090
|
+
use_deepseek_fp8_block_scale=self.block_quant,
|
|
1091
|
+
)
|
|
1092
|
+
logger.debug_once("Using %s", experts.__class__.__name__)
|
|
1093
|
+
return experts
|
|
1094
|
+
else:
|
|
1095
|
+
logger.debug(
|
|
1096
|
+
"TritonOrDeepGemmExperts(%s): block_size=%s, per_act_token=%s",
|
|
1097
|
+
self.__class__.__name__,
|
|
1098
|
+
self.weight_block_size,
|
|
1099
|
+
False,
|
|
1100
|
+
)
|
|
1101
|
+
return TritonOrDeepGemmExperts(
|
|
1102
|
+
quant_config=self.moe_quant_config,
|
|
1103
|
+
allow_deep_gemm=self.allow_deep_gemm,
|
|
1104
|
+
)
|
|
1105
|
+
|
|
1106
|
+
def get_fused_moe_quant_config(
|
|
1107
|
+
self, layer: torch.nn.Module
|
|
1108
|
+
) -> FusedMoEQuantConfig | None:
|
|
1109
|
+
if self.use_marlin:
|
|
1110
|
+
return None
|
|
1111
|
+
|
|
1112
|
+
return fp8_w8a8_moe_quant_config(
|
|
1113
|
+
w1_scale=(
|
|
1114
|
+
layer.w13_weight_scale_inv
|
|
1115
|
+
if self.block_quant
|
|
1116
|
+
else layer.w13_weight_scale
|
|
1117
|
+
),
|
|
1118
|
+
w2_scale=(
|
|
1119
|
+
layer.w2_weight_scale_inv if self.block_quant else layer.w2_weight_scale
|
|
1120
|
+
),
|
|
1121
|
+
a1_scale=layer.w13_input_scale,
|
|
1122
|
+
a2_scale=layer.w2_input_scale,
|
|
1123
|
+
block_shape=self.weight_block_size,
|
|
1124
|
+
)
|
|
1125
|
+
|
|
1126
|
+
@property
|
|
1127
|
+
def supports_eplb(self) -> bool:
|
|
1128
|
+
return True
|
|
1129
|
+
|
|
1130
|
+
@property
|
|
1131
|
+
def allow_inplace(self) -> bool:
|
|
1132
|
+
return True
|
|
1133
|
+
|
|
1134
|
+
def apply(
|
|
1135
|
+
self,
|
|
1136
|
+
layer: torch.nn.Module,
|
|
1137
|
+
x: torch.Tensor,
|
|
1138
|
+
router_logits: torch.Tensor,
|
|
1139
|
+
top_k: int,
|
|
1140
|
+
renormalize: bool,
|
|
1141
|
+
use_grouped_topk: bool = False,
|
|
1142
|
+
topk_group: int | None = None,
|
|
1143
|
+
num_expert_group: int | None = None,
|
|
1144
|
+
global_num_experts: int = -1,
|
|
1145
|
+
expert_map: torch.Tensor | None = None,
|
|
1146
|
+
custom_routing_function: Callable | None = None,
|
|
1147
|
+
scoring_func: str = "softmax",
|
|
1148
|
+
routed_scaling_factor: float = 1.0,
|
|
1149
|
+
e_score_correction_bias: torch.Tensor | None = None,
|
|
1150
|
+
apply_router_weight_on_input: bool = False,
|
|
1151
|
+
activation: str = "silu",
|
|
1152
|
+
enable_eplb: bool = False,
|
|
1153
|
+
expert_load_view: torch.Tensor | None = None,
|
|
1154
|
+
logical_to_physical_map: torch.Tensor | None = None,
|
|
1155
|
+
logical_replica_count: torch.Tensor | None = None,
|
|
1156
|
+
) -> torch.Tensor | tuple[torch.Tensor, torch.Tensor]:
|
|
1157
|
+
if enable_eplb:
|
|
1158
|
+
assert expert_load_view is not None
|
|
1159
|
+
assert logical_to_physical_map is not None
|
|
1160
|
+
assert logical_replica_count is not None
|
|
1161
|
+
assert isinstance(layer, FusedMoE)
|
|
1162
|
+
|
|
1163
|
+
if self.flashinfer_moe_backend == FlashinferMoeBackend.TENSORRT_LLM:
|
|
1164
|
+
assert activation == "silu", (
|
|
1165
|
+
f"Expected 'silu' activation but got {activation}"
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
if self.block_quant:
|
|
1169
|
+
import vllm.model_executor.layers.fused_moe.flashinfer_trtllm_moe # noqa: E501, F401
|
|
1170
|
+
|
|
1171
|
+
e_score_correction_bias = (
|
|
1172
|
+
e_score_correction_bias.to(x.dtype)
|
|
1173
|
+
if e_score_correction_bias is not None
|
|
1174
|
+
else None
|
|
1175
|
+
)
|
|
1176
|
+
routing_method_type = layer.routing_method_type
|
|
1177
|
+
return torch.ops.vllm.flashinfer_fused_moe_blockscale_fp8(
|
|
1178
|
+
routing_logits=router_logits.to(torch.float32)
|
|
1179
|
+
if routing_method_type == RoutingMethodType.DeepSeekV3
|
|
1180
|
+
else router_logits,
|
|
1181
|
+
routing_bias=e_score_correction_bias,
|
|
1182
|
+
x=x,
|
|
1183
|
+
w13_weight=layer.w13_weight,
|
|
1184
|
+
w13_weight_scale_inv=layer.w13_weight_scale_inv,
|
|
1185
|
+
w2_weight=layer.w2_weight,
|
|
1186
|
+
w2_weight_scale_inv=layer.w2_weight_scale_inv,
|
|
1187
|
+
global_num_experts=global_num_experts,
|
|
1188
|
+
top_k=top_k,
|
|
1189
|
+
num_expert_group=num_expert_group,
|
|
1190
|
+
topk_group=topk_group,
|
|
1191
|
+
intermediate_size=layer.intermediate_size_per_partition,
|
|
1192
|
+
expert_offset=layer.ep_rank * layer.local_num_experts,
|
|
1193
|
+
local_num_experts=layer.local_num_experts,
|
|
1194
|
+
block_shape=self.weight_block_size,
|
|
1195
|
+
routing_method_type=routing_method_type,
|
|
1196
|
+
routed_scaling=routed_scaling_factor,
|
|
1197
|
+
)
|
|
1198
|
+
else:
|
|
1199
|
+
assert not renormalize and custom_routing_function is not None
|
|
1200
|
+
result = apply_flashinfer_per_tensor_scale_fp8(
|
|
1201
|
+
layer=layer,
|
|
1202
|
+
hidden_states=x,
|
|
1203
|
+
router_logits=router_logits,
|
|
1204
|
+
routing_bias=e_score_correction_bias,
|
|
1205
|
+
global_num_experts=global_num_experts,
|
|
1206
|
+
top_k=top_k,
|
|
1207
|
+
num_expert_group=num_expert_group,
|
|
1208
|
+
topk_group=topk_group,
|
|
1209
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
zero_expert_num = getattr(layer, "zero_expert_num", 0)
|
|
1213
|
+
zero_expert_type = getattr(layer, "zero_expert_type", None)
|
|
1214
|
+
|
|
1215
|
+
select_result = FusedMoE.select_experts(
|
|
1216
|
+
hidden_states=x,
|
|
1217
|
+
router_logits=router_logits,
|
|
1218
|
+
use_grouped_topk=use_grouped_topk,
|
|
1219
|
+
top_k=top_k,
|
|
1220
|
+
renormalize=renormalize,
|
|
1221
|
+
topk_group=topk_group,
|
|
1222
|
+
num_expert_group=num_expert_group,
|
|
1223
|
+
custom_routing_function=custom_routing_function,
|
|
1224
|
+
scoring_func=scoring_func,
|
|
1225
|
+
routed_scaling_factor=routed_scaling_factor,
|
|
1226
|
+
e_score_correction_bias=e_score_correction_bias,
|
|
1227
|
+
indices_type=self.topk_indices_dtype,
|
|
1228
|
+
enable_eplb=enable_eplb,
|
|
1229
|
+
expert_map=expert_map,
|
|
1230
|
+
expert_load_view=expert_load_view,
|
|
1231
|
+
logical_to_physical_map=logical_to_physical_map,
|
|
1232
|
+
logical_replica_count=logical_replica_count,
|
|
1233
|
+
global_num_experts=global_num_experts,
|
|
1234
|
+
zero_expert_num=zero_expert_num,
|
|
1235
|
+
zero_expert_type=zero_expert_type,
|
|
1236
|
+
num_fused_shared_experts=layer.num_fused_shared_experts,
|
|
1237
|
+
)
|
|
1238
|
+
|
|
1239
|
+
topk_weights, topk_ids, zero_expert_result = select_result
|
|
1240
|
+
|
|
1241
|
+
if self.rocm_aiter_moe_enabled:
|
|
1242
|
+
from vllm.model_executor.layers.fused_moe.rocm_aiter_fused_moe import ( # noqa: E501
|
|
1243
|
+
rocm_aiter_fused_experts,
|
|
1244
|
+
)
|
|
1245
|
+
|
|
1246
|
+
result = rocm_aiter_fused_experts(
|
|
1247
|
+
x,
|
|
1248
|
+
layer.w13_weight,
|
|
1249
|
+
layer.w2_weight,
|
|
1250
|
+
topk_weights=topk_weights,
|
|
1251
|
+
topk_ids=topk_ids,
|
|
1252
|
+
activation=activation,
|
|
1253
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1254
|
+
expert_map=expert_map,
|
|
1255
|
+
quant_config=self.moe_quant_config,
|
|
1256
|
+
)
|
|
1257
|
+
elif self.use_marlin:
|
|
1258
|
+
assert activation == "silu", f"{activation} not supported for Marlin MoE."
|
|
1259
|
+
result = fused_marlin_moe(
|
|
1260
|
+
x,
|
|
1261
|
+
layer.w13_weight,
|
|
1262
|
+
layer.w2_weight,
|
|
1263
|
+
None,
|
|
1264
|
+
None,
|
|
1265
|
+
layer.w13_weight_scale,
|
|
1266
|
+
layer.w2_weight_scale,
|
|
1267
|
+
router_logits,
|
|
1268
|
+
topk_weights,
|
|
1269
|
+
topk_ids,
|
|
1270
|
+
quant_type_id=scalar_types.float8_e4m3fn.id,
|
|
1271
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1272
|
+
global_num_experts=global_num_experts,
|
|
1273
|
+
expert_map=expert_map,
|
|
1274
|
+
workspace=layer.workspace,
|
|
1275
|
+
)
|
|
1276
|
+
elif self.flashinfer_moe_backend == FlashinferMoeBackend.CUTLASS:
|
|
1277
|
+
assert activation == "silu", (
|
|
1278
|
+
f"Expected 'silu' activation but got {activation}"
|
|
1279
|
+
)
|
|
1280
|
+
if not self.block_quant:
|
|
1281
|
+
assert not renormalize and custom_routing_function is not None
|
|
1282
|
+
assert scoring_func == "sigmoid", (
|
|
1283
|
+
f"Expected 'sigmoid' scoring func but got {scoring_func}"
|
|
1284
|
+
)
|
|
1285
|
+
# Delegate to CUTLASS FlashInfer path; function already bound with
|
|
1286
|
+
# use_deepseek_fp8_block_scale for block-quant when applicable
|
|
1287
|
+
result = self.flashinfer_moe_fn(
|
|
1288
|
+
x,
|
|
1289
|
+
layer,
|
|
1290
|
+
topk_weights,
|
|
1291
|
+
topk_ids,
|
|
1292
|
+
inplace=False,
|
|
1293
|
+
activation=activation,
|
|
1294
|
+
global_num_experts=global_num_experts,
|
|
1295
|
+
expert_map=expert_map,
|
|
1296
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1297
|
+
)
|
|
1298
|
+
else:
|
|
1299
|
+
from vllm.model_executor.layers.fused_moe import fused_experts
|
|
1300
|
+
|
|
1301
|
+
result = fused_experts(
|
|
1302
|
+
hidden_states=x,
|
|
1303
|
+
w1=layer.w13_weight,
|
|
1304
|
+
w2=layer.w2_weight,
|
|
1305
|
+
topk_weights=topk_weights,
|
|
1306
|
+
topk_ids=topk_ids,
|
|
1307
|
+
inplace=True,
|
|
1308
|
+
activation=activation,
|
|
1309
|
+
global_num_experts=global_num_experts,
|
|
1310
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1311
|
+
expert_map=expert_map,
|
|
1312
|
+
quant_config=self.moe_quant_config,
|
|
1313
|
+
allow_deep_gemm=self.allow_deep_gemm,
|
|
1314
|
+
allow_cutlass_block_scaled_grouped_gemm=(
|
|
1315
|
+
self.allow_cutlass_block_scaled_grouped_gemm
|
|
1316
|
+
),
|
|
1317
|
+
)
|
|
1318
|
+
if zero_expert_num != 0 and zero_expert_type is not None:
|
|
1319
|
+
assert not isinstance(result, tuple), (
|
|
1320
|
+
"Shared + zero experts are mutually exclusive not yet supported"
|
|
1321
|
+
)
|
|
1322
|
+
return result, zero_expert_result
|
|
1323
|
+
else:
|
|
1324
|
+
return result
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
class Fp8KVCacheMethod(BaseKVCacheMethod):
|
|
1328
|
+
"""
|
|
1329
|
+
Supports loading kv-cache scaling factors from FP8 checkpoints.
|
|
1330
|
+
"""
|
|
1331
|
+
|
|
1332
|
+
def __init__(self, quant_config: Fp8Config):
|
|
1333
|
+
super().__init__(quant_config)
|