vllm-cpu-avx512bf16 0.14.0__cp313-cp313-manylinux_2_28_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 +1511 -0
- vllm/_bc_linter.py +54 -0
- vllm/_custom_ops.py +3206 -0
- vllm/_ipex_ops.py +445 -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 +62 -0
- vllm/assets/video.py +149 -0
- vllm/attention/__init__.py +0 -0
- vllm/attention/layer.py +913 -0
- vllm/attention/utils/__init__.py +0 -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 +3277 -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/mm_processor.py +363 -0
- vllm/benchmarks/serve.py +1761 -0
- vllm/benchmarks/startup.py +321 -0
- vllm/benchmarks/sweep/__init__.py +0 -0
- vllm/benchmarks/sweep/cli.py +41 -0
- vllm/benchmarks/sweep/param_sweep.py +159 -0
- vllm/benchmarks/sweep/plot.py +675 -0
- vllm/benchmarks/sweep/plot_pareto.py +393 -0
- vllm/benchmarks/sweep/serve.py +450 -0
- vllm/benchmarks/sweep/serve_sla.py +459 -0
- vllm/benchmarks/sweep/server.py +114 -0
- vllm/benchmarks/sweep/sla_sweep.py +138 -0
- vllm/benchmarks/sweep/utils.py +4 -0
- vllm/benchmarks/throughput.py +946 -0
- vllm/collect_env.py +857 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +214 -0
- vllm/compilation/backends.py +840 -0
- vllm/compilation/base_static_graph.py +57 -0
- vllm/compilation/caching.py +196 -0
- vllm/compilation/collective_fusion.py +1224 -0
- vllm/compilation/compiler_interface.py +639 -0
- vllm/compilation/counter.py +50 -0
- vllm/compilation/cuda_graph.py +309 -0
- vllm/compilation/decorators.py +662 -0
- vllm/compilation/fix_functionalization.py +266 -0
- vllm/compilation/fusion.py +570 -0
- vllm/compilation/fusion_attn.py +363 -0
- vllm/compilation/fx_utils.py +92 -0
- vllm/compilation/inductor_pass.py +145 -0
- vllm/compilation/matcher_utils.py +454 -0
- vllm/compilation/monitor.py +62 -0
- vllm/compilation/noop_elimination.py +130 -0
- vllm/compilation/partition_rules.py +75 -0
- vllm/compilation/pass_manager.py +164 -0
- vllm/compilation/piecewise_backend.py +191 -0
- vllm/compilation/post_cleanup.py +21 -0
- vllm/compilation/qk_norm_rope_fusion.py +244 -0
- vllm/compilation/rocm_aiter_fusion.py +401 -0
- vllm/compilation/sequence_parallelism.py +368 -0
- vllm/compilation/torch25_custom_graph_pass.py +44 -0
- vllm/compilation/vllm_inductor_pass.py +180 -0
- vllm/compilation/wrapper.py +329 -0
- vllm/config/__init__.py +112 -0
- vllm/config/attention.py +114 -0
- vllm/config/cache.py +233 -0
- vllm/config/compilation.py +1149 -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 +119 -0
- vllm/config/load.py +124 -0
- vllm/config/lora.py +102 -0
- vllm/config/model.py +2026 -0
- vllm/config/model_arch.py +57 -0
- vllm/config/multimodal.py +247 -0
- vllm/config/observability.py +157 -0
- vllm/config/parallel.py +703 -0
- vllm/config/pooler.py +188 -0
- vllm/config/profiler.py +199 -0
- vllm/config/scheduler.py +298 -0
- vllm/config/speculative.py +656 -0
- vllm/config/speech_to_text.py +39 -0
- vllm/config/structured_outputs.py +78 -0
- vllm/config/utils.py +374 -0
- vllm/config/vllm.py +1487 -0
- vllm/connections.py +189 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +301 -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 +509 -0
- vllm/distributed/device_communicators/all_reduce_utils.py +344 -0
- vllm/distributed/device_communicators/base_device_communicator.py +303 -0
- vllm/distributed/device_communicators/cpu_communicator.py +209 -0
- vllm/distributed/device_communicators/cuda_communicator.py +346 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +190 -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 +567 -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 +778 -0
- vllm/distributed/device_communicators/shm_object_storage.py +697 -0
- vllm/distributed/device_communicators/symm_mem.py +156 -0
- vllm/distributed/device_communicators/xpu_communicator.py +98 -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/example_connector.py +201 -0
- vllm/distributed/ec_transfer/ec_connector/factory.py +85 -0
- vllm/distributed/ec_transfer/ec_transfer_state.py +42 -0
- vllm/distributed/eplb/__init__.py +3 -0
- vllm/distributed/eplb/async_worker.py +115 -0
- vllm/distributed/eplb/eplb_state.py +1192 -0
- vllm/distributed/eplb/policy/__init__.py +19 -0
- vllm/distributed/eplb/policy/abstract.py +43 -0
- vllm/distributed/eplb/policy/default.py +376 -0
- vllm/distributed/eplb/rebalance_execute.py +699 -0
- vllm/distributed/kv_events.py +505 -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 +203 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +459 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +19 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +607 -0
- vllm/distributed/kv_transfer/kv_connector/v1/decode_bench_connector.py +419 -0
- vllm/distributed/kv_transfer/kv_connector/v1/example_connector.py +450 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +344 -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 +395 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py +211 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/vllm_v1_adapter.py +1431 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py +941 -0
- vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +186 -0
- vllm/distributed/kv_transfer/kv_connector/v1/mooncake_connector.py +916 -0
- vllm/distributed/kv_transfer/kv_connector/v1/moriio/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_common.py +321 -0
- vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py +1515 -0
- vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_engine.py +609 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +477 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +2688 -0
- vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +557 -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_transfer_state.py +78 -0
- vllm/distributed/parallel_state.py +1809 -0
- vllm/distributed/utils.py +545 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +2137 -0
- vllm/engine/async_llm_engine.py +6 -0
- vllm/engine/llm_engine.py +6 -0
- vllm/engine/protocol.py +194 -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 +468 -0
- vllm/entrypoints/api_server.py +186 -0
- vllm/entrypoints/chat_utils.py +1912 -0
- vllm/entrypoints/cli/__init__.py +19 -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 +57 -0
- vllm/entrypoints/cli/benchmark/mm_processor.py +21 -0
- vllm/entrypoints/cli/benchmark/serve.py +21 -0
- vllm/entrypoints/cli/benchmark/startup.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 +260 -0
- vllm/entrypoints/cli/run_batch.py +68 -0
- vllm/entrypoints/cli/serve.py +253 -0
- vllm/entrypoints/cli/types.py +29 -0
- vllm/entrypoints/constants.py +12 -0
- vllm/entrypoints/context.py +898 -0
- vllm/entrypoints/grpc_server.py +531 -0
- vllm/entrypoints/launcher.py +175 -0
- vllm/entrypoints/llm.py +1807 -0
- vllm/entrypoints/logger.py +86 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +1390 -0
- vllm/entrypoints/openai/cli_args.py +320 -0
- vllm/entrypoints/openai/orca_metrics.py +120 -0
- vllm/entrypoints/openai/parser/__init__.py +0 -0
- vllm/entrypoints/openai/parser/harmony_utils.py +820 -0
- vllm/entrypoints/openai/parser/responses_parser.py +176 -0
- vllm/entrypoints/openai/protocol.py +2566 -0
- vllm/entrypoints/openai/run_batch.py +635 -0
- vllm/entrypoints/openai/serving_chat.py +1897 -0
- vllm/entrypoints/openai/serving_chat_stream_harmony.py +101 -0
- vllm/entrypoints/openai/serving_completion.py +740 -0
- vllm/entrypoints/openai/serving_engine.py +1612 -0
- vllm/entrypoints/openai/serving_models.py +309 -0
- vllm/entrypoints/openai/serving_responses.py +2552 -0
- vllm/entrypoints/openai/serving_transcription.py +168 -0
- vllm/entrypoints/openai/speech_to_text.py +711 -0
- vllm/entrypoints/openai/utils.py +49 -0
- vllm/entrypoints/pooling/__init__.py +16 -0
- vllm/entrypoints/pooling/classify/__init__.py +0 -0
- vllm/entrypoints/pooling/classify/api_router.py +48 -0
- vllm/entrypoints/pooling/classify/protocol.py +181 -0
- vllm/entrypoints/pooling/classify/serving.py +233 -0
- vllm/entrypoints/pooling/embed/__init__.py +0 -0
- vllm/entrypoints/pooling/embed/api_router.py +65 -0
- vllm/entrypoints/pooling/embed/conftest.py +28 -0
- vllm/entrypoints/pooling/embed/protocol.py +217 -0
- vllm/entrypoints/pooling/embed/serving.py +684 -0
- vllm/entrypoints/pooling/pooling/__init__.py +0 -0
- vllm/entrypoints/pooling/pooling/api_router.py +62 -0
- vllm/entrypoints/pooling/pooling/protocol.py +146 -0
- vllm/entrypoints/pooling/pooling/serving.py +354 -0
- vllm/entrypoints/pooling/score/__init__.py +0 -0
- vllm/entrypoints/pooling/score/api_router.py +147 -0
- vllm/entrypoints/pooling/score/protocol.py +146 -0
- vllm/entrypoints/pooling/score/serving.py +511 -0
- vllm/entrypoints/renderer.py +411 -0
- vllm/entrypoints/responses_utils.py +218 -0
- vllm/entrypoints/sagemaker/__init__.py +4 -0
- vllm/entrypoints/sagemaker/routes.py +118 -0
- vllm/entrypoints/score_utils.py +271 -0
- vllm/entrypoints/serve/__init__.py +94 -0
- vllm/entrypoints/serve/cache/__init__.py +0 -0
- vllm/entrypoints/serve/cache/api_router.py +61 -0
- vllm/entrypoints/serve/disagg/__init__.py +0 -0
- vllm/entrypoints/serve/disagg/api_router.py +109 -0
- vllm/entrypoints/serve/disagg/protocol.py +90 -0
- vllm/entrypoints/serve/disagg/serving.py +285 -0
- vllm/entrypoints/serve/elastic_ep/__init__.py +0 -0
- vllm/entrypoints/serve/elastic_ep/api_router.py +96 -0
- vllm/entrypoints/serve/elastic_ep/middleware.py +49 -0
- vllm/entrypoints/serve/instrumentator/__init__.py +0 -0
- vllm/entrypoints/serve/instrumentator/health.py +33 -0
- vllm/entrypoints/serve/instrumentator/metrics.py +45 -0
- vllm/entrypoints/serve/instrumentator/offline_docs.py +50 -0
- vllm/entrypoints/serve/instrumentator/server_info.py +56 -0
- vllm/entrypoints/serve/instrumentator/static/swagger-ui-bundle.js +2 -0
- vllm/entrypoints/serve/instrumentator/static/swagger-ui.css +3 -0
- vllm/entrypoints/serve/lora/__init__.py +0 -0
- vllm/entrypoints/serve/lora/api_router.py +70 -0
- vllm/entrypoints/serve/profile/__init__.py +0 -0
- vllm/entrypoints/serve/profile/api_router.py +46 -0
- vllm/entrypoints/serve/rlhf/__init__.py +0 -0
- vllm/entrypoints/serve/rlhf/api_router.py +102 -0
- vllm/entrypoints/serve/rpc/__init__.py +0 -0
- vllm/entrypoints/serve/rpc/api_router.py +61 -0
- vllm/entrypoints/serve/sleep/__init__.py +0 -0
- vllm/entrypoints/serve/sleep/api_router.py +56 -0
- vllm/entrypoints/serve/tokenize/__init__.py +0 -0
- vllm/entrypoints/serve/tokenize/api_router.py +112 -0
- vllm/entrypoints/serve/tokenize/serving.py +204 -0
- vllm/entrypoints/ssl.py +78 -0
- vllm/entrypoints/tool.py +187 -0
- vllm/entrypoints/tool_server.py +234 -0
- vllm/entrypoints/utils.py +336 -0
- vllm/env_override.py +402 -0
- vllm/envs.py +1791 -0
- vllm/exceptions.py +36 -0
- vllm/forward_context.py +375 -0
- vllm/grpc/__init__.py +17 -0
- vllm/grpc/compile_protos.py +94 -0
- vllm/grpc/vllm_engine.proto +195 -0
- vllm/grpc/vllm_engine_pb2.py +77 -0
- vllm/grpc/vllm_engine_pb2.pyi +213 -0
- vllm/grpc/vllm_engine_pb2_grpc.py +330 -0
- vllm/inputs/__init__.py +44 -0
- vllm/inputs/data.py +359 -0
- vllm/inputs/parse.py +147 -0
- vllm/inputs/preprocess.py +716 -0
- vllm/logger.py +303 -0
- vllm/logging_utils/__init__.py +13 -0
- vllm/logging_utils/dump_input.py +83 -0
- vllm/logging_utils/formatter.py +127 -0
- vllm/logging_utils/lazy.py +20 -0
- vllm/logging_utils/log_time.py +34 -0
- vllm/logits_process.py +121 -0
- vllm/logprobs.py +206 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/layers/__init__.py +43 -0
- vllm/lora/layers/base.py +66 -0
- vllm/lora/layers/base_linear.py +172 -0
- vllm/lora/layers/column_parallel_linear.py +577 -0
- vllm/lora/layers/fused_moe.py +739 -0
- vllm/lora/layers/logits_processor.py +203 -0
- vllm/lora/layers/replicated_linear.py +70 -0
- vllm/lora/layers/row_parallel_linear.py +176 -0
- vllm/lora/layers/utils.py +115 -0
- vllm/lora/layers/vocal_parallel_embedding.py +140 -0
- vllm/lora/lora_model.py +221 -0
- vllm/lora/lora_weights.py +227 -0
- vllm/lora/model_manager.py +858 -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 +677 -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 +313 -0
- vllm/lora/peft_helper.py +128 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +493 -0
- vllm/lora/punica_wrapper/punica_cpu.py +351 -0
- vllm/lora/punica_wrapper/punica_gpu.py +413 -0
- vllm/lora/punica_wrapper/punica_selector.py +21 -0
- vllm/lora/punica_wrapper/punica_xpu.py +276 -0
- vllm/lora/punica_wrapper/utils.py +150 -0
- vllm/lora/request.py +60 -0
- vllm/lora/resolver.py +88 -0
- vllm/lora/utils.py +281 -0
- vllm/lora/worker_manager.py +278 -0
- vllm/model_executor/__init__.py +9 -0
- vllm/model_executor/custom_op.py +203 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +628 -0
- vllm/model_executor/layers/attention/__init__.py +0 -0
- vllm/model_executor/layers/attention/chunked_local_attention.py +130 -0
- vllm/model_executor/layers/attention/cross_attention.py +182 -0
- vllm/model_executor/layers/attention/encoder_only_attention.py +103 -0
- vllm/model_executor/layers/attention/mm_encoder_attention.py +234 -0
- vllm/model_executor/layers/attention/static_sink_attention.py +254 -0
- vllm/model_executor/layers/attention_layer_base.py +34 -0
- vllm/model_executor/layers/batch_invariant.py +1063 -0
- vllm/model_executor/layers/conv.py +262 -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 +120 -0
- vllm/model_executor/layers/fused_moe/all2all_utils.py +173 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +411 -0
- vllm/model_executor/layers/fused_moe/config.py +1111 -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_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -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=512,device_name=NVIDIA_H200,dtype=fp8_w8a8.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=704,device_name=NVIDIA_RTX_PRO_6000_Blackwell_Workstation_Edition,dtype=fp8_w8a8.json +146 -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_B200.json +147 -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=129,N=704,device_name=NVIDIA_RTX_PRO_6000_Blackwell_Workstation_Edition,dtype=fp8_w8a8.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_B300_SXM6_AC,dtype=fp8_w8a8.json +147 -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=192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +147 -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=384,device_name=NVIDIA_B300_SXM6_AC,dtype=fp8_w8a8.json +147 -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=160,N=768,device_name=NVIDIA_B300_SXM6_AC,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=1536,device_name=NVIDIA_RTX_PRO_6000_Blackwell_Server_Edition,dtype=fp8_w8a8.json +147 -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_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -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,dtype=fp8_w8a8,block_shape=[128,128].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,dtype=fp8_w8a8,block_shape=[128,128].json +147 -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,dtype=fp8_w8a8,block_shape=[128,128].json +147 -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=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -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 +444 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +1086 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +364 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +427 -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 +436 -0
- vllm/model_executor/layers/fused_moe/fallback.py +127 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutedsl_moe.py +338 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +310 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +371 -0
- vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +192 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +1018 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +824 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +2638 -0
- vllm/model_executor/layers/fused_moe/fused_moe_method_base.py +119 -0
- vllm/model_executor/layers/fused_moe/fused_moe_modular_method.py +117 -0
- vllm/model_executor/layers/fused_moe/fused_moe_router.py +40 -0
- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +531 -0
- vllm/model_executor/layers/fused_moe/layer.py +2169 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +1251 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +192 -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/oracle/__init__.py +2 -0
- vllm/model_executor/layers/fused_moe/oracle/fp8.py +358 -0
- vllm/model_executor/layers/fused_moe/oracle/nvfp4.py +280 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +87 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +347 -0
- vllm/model_executor/layers/fused_moe/routed_experts_capturer.py +324 -0
- vllm/model_executor/layers/fused_moe/routing_simulator.py +310 -0
- vllm/model_executor/layers/fused_moe/shared_fused_moe.py +96 -0
- vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +171 -0
- vllm/model_executor/layers/fused_moe/triton_cutlass_moe.py +78 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +75 -0
- vllm/model_executor/layers/fused_moe/trtllm_moe.py +144 -0
- vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py +403 -0
- vllm/model_executor/layers/fused_moe/utils.py +382 -0
- vllm/model_executor/layers/fused_moe/zero_expert_fused_moe.py +189 -0
- vllm/model_executor/layers/kda.py +442 -0
- vllm/model_executor/layers/layernorm.py +451 -0
- vllm/model_executor/layers/lightning_attn.py +735 -0
- vllm/model_executor/layers/linear.py +1478 -0
- vllm/model_executor/layers/logits_processor.py +109 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/abstract.py +68 -0
- vllm/model_executor/layers/mamba/linear_attn.py +410 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +541 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +936 -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 +586 -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 +254 -0
- vllm/model_executor/layers/mla.py +179 -0
- vllm/model_executor/layers/pooler/__init__.py +5 -0
- vllm/model_executor/layers/pooler/abstract.py +39 -0
- vllm/model_executor/layers/pooler/activations.py +162 -0
- vllm/model_executor/layers/pooler/common.py +32 -0
- vllm/model_executor/layers/pooler/seqwise/__init__.py +45 -0
- vllm/model_executor/layers/pooler/seqwise/heads.py +151 -0
- vllm/model_executor/layers/pooler/seqwise/methods.py +93 -0
- vllm/model_executor/layers/pooler/seqwise/poolers.py +127 -0
- vllm/model_executor/layers/pooler/special.py +128 -0
- vllm/model_executor/layers/pooler/tokwise/__init__.py +39 -0
- vllm/model_executor/layers/pooler/tokwise/heads.py +133 -0
- vllm/model_executor/layers/pooler/tokwise/methods.py +122 -0
- vllm/model_executor/layers/pooler/tokwise/poolers.py +127 -0
- vllm/model_executor/layers/quantization/__init__.py +195 -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 +795 -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 +631 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +3 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +982 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2368 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +37 -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_mxfp4.py +106 -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 +176 -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 +203 -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 +230 -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/cpu_wna16.py +299 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +218 -0
- vllm/model_executor/layers/quantization/experts_int8.py +209 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +195 -0
- vllm/model_executor/layers/quantization/fp8.py +1224 -0
- vllm/model_executor/layers/quantization/fp_quant.py +420 -0
- vllm/model_executor/layers/quantization/gguf.py +682 -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 +934 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +320 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +372 -0
- vllm/model_executor/layers/quantization/inc.py +65 -0
- vllm/model_executor/layers/quantization/input_quant_fp8.py +212 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +403 -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 +113 -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/cpu.py +126 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +130 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +111 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +168 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +159 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +200 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/xpu.py +97 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +76 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +77 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +128 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +220 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +147 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +88 -0
- vllm/model_executor/layers/quantization/kv_cache.py +153 -0
- vllm/model_executor/layers/quantization/modelopt.py +1665 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +518 -0
- vllm/model_executor/layers/quantization/mxfp4.py +1145 -0
- vllm/model_executor/layers/quantization/petit.py +319 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +140 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +570 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +797 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py +343 -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 +626 -0
- vllm/model_executor/layers/quantization/schema.py +90 -0
- vllm/model_executor/layers/quantization/torchao.py +380 -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=10240,K=5120,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -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=5120,K=25600,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=5120,K=8192,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=51200,K=5120,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -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 +514 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +370 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +1658 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +158 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +477 -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 +720 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +565 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +378 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +219 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +467 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +189 -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 +67 -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 +767 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +519 -0
- vllm/model_executor/layers/resampler.py +283 -0
- vllm/model_executor/layers/rotary_embedding/__init__.py +291 -0
- vllm/model_executor/layers/rotary_embedding/base.py +282 -0
- vllm/model_executor/layers/rotary_embedding/common.py +289 -0
- vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +184 -0
- vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +218 -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 +82 -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 +83 -0
- vllm/model_executor/layers/rotary_embedding/mrope.py +412 -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/xdrope.py +160 -0
- vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +84 -0
- vllm/model_executor/layers/utils.py +251 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +564 -0
- vllm/model_executor/model_loader/__init__.py +150 -0
- vllm/model_executor/model_loader/base_loader.py +71 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +821 -0
- vllm/model_executor/model_loader/default_loader.py +304 -0
- vllm/model_executor/model_loader/dummy_loader.py +28 -0
- vllm/model_executor/model_loader/gguf_loader.py +371 -0
- vllm/model_executor/model_loader/online_quantization.py +275 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +115 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +214 -0
- vllm/model_executor/model_loader/tensorizer.py +793 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +151 -0
- vllm/model_executor/model_loader/utils.py +299 -0
- vllm/model_executor/model_loader/weight_utils.py +1183 -0
- vllm/model_executor/models/__init__.py +44 -0
- vllm/model_executor/models/adapters.py +592 -0
- vllm/model_executor/models/afmoe.py +697 -0
- vllm/model_executor/models/aimv2.py +248 -0
- vllm/model_executor/models/apertus.py +567 -0
- vllm/model_executor/models/arcee.py +428 -0
- vllm/model_executor/models/arctic.py +633 -0
- vllm/model_executor/models/aria.py +663 -0
- vllm/model_executor/models/audioflamingo3.py +639 -0
- vllm/model_executor/models/aya_vision.py +448 -0
- vllm/model_executor/models/bagel.py +591 -0
- vllm/model_executor/models/baichuan.py +493 -0
- vllm/model_executor/models/bailing_moe.py +643 -0
- vllm/model_executor/models/bamba.py +511 -0
- vllm/model_executor/models/bee.py +157 -0
- vllm/model_executor/models/bert.py +911 -0
- vllm/model_executor/models/bert_with_rope.py +729 -0
- vllm/model_executor/models/blip.py +350 -0
- vllm/model_executor/models/blip2.py +736 -0
- vllm/model_executor/models/bloom.py +390 -0
- vllm/model_executor/models/chameleon.py +1095 -0
- vllm/model_executor/models/chatglm.py +502 -0
- vllm/model_executor/models/clip.py +1045 -0
- vllm/model_executor/models/cohere2_vision.py +470 -0
- vllm/model_executor/models/commandr.py +469 -0
- vllm/model_executor/models/config.py +571 -0
- vllm/model_executor/models/dbrx.py +484 -0
- vllm/model_executor/models/deepencoder.py +679 -0
- vllm/model_executor/models/deepseek_eagle.py +253 -0
- vllm/model_executor/models/deepseek_mtp.py +447 -0
- vllm/model_executor/models/deepseek_ocr.py +601 -0
- vllm/model_executor/models/deepseek_v2.py +1727 -0
- vllm/model_executor/models/deepseek_vl2.py +642 -0
- vllm/model_executor/models/dots1.py +566 -0
- vllm/model_executor/models/dots_ocr.py +830 -0
- vllm/model_executor/models/ernie45.py +53 -0
- vllm/model_executor/models/ernie45_moe.py +755 -0
- vllm/model_executor/models/ernie45_vl.py +1702 -0
- vllm/model_executor/models/ernie45_vl_moe.py +801 -0
- vllm/model_executor/models/ernie_mtp.py +278 -0
- vllm/model_executor/models/exaone.py +524 -0
- vllm/model_executor/models/exaone4.py +518 -0
- vllm/model_executor/models/exaone_moe.py +579 -0
- vllm/model_executor/models/exaone_moe_mtp.py +255 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +543 -0
- vllm/model_executor/models/falcon_h1.py +675 -0
- vllm/model_executor/models/flex_olmo.py +155 -0
- vllm/model_executor/models/fuyu.py +371 -0
- vllm/model_executor/models/gemma.py +425 -0
- vllm/model_executor/models/gemma2.py +435 -0
- vllm/model_executor/models/gemma3.py +520 -0
- vllm/model_executor/models/gemma3_mm.py +664 -0
- vllm/model_executor/models/gemma3n.py +1166 -0
- vllm/model_executor/models/gemma3n_audio_utils.py +57 -0
- vllm/model_executor/models/gemma3n_mm.py +820 -0
- vllm/model_executor/models/glm.py +24 -0
- vllm/model_executor/models/glm4.py +295 -0
- vllm/model_executor/models/glm4_1v.py +1823 -0
- vllm/model_executor/models/glm4_moe.py +725 -0
- vllm/model_executor/models/glm4_moe_mtp.py +365 -0
- vllm/model_executor/models/glm4v.py +783 -0
- vllm/model_executor/models/glmasr.py +1154 -0
- vllm/model_executor/models/glmasr_utils.py +188 -0
- vllm/model_executor/models/gpt2.py +385 -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 +340 -0
- vllm/model_executor/models/gpt_oss.py +745 -0
- vllm/model_executor/models/granite.py +475 -0
- vllm/model_executor/models/granite_speech.py +919 -0
- vllm/model_executor/models/granitemoe.py +561 -0
- vllm/model_executor/models/granitemoehybrid.py +703 -0
- vllm/model_executor/models/granitemoeshared.py +328 -0
- vllm/model_executor/models/gritlm.py +242 -0
- vllm/model_executor/models/grok1.py +803 -0
- vllm/model_executor/models/h2ovl.py +554 -0
- vllm/model_executor/models/hunyuan_v1.py +1042 -0
- vllm/model_executor/models/hunyuan_vision.py +1034 -0
- vllm/model_executor/models/hyperclovax_vision.py +1163 -0
- vllm/model_executor/models/idefics2_vision_model.py +427 -0
- vllm/model_executor/models/idefics3.py +734 -0
- vllm/model_executor/models/interfaces.py +1180 -0
- vllm/model_executor/models/interfaces_base.py +252 -0
- vllm/model_executor/models/intern_vit.py +454 -0
- vllm/model_executor/models/internlm2.py +451 -0
- vllm/model_executor/models/internlm2_ve.py +139 -0
- vllm/model_executor/models/interns1.py +828 -0
- vllm/model_executor/models/interns1_vit.py +433 -0
- vllm/model_executor/models/internvl.py +1436 -0
- vllm/model_executor/models/iquest_loopcoder.py +595 -0
- vllm/model_executor/models/isaac.py +1503 -0
- vllm/model_executor/models/jais.py +397 -0
- vllm/model_executor/models/jais2.py +508 -0
- vllm/model_executor/models/jamba.py +599 -0
- vllm/model_executor/models/jina_vl.py +145 -0
- vllm/model_executor/models/kanana_v.py +756 -0
- vllm/model_executor/models/keye.py +1709 -0
- vllm/model_executor/models/keye_vl1_5.py +726 -0
- vllm/model_executor/models/kimi_linear.py +659 -0
- vllm/model_executor/models/kimi_vl.py +577 -0
- vllm/model_executor/models/lfm2.py +515 -0
- vllm/model_executor/models/lfm2_moe.py +746 -0
- vllm/model_executor/models/lfm2_vl.py +732 -0
- vllm/model_executor/models/lightonocr.py +197 -0
- vllm/model_executor/models/llama.py +724 -0
- vllm/model_executor/models/llama4.py +860 -0
- vllm/model_executor/models/llama4_eagle.py +225 -0
- vllm/model_executor/models/llama_eagle.py +213 -0
- vllm/model_executor/models/llama_eagle3.py +375 -0
- vllm/model_executor/models/llava.py +879 -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 +922 -0
- vllm/model_executor/models/longcat_flash.py +767 -0
- vllm/model_executor/models/longcat_flash_mtp.py +348 -0
- vllm/model_executor/models/mamba.py +276 -0
- vllm/model_executor/models/mamba2.py +288 -0
- vllm/model_executor/models/medusa.py +179 -0
- vllm/model_executor/models/midashenglm.py +826 -0
- vllm/model_executor/models/mimo.py +188 -0
- vllm/model_executor/models/mimo_mtp.py +294 -0
- vllm/model_executor/models/mimo_v2_flash.py +718 -0
- vllm/model_executor/models/minicpm.py +660 -0
- vllm/model_executor/models/minicpm3.py +233 -0
- vllm/model_executor/models/minicpm_eagle.py +386 -0
- vllm/model_executor/models/minicpmo.py +768 -0
- vllm/model_executor/models/minicpmv.py +1742 -0
- vllm/model_executor/models/minimax_m2.py +552 -0
- vllm/model_executor/models/minimax_text_01.py +1008 -0
- vllm/model_executor/models/minimax_vl_01.py +395 -0
- vllm/model_executor/models/mistral3.py +638 -0
- vllm/model_executor/models/mistral_large_3.py +63 -0
- vllm/model_executor/models/mistral_large_3_eagle.py +137 -0
- vllm/model_executor/models/mixtral.py +599 -0
- vllm/model_executor/models/mllama4.py +1170 -0
- vllm/model_executor/models/mlp_speculator.py +235 -0
- vllm/model_executor/models/modernbert.py +458 -0
- vllm/model_executor/models/module_mapping.py +74 -0
- vllm/model_executor/models/molmo.py +1592 -0
- vllm/model_executor/models/moonvit.py +601 -0
- vllm/model_executor/models/mpt.py +335 -0
- vllm/model_executor/models/nano_nemotron_vl.py +1725 -0
- vllm/model_executor/models/nemotron.py +499 -0
- vllm/model_executor/models/nemotron_h.py +902 -0
- vllm/model_executor/models/nemotron_nas.py +474 -0
- vllm/model_executor/models/nemotron_parse.py +958 -0
- vllm/model_executor/models/nemotron_vl.py +651 -0
- vllm/model_executor/models/nvlm_d.py +216 -0
- vllm/model_executor/models/olmo.py +412 -0
- vllm/model_executor/models/olmo2.py +454 -0
- vllm/model_executor/models/olmoe.py +498 -0
- vllm/model_executor/models/opencua.py +262 -0
- vllm/model_executor/models/openpangu.py +1378 -0
- vllm/model_executor/models/openpangu_mtp.py +265 -0
- vllm/model_executor/models/opt.py +426 -0
- vllm/model_executor/models/orion.py +365 -0
- vllm/model_executor/models/ouro.py +507 -0
- vllm/model_executor/models/ovis.py +557 -0
- vllm/model_executor/models/ovis2_5.py +661 -0
- vllm/model_executor/models/paddleocr_vl.py +1261 -0
- vllm/model_executor/models/paligemma.py +429 -0
- vllm/model_executor/models/persimmon.py +373 -0
- vllm/model_executor/models/phi.py +363 -0
- vllm/model_executor/models/phi3.py +18 -0
- vllm/model_executor/models/phi3v.py +729 -0
- vllm/model_executor/models/phi4mm.py +1250 -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 +671 -0
- vllm/model_executor/models/pixtral.py +1437 -0
- vllm/model_executor/models/plamo2.py +993 -0
- vllm/model_executor/models/plamo3.py +437 -0
- vllm/model_executor/models/qwen.py +377 -0
- vllm/model_executor/models/qwen2.py +600 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +1200 -0
- vllm/model_executor/models/qwen2_5_vl.py +1598 -0
- vllm/model_executor/models/qwen2_audio.py +478 -0
- vllm/model_executor/models/qwen2_moe.py +604 -0
- vllm/model_executor/models/qwen2_rm.py +120 -0
- vllm/model_executor/models/qwen2_vl.py +1588 -0
- vllm/model_executor/models/qwen3.py +331 -0
- vllm/model_executor/models/qwen3_moe.py +752 -0
- vllm/model_executor/models/qwen3_next.py +1410 -0
- vllm/model_executor/models/qwen3_next_mtp.py +293 -0
- vllm/model_executor/models/qwen3_omni_moe_thinker.py +1814 -0
- vllm/model_executor/models/qwen3_vl.py +2120 -0
- vllm/model_executor/models/qwen3_vl_moe.py +474 -0
- vllm/model_executor/models/qwen_vl.py +821 -0
- vllm/model_executor/models/radio.py +573 -0
- vllm/model_executor/models/registry.py +1218 -0
- vllm/model_executor/models/roberta.py +239 -0
- vllm/model_executor/models/rvl.py +107 -0
- vllm/model_executor/models/seed_oss.py +492 -0
- vllm/model_executor/models/siglip.py +1259 -0
- vllm/model_executor/models/siglip2.py +495 -0
- vllm/model_executor/models/siglip2navit.py +660 -0
- vllm/model_executor/models/skyworkr1v.py +951 -0
- vllm/model_executor/models/smolvlm.py +38 -0
- vllm/model_executor/models/solar.py +484 -0
- vllm/model_executor/models/stablelm.py +354 -0
- vllm/model_executor/models/starcoder2.py +365 -0
- vllm/model_executor/models/step3_text.py +554 -0
- vllm/model_executor/models/step3_vl.py +1147 -0
- vllm/model_executor/models/swin.py +500 -0
- vllm/model_executor/models/tarsier.py +624 -0
- vllm/model_executor/models/telechat2.py +153 -0
- vllm/model_executor/models/teleflm.py +78 -0
- vllm/model_executor/models/terratorch.py +318 -0
- vllm/model_executor/models/transformers/__init__.py +127 -0
- vllm/model_executor/models/transformers/base.py +523 -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 +329 -0
- vllm/model_executor/models/transformers/multimodal.py +441 -0
- vllm/model_executor/models/transformers/pooling.py +102 -0
- vllm/model_executor/models/transformers/utils.py +253 -0
- vllm/model_executor/models/ultravox.py +786 -0
- vllm/model_executor/models/utils.py +832 -0
- vllm/model_executor/models/vision.py +546 -0
- vllm/model_executor/models/voxtral.py +867 -0
- vllm/model_executor/models/voxtral_streaming.py +304 -0
- vllm/model_executor/models/whisper.py +993 -0
- vllm/model_executor/models/whisper_utils.py +299 -0
- vllm/model_executor/models/zamba2.py +986 -0
- vllm/model_executor/parameter.py +642 -0
- vllm/model_executor/utils.py +113 -0
- vllm/model_executor/warmup/__init__.py +0 -0
- vllm/model_executor/warmup/deep_gemm_warmup.py +371 -0
- vllm/model_executor/warmup/kernel_warmup.py +97 -0
- vllm/model_inspection.py +136 -0
- vllm/multimodal/__init__.py +38 -0
- vllm/multimodal/audio.py +287 -0
- vllm/multimodal/base.py +60 -0
- vllm/multimodal/cache.py +829 -0
- vllm/multimodal/evs.py +294 -0
- vllm/multimodal/hasher.py +123 -0
- vllm/multimodal/image.py +155 -0
- vllm/multimodal/inputs.py +1027 -0
- vllm/multimodal/parse.py +674 -0
- vllm/multimodal/processing.py +2469 -0
- vllm/multimodal/profiling.py +351 -0
- vllm/multimodal/registry.py +375 -0
- vllm/multimodal/utils.py +550 -0
- vllm/multimodal/video.py +512 -0
- vllm/outputs.py +347 -0
- vllm/platforms/__init__.py +277 -0
- vllm/platforms/cpu.py +423 -0
- vllm/platforms/cuda.py +618 -0
- vllm/platforms/interface.py +707 -0
- vllm/platforms/rocm.py +586 -0
- vllm/platforms/tpu.py +20 -0
- vllm/platforms/xpu.py +262 -0
- vllm/plugins/__init__.py +81 -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 +229 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/layerwise_profile.py +392 -0
- vllm/profiler/utils.py +151 -0
- vllm/profiler/wrapper.py +241 -0
- vllm/py.typed +2 -0
- vllm/ray/__init__.py +0 -0
- vllm/ray/lazy_utils.py +30 -0
- vllm/ray/ray_env.py +79 -0
- vllm/reasoning/__init__.py +96 -0
- vllm/reasoning/abs_reasoning_parsers.py +318 -0
- vllm/reasoning/basic_parsers.py +175 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
- vllm/reasoning/deepseek_v3_reasoning_parser.py +69 -0
- vllm/reasoning/ernie45_reasoning_parser.py +165 -0
- vllm/reasoning/glm4_moe_reasoning_parser.py +13 -0
- vllm/reasoning/gptoss_reasoning_parser.py +173 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/holo2_reasoning_parser.py +89 -0
- vllm/reasoning/hunyuan_a13b_reasoning_parser.py +237 -0
- vllm/reasoning/identity_reasoning_parser.py +63 -0
- vllm/reasoning/minimax_m2_reasoning_parser.py +110 -0
- vllm/reasoning/mistral_reasoning_parser.py +154 -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 +113 -0
- vllm/sampling_params.py +629 -0
- vllm/scalar_type.py +355 -0
- vllm/scripts.py +17 -0
- vllm/sequence.py +64 -0
- vllm/tasks.py +13 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tokenizers/__init__.py +18 -0
- vllm/tokenizers/deepseek_v32.py +187 -0
- vllm/tokenizers/deepseek_v32_encoding.py +463 -0
- vllm/tokenizers/detokenizer_utils.py +198 -0
- vllm/tokenizers/grok2.py +443 -0
- vllm/tokenizers/hf.py +119 -0
- vllm/tokenizers/mistral.py +543 -0
- vllm/tokenizers/protocol.py +123 -0
- vllm/tokenizers/registry.py +238 -0
- vllm/tool_parsers/__init__.py +158 -0
- vllm/tool_parsers/abstract_tool_parser.py +274 -0
- vllm/tool_parsers/deepseekv31_tool_parser.py +388 -0
- vllm/tool_parsers/deepseekv32_tool_parser.py +591 -0
- vllm/tool_parsers/deepseekv3_tool_parser.py +390 -0
- vllm/tool_parsers/ernie45_tool_parser.py +210 -0
- vllm/tool_parsers/functiongemma_tool_parser.py +321 -0
- vllm/tool_parsers/gigachat3_tool_parser.py +190 -0
- vllm/tool_parsers/glm47_moe_tool_parser.py +23 -0
- vllm/tool_parsers/glm4_moe_tool_parser.py +215 -0
- vllm/tool_parsers/granite_20b_fc_tool_parser.py +273 -0
- vllm/tool_parsers/granite_tool_parser.py +253 -0
- vllm/tool_parsers/hermes_tool_parser.py +495 -0
- vllm/tool_parsers/hunyuan_a13b_tool_parser.py +420 -0
- vllm/tool_parsers/internlm2_tool_parser.py +227 -0
- vllm/tool_parsers/jamba_tool_parser.py +323 -0
- vllm/tool_parsers/kimi_k2_tool_parser.py +598 -0
- vllm/tool_parsers/llama4_pythonic_tool_parser.py +341 -0
- vllm/tool_parsers/llama_tool_parser.py +324 -0
- vllm/tool_parsers/longcat_tool_parser.py +37 -0
- vllm/tool_parsers/minimax_m2_tool_parser.py +776 -0
- vllm/tool_parsers/minimax_tool_parser.py +849 -0
- vllm/tool_parsers/mistral_tool_parser.py +612 -0
- vllm/tool_parsers/olmo3_tool_parser.py +366 -0
- vllm/tool_parsers/openai_tool_parser.py +111 -0
- vllm/tool_parsers/phi4mini_tool_parser.py +120 -0
- vllm/tool_parsers/pythonic_tool_parser.py +332 -0
- vllm/tool_parsers/qwen3coder_tool_parser.py +781 -0
- vllm/tool_parsers/qwen3xml_tool_parser.py +1316 -0
- vllm/tool_parsers/seed_oss_tool_parser.py +744 -0
- vllm/tool_parsers/step3_tool_parser.py +303 -0
- vllm/tool_parsers/utils.py +229 -0
- vllm/tool_parsers/xlam_tool_parser.py +556 -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 +1169 -0
- vllm/transformers_utils/config_parser_base.py +20 -0
- vllm/transformers_utils/configs/__init__.py +106 -0
- vllm/transformers_utils/configs/afmoe.py +87 -0
- vllm/transformers_utils/configs/arctic.py +216 -0
- vllm/transformers_utils/configs/bagel.py +53 -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 +90 -0
- vllm/transformers_utils/configs/falcon.py +89 -0
- vllm/transformers_utils/configs/flex_olmo.py +82 -0
- vllm/transformers_utils/configs/hunyuan_vl.py +322 -0
- vllm/transformers_utils/configs/isaac.py +100 -0
- vllm/transformers_utils/configs/jais.py +243 -0
- vllm/transformers_utils/configs/kimi_linear.py +148 -0
- vllm/transformers_utils/configs/kimi_vl.py +38 -0
- vllm/transformers_utils/configs/lfm2_moe.py +163 -0
- vllm/transformers_utils/configs/medusa.py +65 -0
- vllm/transformers_utils/configs/midashenglm.py +103 -0
- vllm/transformers_utils/configs/mistral.py +263 -0
- vllm/transformers_utils/configs/mlp_speculator.py +69 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/nemotron.py +220 -0
- vllm/transformers_utils/configs/nemotron_h.py +284 -0
- vllm/transformers_utils/configs/olmo3.py +83 -0
- vllm/transformers_utils/configs/ovis.py +182 -0
- vllm/transformers_utils/configs/qwen3_next.py +277 -0
- vllm/transformers_utils/configs/radio.py +98 -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 +178 -0
- vllm/transformers_utils/configs/tarsier2.py +24 -0
- vllm/transformers_utils/configs/ultravox.py +120 -0
- vllm/transformers_utils/dynamic_module.py +70 -0
- vllm/transformers_utils/gguf_utils.py +280 -0
- vllm/transformers_utils/model_arch_config_convertor.py +402 -0
- vllm/transformers_utils/processor.py +424 -0
- vllm/transformers_utils/processors/__init__.py +25 -0
- vllm/transformers_utils/processors/bagel.py +78 -0
- vllm/transformers_utils/processors/deepseek_ocr.py +438 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +406 -0
- vllm/transformers_utils/processors/hunyuan_vl.py +233 -0
- vllm/transformers_utils/processors/hunyuan_vl_image.py +477 -0
- vllm/transformers_utils/processors/ovis.py +453 -0
- vllm/transformers_utils/processors/ovis2_5.py +468 -0
- vllm/transformers_utils/repo_utils.py +287 -0
- vllm/transformers_utils/runai_utils.py +102 -0
- vllm/transformers_utils/s3_utils.py +95 -0
- vllm/transformers_utils/tokenizer.py +19 -0
- vllm/transformers_utils/utils.py +112 -0
- vllm/triton_utils/__init__.py +20 -0
- vllm/triton_utils/importing.py +103 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +278 -0
- vllm/utils/__init__.py +36 -0
- vllm/utils/argparse_utils.py +491 -0
- vllm/utils/async_utils.py +310 -0
- vllm/utils/cache.py +214 -0
- vllm/utils/collection_utils.py +112 -0
- vllm/utils/counter.py +45 -0
- vllm/utils/deep_gemm.py +424 -0
- vllm/utils/flashinfer.py +602 -0
- vllm/utils/func_utils.py +236 -0
- vllm/utils/gc_utils.py +151 -0
- vllm/utils/hashing.py +117 -0
- vllm/utils/import_utils.py +438 -0
- vllm/utils/jsontree.py +158 -0
- vllm/utils/math_utils.py +32 -0
- vllm/utils/mem_constants.py +13 -0
- vllm/utils/mem_utils.py +285 -0
- vllm/utils/nccl.py +64 -0
- vllm/utils/network_utils.py +331 -0
- vllm/utils/nvtx_pytorch_hooks.py +286 -0
- vllm/utils/platform_utils.py +59 -0
- vllm/utils/profiling.py +56 -0
- vllm/utils/registry.py +51 -0
- vllm/utils/serial_utils.py +214 -0
- vllm/utils/system_utils.py +296 -0
- vllm/utils/tensor_schema.py +255 -0
- vllm/utils/torch_utils.py +781 -0
- vllm/v1/__init__.py +0 -0
- vllm/v1/attention/__init__.py +0 -0
- vllm/v1/attention/backend.py +736 -0
- vllm/v1/attention/backends/__init__.py +0 -0
- vllm/v1/attention/backends/cpu_attn.py +501 -0
- vllm/v1/attention/backends/fa_utils.py +126 -0
- vllm/v1/attention/backends/flash_attn.py +1092 -0
- vllm/v1/attention/backends/flash_attn_diffkv.py +277 -0
- vllm/v1/attention/backends/flashinfer.py +1713 -0
- vllm/v1/attention/backends/flex_attention.py +1024 -0
- vllm/v1/attention/backends/gdn_attn.py +382 -0
- vllm/v1/attention/backends/linear_attn.py +77 -0
- vllm/v1/attention/backends/mamba1_attn.py +28 -0
- vllm/v1/attention/backends/mamba2_attn.py +256 -0
- vllm/v1/attention/backends/mamba_attn.py +313 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/aiter_triton_mla.py +66 -0
- vllm/v1/attention/backends/mla/common.py +2156 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +278 -0
- vllm/v1/attention/backends/mla/flashattn_mla.py +348 -0
- vllm/v1/attention/backends/mla/flashinfer_mla.py +175 -0
- vllm/v1/attention/backends/mla/flashmla.py +321 -0
- vllm/v1/attention/backends/mla/flashmla_sparse.py +1021 -0
- vllm/v1/attention/backends/mla/indexer.py +345 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +284 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py +321 -0
- vllm/v1/attention/backends/mla/triton_mla.py +171 -0
- vllm/v1/attention/backends/registry.py +258 -0
- vllm/v1/attention/backends/rocm_aiter_fa.py +1000 -0
- vllm/v1/attention/backends/rocm_aiter_unified_attn.py +206 -0
- vllm/v1/attention/backends/rocm_attn.py +405 -0
- vllm/v1/attention/backends/short_conv_attn.py +26 -0
- vllm/v1/attention/backends/tree_attn.py +430 -0
- vllm/v1/attention/backends/triton_attn.py +578 -0
- vllm/v1/attention/backends/utils.py +978 -0
- vllm/v1/attention/ops/__init__.py +0 -0
- vllm/v1/attention/ops/chunked_prefill_paged_decode.py +459 -0
- vllm/v1/attention/ops/common.py +469 -0
- vllm/v1/attention/ops/flashmla.py +254 -0
- vllm/v1/attention/ops/merge_attn_states.py +47 -0
- vllm/v1/attention/ops/paged_attn.py +51 -0
- vllm/v1/attention/ops/pallas_kv_cache_update.py +130 -0
- vllm/v1/attention/ops/prefix_prefill.py +862 -0
- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +210 -0
- vllm/v1/attention/ops/triton_decode_attention.py +709 -0
- vllm/v1/attention/ops/triton_merge_attn_states.py +116 -0
- vllm/v1/attention/ops/triton_prefill_attention.py +272 -0
- vllm/v1/attention/ops/triton_reshape_and_cache_flash.py +395 -0
- vllm/v1/attention/ops/triton_unified_attention.py +1088 -0
- vllm/v1/attention/ops/vit_attn_wrappers.py +185 -0
- vllm/v1/attention/selector.py +145 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +489 -0
- vllm/v1/core/encoder_cache_manager.py +402 -0
- vllm/v1/core/kv_cache_coordinator.py +560 -0
- vllm/v1/core/kv_cache_manager.py +485 -0
- vllm/v1/core/kv_cache_metrics.py +96 -0
- vllm/v1/core/kv_cache_utils.py +1642 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/async_scheduler.py +66 -0
- vllm/v1/core/sched/interface.py +205 -0
- vllm/v1/core/sched/output.py +261 -0
- vllm/v1/core/sched/request_queue.py +208 -0
- vllm/v1/core/sched/scheduler.py +1936 -0
- vllm/v1/core/sched/utils.py +64 -0
- vllm/v1/core/single_type_kv_cache_manager.py +926 -0
- vllm/v1/cudagraph_dispatcher.py +183 -0
- vllm/v1/engine/__init__.py +224 -0
- vllm/v1/engine/async_llm.py +874 -0
- vllm/v1/engine/coordinator.py +396 -0
- vllm/v1/engine/core.py +1614 -0
- vllm/v1/engine/core_client.py +1422 -0
- vllm/v1/engine/detokenizer.py +351 -0
- vllm/v1/engine/exceptions.py +18 -0
- vllm/v1/engine/input_processor.py +713 -0
- vllm/v1/engine/llm_engine.py +415 -0
- vllm/v1/engine/logprobs.py +245 -0
- vllm/v1/engine/output_processor.py +715 -0
- vllm/v1/engine/parallel_sampling.py +150 -0
- vllm/v1/engine/utils.py +1086 -0
- vllm/v1/executor/__init__.py +6 -0
- vllm/v1/executor/abstract.py +352 -0
- vllm/v1/executor/multiproc_executor.py +888 -0
- vllm/v1/executor/ray_distributed_executor.py +8 -0
- vllm/v1/executor/ray_executor.py +623 -0
- vllm/v1/executor/ray_utils.py +468 -0
- vllm/v1/executor/uniproc_executor.py +186 -0
- vllm/v1/kv_cache_interface.py +485 -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 +109 -0
- vllm/v1/kv_offload/factory.py +58 -0
- vllm/v1/kv_offload/lru_manager.py +139 -0
- vllm/v1/kv_offload/mediums.py +39 -0
- vllm/v1/kv_offload/spec.py +70 -0
- vllm/v1/kv_offload/worker/__init__.py +0 -0
- vllm/v1/kv_offload/worker/cpu_gpu.py +287 -0
- vllm/v1/kv_offload/worker/worker.py +163 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +1320 -0
- vllm/v1/metrics/perf.py +1244 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +194 -0
- vllm/v1/metrics/reader.py +257 -0
- vllm/v1/metrics/stats.py +440 -0
- vllm/v1/outputs.py +242 -0
- vllm/v1/pool/__init__.py +0 -0
- vllm/v1/pool/metadata.py +124 -0
- vllm/v1/request.py +281 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/logits_processor/__init__.py +352 -0
- vllm/v1/sample/logits_processor/builtin.py +278 -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 +57 -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 +388 -0
- vllm/v1/sample/rejection_sampler.py +822 -0
- vllm/v1/sample/sampler.py +319 -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 +514 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +1346 -0
- vllm/v1/spec_decode/medusa.py +73 -0
- vllm/v1/spec_decode/metadata.py +66 -0
- vllm/v1/spec_decode/metrics.py +225 -0
- vllm/v1/spec_decode/ngram_proposer.py +281 -0
- vllm/v1/spec_decode/suffix_decoding.py +95 -0
- vllm/v1/spec_decode/utils.py +109 -0
- vllm/v1/structured_output/__init__.py +337 -0
- vllm/v1/structured_output/backend_guidance.py +291 -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 +378 -0
- vllm/v1/structured_output/request.py +91 -0
- vllm/v1/structured_output/utils.py +457 -0
- vllm/v1/utils.py +466 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +343 -0
- vllm/v1/worker/cp_utils.py +42 -0
- vllm/v1/worker/cpu_model_runner.py +122 -0
- vllm/v1/worker/cpu_worker.py +192 -0
- vllm/v1/worker/dp_utils.py +240 -0
- vllm/v1/worker/ec_connector_model_runner_mixin.py +85 -0
- vllm/v1/worker/gpu/README.md +4 -0
- vllm/v1/worker/gpu/__init__.py +0 -0
- vllm/v1/worker/gpu/async_utils.py +98 -0
- vllm/v1/worker/gpu/attn_utils.py +183 -0
- vllm/v1/worker/gpu/block_table.py +222 -0
- vllm/v1/worker/gpu/buffer_utils.py +224 -0
- vllm/v1/worker/gpu/cudagraph_utils.py +264 -0
- vllm/v1/worker/gpu/dp_utils.py +31 -0
- vllm/v1/worker/gpu/input_batch.py +526 -0
- vllm/v1/worker/gpu/metrics/__init__.py +0 -0
- vllm/v1/worker/gpu/metrics/logits.py +42 -0
- vllm/v1/worker/gpu/mm/__init__.py +0 -0
- vllm/v1/worker/gpu/mm/mrope_utils.py +127 -0
- vllm/v1/worker/gpu/model_runner.py +1005 -0
- vllm/v1/worker/gpu/sample/__init__.py +0 -0
- vllm/v1/worker/gpu/sample/gumbel.py +106 -0
- vllm/v1/worker/gpu/sample/logit_bias.py +270 -0
- vllm/v1/worker/gpu/sample/logprob.py +167 -0
- vllm/v1/worker/gpu/sample/metadata.py +79 -0
- vllm/v1/worker/gpu/sample/min_p.py +58 -0
- vllm/v1/worker/gpu/sample/output.py +14 -0
- vllm/v1/worker/gpu/sample/penalties.py +155 -0
- vllm/v1/worker/gpu/sample/sampler.py +88 -0
- vllm/v1/worker/gpu/spec_decode/__init__.py +18 -0
- vllm/v1/worker/gpu/spec_decode/eagle.py +566 -0
- vllm/v1/worker/gpu/spec_decode/eagle_cudagraph.py +115 -0
- vllm/v1/worker/gpu/spec_decode/rejection_sample.py +71 -0
- vllm/v1/worker/gpu/states.py +282 -0
- vllm/v1/worker/gpu/structured_outputs.py +100 -0
- vllm/v1/worker/gpu_input_batch.py +1030 -0
- vllm/v1/worker/gpu_model_runner.py +5761 -0
- vllm/v1/worker/gpu_ubatch_wrapper.py +475 -0
- vllm/v1/worker/gpu_worker.py +968 -0
- vllm/v1/worker/kv_connector_model_runner_mixin.py +300 -0
- vllm/v1/worker/lora_model_runner_mixin.py +225 -0
- vllm/v1/worker/tpu_input_batch.py +574 -0
- vllm/v1/worker/tpu_worker.py +18 -0
- vllm/v1/worker/ubatch_utils.py +112 -0
- vllm/v1/worker/ubatching.py +242 -0
- vllm/v1/worker/utils.py +400 -0
- vllm/v1/worker/worker_base.py +372 -0
- vllm/v1/worker/workspace.py +253 -0
- vllm/v1/worker/xpu_model_runner.py +48 -0
- vllm/v1/worker/xpu_worker.py +174 -0
- vllm/version.py +39 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm_cpu_avx512bf16-0.14.0.dist-info/METADATA +348 -0
- vllm_cpu_avx512bf16-0.14.0.dist-info/RECORD +1712 -0
- vllm_cpu_avx512bf16-0.14.0.dist-info/WHEEL +5 -0
- vllm_cpu_avx512bf16-0.14.0.dist-info/entry_points.txt +5 -0
- vllm_cpu_avx512bf16-0.14.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1658 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
|
|
4
|
+
# Adapted from https://github.com/sgl-project/sglang/pull/2575
|
|
5
|
+
import functools
|
|
6
|
+
import json
|
|
7
|
+
import os
|
|
8
|
+
from collections.abc import Callable, Sequence
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
import torch
|
|
12
|
+
|
|
13
|
+
import vllm.envs as envs
|
|
14
|
+
from vllm import _custom_ops as ops
|
|
15
|
+
from vllm._aiter_ops import rocm_aiter_ops
|
|
16
|
+
from vllm.logger import init_logger
|
|
17
|
+
from vllm.model_executor.layers.quantization.input_quant_fp8 import QuantFP8
|
|
18
|
+
from vllm.model_executor.layers.quantization.utils.quant_utils import (
|
|
19
|
+
GroupShape,
|
|
20
|
+
get_fp8_min_max,
|
|
21
|
+
)
|
|
22
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
23
|
+
CUTLASS_BLOCK_FP8_SUPPORTED,
|
|
24
|
+
all_close_1d,
|
|
25
|
+
per_tensor_dequantize,
|
|
26
|
+
)
|
|
27
|
+
from vllm.model_executor.parameter import (
|
|
28
|
+
BlockQuantScaleParameter,
|
|
29
|
+
ChannelQuantScaleParameter,
|
|
30
|
+
PerTensorScaleParameter,
|
|
31
|
+
)
|
|
32
|
+
from vllm.model_executor.utils import replace_parameter
|
|
33
|
+
from vllm.platforms import current_platform
|
|
34
|
+
from vllm.triton_utils import tl, triton
|
|
35
|
+
from vllm.utils.deep_gemm import (
|
|
36
|
+
DeepGemmQuantScaleFMT,
|
|
37
|
+
fp8_gemm_nt,
|
|
38
|
+
is_deep_gemm_e8m0_used,
|
|
39
|
+
is_deep_gemm_supported,
|
|
40
|
+
should_use_deepgemm_for_fp8_linear,
|
|
41
|
+
transform_sf_into_required_layout,
|
|
42
|
+
)
|
|
43
|
+
from vllm.utils.flashinfer import (
|
|
44
|
+
flashinfer_fp8_blockscale_gemm,
|
|
45
|
+
is_flashinfer_fp8_blockscale_gemm_supported,
|
|
46
|
+
should_use_flashinfer_for_blockscale_fp8_gemm,
|
|
47
|
+
)
|
|
48
|
+
from vllm.utils.torch_utils import direct_register_custom_op
|
|
49
|
+
|
|
50
|
+
logger = init_logger(__name__)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def is_fp8(x: torch.dtype | torch.Tensor) -> bool:
|
|
54
|
+
if isinstance(x, torch.Tensor):
|
|
55
|
+
x = x.dtype
|
|
56
|
+
return x == torch.float8_e4m3fn or x == torch.float8_e4m3fnuz
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# We need to pass in the is_hopper flag as argument because the function
|
|
60
|
+
# current_platform.is_device_capability() is not supported by Torch compiler.
|
|
61
|
+
def cutlass_scaled_mm(
|
|
62
|
+
A: torch.Tensor,
|
|
63
|
+
B: torch.Tensor,
|
|
64
|
+
As: torch.Tensor,
|
|
65
|
+
Bs: torch.Tensor,
|
|
66
|
+
block_size: list[int],
|
|
67
|
+
output_dtype: torch.dtype = torch.float16,
|
|
68
|
+
) -> torch.Tensor:
|
|
69
|
+
return ops.cutlass_scaled_mm(
|
|
70
|
+
A,
|
|
71
|
+
B.T,
|
|
72
|
+
out_dtype=output_dtype,
|
|
73
|
+
scale_a=As,
|
|
74
|
+
scale_b=Bs.T,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# TODO we should be able to change the type of block_size to GroupShape
|
|
79
|
+
# after we resolve GroupShape compilation issue
|
|
80
|
+
# https://github.com/vllm-project/vllm/issues/25270
|
|
81
|
+
def _w8a8_triton_block_scaled_mm_func(
|
|
82
|
+
qx: torch.Tensor,
|
|
83
|
+
weight: torch.Tensor,
|
|
84
|
+
x_scale: torch.Tensor,
|
|
85
|
+
weight_scale: torch.Tensor,
|
|
86
|
+
block_size: list[int],
|
|
87
|
+
output_dtype: torch.dtype,
|
|
88
|
+
) -> torch.Tensor:
|
|
89
|
+
return w8a8_triton_block_scaled_mm(
|
|
90
|
+
qx, weight, x_scale, weight_scale, block_size, output_dtype
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _w8a8_triton_block_scaled_mm_fake(
|
|
95
|
+
qx: torch.Tensor,
|
|
96
|
+
weight: torch.Tensor,
|
|
97
|
+
x_scale: torch.Tensor,
|
|
98
|
+
weight_scale: torch.Tensor,
|
|
99
|
+
block_size: list[int],
|
|
100
|
+
output_dtype: torch.dtype,
|
|
101
|
+
) -> torch.Tensor:
|
|
102
|
+
return torch.empty(
|
|
103
|
+
(qx.size(0), weight.size(0)), dtype=output_dtype, device=qx.device
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
direct_register_custom_op(
|
|
108
|
+
"w8a8_triton_block_scaled_mm_func",
|
|
109
|
+
_w8a8_triton_block_scaled_mm_func,
|
|
110
|
+
fake_impl=_w8a8_triton_block_scaled_mm_fake,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _padded_cutlass(
|
|
115
|
+
qx: torch.Tensor,
|
|
116
|
+
weight: torch.Tensor,
|
|
117
|
+
x_scale: torch.Tensor,
|
|
118
|
+
weight_scale: torch.Tensor,
|
|
119
|
+
block_size: list[int],
|
|
120
|
+
output_dtype: torch.dtype,
|
|
121
|
+
) -> torch.Tensor:
|
|
122
|
+
pad_multiple = 4
|
|
123
|
+
dim = qx.shape[0]
|
|
124
|
+
padded = (
|
|
125
|
+
dim if dim % pad_multiple == 0 else dim + pad_multiple - (dim % pad_multiple)
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
has_pad = padded > dim
|
|
129
|
+
|
|
130
|
+
if has_pad:
|
|
131
|
+
padded_shape = [padded, *qx.shape[1:]]
|
|
132
|
+
padded_qx = torch.zeros(padded_shape, device=qx.device, dtype=qx.dtype)
|
|
133
|
+
padded_qx[0 : qx.shape[0], ...].copy_(qx)
|
|
134
|
+
|
|
135
|
+
padded_x_scale_shape = [*x_scale.shape[1:], padded]
|
|
136
|
+
padded_x_scale = torch.ones(
|
|
137
|
+
padded_x_scale_shape, device=x_scale.device, dtype=x_scale.dtype
|
|
138
|
+
).permute(-1, -2)
|
|
139
|
+
padded_x_scale[0 : x_scale.shape[0], ...].copy_(x_scale)
|
|
140
|
+
|
|
141
|
+
output = cutlass_scaled_mm(
|
|
142
|
+
padded_qx, weight, padded_x_scale, weight_scale, block_size, output_dtype
|
|
143
|
+
)
|
|
144
|
+
return output[0 : qx.shape[0], ...]
|
|
145
|
+
else:
|
|
146
|
+
return cutlass_scaled_mm(
|
|
147
|
+
qx, weight, x_scale, weight_scale, block_size, output_dtype
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _padded_cutlass_fake(
|
|
152
|
+
qx: torch.Tensor,
|
|
153
|
+
weight: torch.Tensor,
|
|
154
|
+
x_scale: torch.Tensor,
|
|
155
|
+
weight_scale: torch.Tensor,
|
|
156
|
+
block_size: list[int],
|
|
157
|
+
output_dtype: torch.dtype,
|
|
158
|
+
) -> torch.Tensor:
|
|
159
|
+
return torch.empty(
|
|
160
|
+
(qx.size(0), weight.size(0)), dtype=output_dtype, device=qx.device
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
direct_register_custom_op(
|
|
165
|
+
"padded_cutlass",
|
|
166
|
+
_padded_cutlass,
|
|
167
|
+
fake_impl=_padded_cutlass_fake,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _fp8_gemm_nt_op(
|
|
172
|
+
q_input: torch.Tensor,
|
|
173
|
+
input_scale: torch.Tensor,
|
|
174
|
+
weight: torch.Tensor,
|
|
175
|
+
weight_scale: torch.Tensor,
|
|
176
|
+
output: torch.Tensor,
|
|
177
|
+
use_deep_gemm_e8m0: bool,
|
|
178
|
+
) -> None:
|
|
179
|
+
fp8_gemm_nt(
|
|
180
|
+
(q_input, input_scale),
|
|
181
|
+
(weight, weight_scale),
|
|
182
|
+
output,
|
|
183
|
+
is_deep_gemm_e8m0_used=use_deep_gemm_e8m0,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def _fp8_gemm_nt_op_fake(
|
|
188
|
+
q_input: torch.Tensor,
|
|
189
|
+
input_scale: torch.Tensor,
|
|
190
|
+
weight: torch.Tensor,
|
|
191
|
+
weight_scale: torch.Tensor,
|
|
192
|
+
output: torch.Tensor,
|
|
193
|
+
use_deep_gemm_e8m0: bool,
|
|
194
|
+
) -> None:
|
|
195
|
+
return None
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
direct_register_custom_op(
|
|
199
|
+
"fp8_gemm_nt_op",
|
|
200
|
+
_fp8_gemm_nt_op,
|
|
201
|
+
mutates_args=["output"],
|
|
202
|
+
fake_impl=_fp8_gemm_nt_op_fake,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def _triton_per_token_group_quant_fp8_impl(
|
|
207
|
+
x: torch.Tensor,
|
|
208
|
+
group_size: int,
|
|
209
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
210
|
+
return per_token_group_quant_fp8(
|
|
211
|
+
x, group_size, column_major_scales=False, use_ue8m0=False
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def _triton_per_token_group_quant_fp8_fake(
|
|
216
|
+
x: torch.Tensor,
|
|
217
|
+
group_size: int,
|
|
218
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
219
|
+
M, N = x.shape
|
|
220
|
+
x_fp8 = torch.empty((M, N), dtype=current_platform.fp8_dtype(), device=x.device)
|
|
221
|
+
out_bs = torch.empty(
|
|
222
|
+
(
|
|
223
|
+
M,
|
|
224
|
+
(N + group_size - 1) // group_size,
|
|
225
|
+
),
|
|
226
|
+
dtype=torch.float32,
|
|
227
|
+
device=x.device,
|
|
228
|
+
)
|
|
229
|
+
return x_fp8, out_bs
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
direct_register_custom_op(
|
|
233
|
+
"triton_per_token_group_quant_fp8",
|
|
234
|
+
_triton_per_token_group_quant_fp8_impl,
|
|
235
|
+
fake_impl=_triton_per_token_group_quant_fp8_fake,
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _flashinfer_fp8_blockscale_gemm_impl(
|
|
240
|
+
input: torch.Tensor,
|
|
241
|
+
weight: torch.Tensor,
|
|
242
|
+
weight_scale: torch.Tensor,
|
|
243
|
+
group_size: int,
|
|
244
|
+
use_deep_gemm_e8m0: bool,
|
|
245
|
+
) -> torch.Tensor:
|
|
246
|
+
"""
|
|
247
|
+
Conditional FlashInfer FP8 blockscale GEMM with batch-size-dependent selection.
|
|
248
|
+
|
|
249
|
+
This function switches between two optimized kernels based on the input batch size:
|
|
250
|
+
- For small batches (M < 32): Uses FlashInfer's DeepGEMM swapAB optimization.
|
|
251
|
+
- For larger batches (M >= 32): Uses the official DeepGEMM kernel.
|
|
252
|
+
|
|
253
|
+
The conditional logic must use torch.cond() instead of a simple if-else statement
|
|
254
|
+
to maintain compatibility with torch.compile graph compilation.
|
|
255
|
+
|
|
256
|
+
This batch-size-dependent selection is essential for maintaining model accuracy.
|
|
257
|
+
Benchmarks on GSM8K show a significant accuracy gap (88% vs 95%) for DeepSeek-V3.1
|
|
258
|
+
when using FlashInfer's DeepGEMM on M>=32. The M < 32 strategy fixes the accurracy
|
|
259
|
+
drop.
|
|
260
|
+
|
|
261
|
+
Args:
|
|
262
|
+
input: Input tensor of shape (batch_size, input_dim) in FP8 format
|
|
263
|
+
weight: Weight tensor of shape (output_dim, input_dim) in FP8 format
|
|
264
|
+
weight_scale: Scale factors for weight quantization (per-group)
|
|
265
|
+
group_size: Quantization group size for the weight tensor
|
|
266
|
+
use_deep_gemm_e8m0: Whether to use the E8M0 format in DeepGEMM quantization
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
Output tensor of shape (batch_size, output_dim) in bfloat16 format
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
def run_flashinfer_deepgemm_swapAB(
|
|
273
|
+
input: torch.Tensor,
|
|
274
|
+
weight: torch.Tensor,
|
|
275
|
+
weight_scale: torch.Tensor,
|
|
276
|
+
) -> torch.Tensor:
|
|
277
|
+
return flashinfer_fp8_blockscale_gemm(
|
|
278
|
+
input=input,
|
|
279
|
+
weight=weight,
|
|
280
|
+
weight_scale=weight_scale,
|
|
281
|
+
out_dtype=torch.bfloat16,
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
def run_deepgemm(
|
|
285
|
+
input: torch.Tensor,
|
|
286
|
+
weight: torch.Tensor,
|
|
287
|
+
weight_scale: torch.Tensor,
|
|
288
|
+
) -> torch.Tensor:
|
|
289
|
+
q_input, input_scale = per_token_group_quant_fp8(
|
|
290
|
+
input,
|
|
291
|
+
group_size=group_size,
|
|
292
|
+
column_major_scales=True,
|
|
293
|
+
use_ue8m0=use_deep_gemm_e8m0,
|
|
294
|
+
)
|
|
295
|
+
output = torch.empty(
|
|
296
|
+
(q_input.shape[0], weight.shape[0]),
|
|
297
|
+
dtype=torch.bfloat16,
|
|
298
|
+
device=q_input.device,
|
|
299
|
+
)
|
|
300
|
+
fp8_gemm_nt(
|
|
301
|
+
(q_input, input_scale),
|
|
302
|
+
(weight, weight_scale),
|
|
303
|
+
output,
|
|
304
|
+
is_deep_gemm_e8m0_used=use_deep_gemm_e8m0,
|
|
305
|
+
)
|
|
306
|
+
return output
|
|
307
|
+
|
|
308
|
+
condition = input.shape[0] < 32
|
|
309
|
+
|
|
310
|
+
# PyTorch's torch.compile cannot handle input-dependent control flow in standard
|
|
311
|
+
# Python conditionals. torch.cond() explicitly registers both code paths in the
|
|
312
|
+
# computation graph, allowing torch.compile to capture both branches.
|
|
313
|
+
# without torch.cond, the M < 32 condition won't be able to be captured by torch
|
|
314
|
+
# compile
|
|
315
|
+
return torch.cond(
|
|
316
|
+
condition,
|
|
317
|
+
run_flashinfer_deepgemm_swapAB,
|
|
318
|
+
run_deepgemm,
|
|
319
|
+
(input, weight, weight_scale),
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
def _flashinfer_fp8_blockscale_gemm_fake(
|
|
324
|
+
input: torch.Tensor,
|
|
325
|
+
weight: torch.Tensor,
|
|
326
|
+
weight_scale: torch.Tensor,
|
|
327
|
+
group_size: int,
|
|
328
|
+
use_deep_gemm_e8m0: bool,
|
|
329
|
+
) -> torch.Tensor:
|
|
330
|
+
"""
|
|
331
|
+
Required fake/meta implementation for torch.compile graph tracing.
|
|
332
|
+
"""
|
|
333
|
+
return torch.empty(
|
|
334
|
+
input.shape[0], weight.shape[0], dtype=torch.bfloat16, device=input.device
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
direct_register_custom_op(
|
|
339
|
+
"flashinfer_fp8_blockscale_gemm",
|
|
340
|
+
_flashinfer_fp8_blockscale_gemm_impl,
|
|
341
|
+
fake_impl=_flashinfer_fp8_blockscale_gemm_fake,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
# TODO fix ROCm->Triton custom path:
|
|
346
|
+
# https://github.com/vllm-project/vllm/issues/14397
|
|
347
|
+
class W8A8BlockFp8LinearOp:
|
|
348
|
+
"""
|
|
349
|
+
This class executes a Blocked FP8 linear layer using cutlass if supported
|
|
350
|
+
and torch.scaled_mm otherwise.
|
|
351
|
+
"""
|
|
352
|
+
|
|
353
|
+
def __init__(
|
|
354
|
+
self,
|
|
355
|
+
weight_group_shape: GroupShape,
|
|
356
|
+
act_quant_group_shape: GroupShape,
|
|
357
|
+
cutlass_block_fp8_supported: bool = CUTLASS_BLOCK_FP8_SUPPORTED,
|
|
358
|
+
use_aiter_and_is_supported: bool = False,
|
|
359
|
+
):
|
|
360
|
+
self.weight_group_shape = weight_group_shape
|
|
361
|
+
self.act_quant_group_shape = act_quant_group_shape
|
|
362
|
+
self.is_deep_gemm_supported = is_deep_gemm_supported()
|
|
363
|
+
self.is_hopper = current_platform.is_device_capability(90)
|
|
364
|
+
self.use_deep_gemm_e8m0 = is_deep_gemm_e8m0_used()
|
|
365
|
+
self.is_flashinfer_supported = is_flashinfer_fp8_blockscale_gemm_supported()
|
|
366
|
+
|
|
367
|
+
# Get the correct blockscale mul and input quant operations.
|
|
368
|
+
# We can't use _dispatch_w8a8_blockscale_op to figure out if we want
|
|
369
|
+
# to use deepgemm because we don't know the shape of weights (and
|
|
370
|
+
# whether deepgemm supports it) at the init time.
|
|
371
|
+
self.w8a8_blockscale_op, self.input_quant_op = (
|
|
372
|
+
self._dispatch_w8a8_blockscale_op(
|
|
373
|
+
cutlass_block_fp8_supported, use_aiter_and_is_supported
|
|
374
|
+
)
|
|
375
|
+
)
|
|
376
|
+
self.deepgemm_input_quant_op = (
|
|
377
|
+
QuantFP8(
|
|
378
|
+
False,
|
|
379
|
+
self.act_quant_group_shape,
|
|
380
|
+
column_major_scales=True,
|
|
381
|
+
use_ue8m0=self.use_deep_gemm_e8m0,
|
|
382
|
+
)
|
|
383
|
+
if self.is_deep_gemm_supported
|
|
384
|
+
else None
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
def apply(
|
|
388
|
+
self,
|
|
389
|
+
input: torch.Tensor,
|
|
390
|
+
weight: torch.Tensor,
|
|
391
|
+
weight_scale: torch.Tensor,
|
|
392
|
+
input_scale: torch.Tensor | None = None,
|
|
393
|
+
bias: torch.Tensor | None = None,
|
|
394
|
+
) -> torch.Tensor:
|
|
395
|
+
assert input_scale is None
|
|
396
|
+
# View input as 2D matrix for fp8 methods
|
|
397
|
+
input_2d = input.view(-1, input.shape[-1])
|
|
398
|
+
output_shape = [*input.shape[:-1], weight.shape[0]]
|
|
399
|
+
output_dtype = input.dtype
|
|
400
|
+
|
|
401
|
+
if should_use_flashinfer_for_blockscale_fp8_gemm(
|
|
402
|
+
self.is_flashinfer_supported, output_dtype, input_2d, weight
|
|
403
|
+
) and should_use_deepgemm_for_fp8_linear(
|
|
404
|
+
output_dtype, weight, self.is_deep_gemm_supported
|
|
405
|
+
):
|
|
406
|
+
output = self._run_flashinfer(input_2d, weight, weight_scale)
|
|
407
|
+
|
|
408
|
+
elif should_use_deepgemm_for_fp8_linear(
|
|
409
|
+
output_dtype, weight, self.is_deep_gemm_supported
|
|
410
|
+
):
|
|
411
|
+
output = self._run_deepgemm(input_2d, weight, weight_scale)
|
|
412
|
+
else:
|
|
413
|
+
output = self.w8a8_blockscale_op(
|
|
414
|
+
input_2d, weight, weight_scale, input_scale
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
if bias is not None:
|
|
418
|
+
output = output + bias
|
|
419
|
+
return output.to(dtype=input.dtype).view(*output_shape)
|
|
420
|
+
|
|
421
|
+
def _run_deepgemm(
|
|
422
|
+
self,
|
|
423
|
+
input_2d: torch.Tensor,
|
|
424
|
+
weight: torch.Tensor,
|
|
425
|
+
weight_scale: torch.Tensor,
|
|
426
|
+
) -> torch.Tensor:
|
|
427
|
+
if DeepGemmQuantScaleFMT.from_oracle() == DeepGemmQuantScaleFMT.UE8M0:
|
|
428
|
+
q_input, input_scale = per_token_group_quant_fp8_packed_for_deepgemm(
|
|
429
|
+
input_2d,
|
|
430
|
+
group_size=self.act_quant_group_shape.col,
|
|
431
|
+
use_ue8m0=True,
|
|
432
|
+
)
|
|
433
|
+
else:
|
|
434
|
+
assert self.deepgemm_input_quant_op is not None
|
|
435
|
+
q_input, input_scale = self.deepgemm_input_quant_op(input_2d)
|
|
436
|
+
output = torch.empty(
|
|
437
|
+
(q_input.shape[0], weight.shape[0]),
|
|
438
|
+
dtype=torch.bfloat16,
|
|
439
|
+
device=q_input.device,
|
|
440
|
+
)
|
|
441
|
+
torch.ops.vllm.fp8_gemm_nt_op(
|
|
442
|
+
q_input, input_scale, weight, weight_scale, output, self.use_deep_gemm_e8m0
|
|
443
|
+
)
|
|
444
|
+
return output
|
|
445
|
+
|
|
446
|
+
def _run_cutlass(
|
|
447
|
+
self,
|
|
448
|
+
input_2d: torch.Tensor,
|
|
449
|
+
weight: torch.Tensor,
|
|
450
|
+
weight_scale: torch.Tensor,
|
|
451
|
+
input_scale: torch.Tensor | None = None,
|
|
452
|
+
) -> torch.Tensor:
|
|
453
|
+
assert input_scale is None
|
|
454
|
+
assert self.input_quant_op is not None
|
|
455
|
+
q_input, input_scale = self.input_quant_op(input_2d)
|
|
456
|
+
if self.is_hopper:
|
|
457
|
+
return torch.ops.vllm.padded_cutlass(
|
|
458
|
+
q_input,
|
|
459
|
+
weight,
|
|
460
|
+
input_scale,
|
|
461
|
+
weight_scale,
|
|
462
|
+
list(self.weight_group_shape),
|
|
463
|
+
input_2d.dtype,
|
|
464
|
+
)
|
|
465
|
+
else:
|
|
466
|
+
return cutlass_scaled_mm(
|
|
467
|
+
q_input,
|
|
468
|
+
weight,
|
|
469
|
+
input_scale,
|
|
470
|
+
weight_scale,
|
|
471
|
+
list(self.weight_group_shape),
|
|
472
|
+
input_2d.dtype,
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
def _run_aiter(
|
|
476
|
+
self,
|
|
477
|
+
input_2d: torch.Tensor,
|
|
478
|
+
weight: torch.Tensor,
|
|
479
|
+
weight_scale: torch.Tensor,
|
|
480
|
+
input_scale: torch.Tensor | None = None,
|
|
481
|
+
) -> torch.Tensor:
|
|
482
|
+
assert self.act_quant_group_shape == GroupShape(1, 128)
|
|
483
|
+
|
|
484
|
+
n, k = weight.shape
|
|
485
|
+
|
|
486
|
+
use_triton = (
|
|
487
|
+
not current_platform.is_fp8_fnuz()
|
|
488
|
+
and rocm_aiter_ops.is_triton_gemm_w8a8_tuned(n, k)
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
if use_triton:
|
|
492
|
+
gemm_a8w8_blockscale_op = rocm_aiter_ops.triton_gemm_a8w8_blockscale
|
|
493
|
+
else:
|
|
494
|
+
gemm_a8w8_blockscale_op = rocm_aiter_ops.gemm_a8w8_blockscale
|
|
495
|
+
|
|
496
|
+
if input_scale is not None:
|
|
497
|
+
q_input = input_2d
|
|
498
|
+
elif use_triton:
|
|
499
|
+
q_input, input_scale = torch.ops.vllm.triton_per_token_group_quant_fp8(
|
|
500
|
+
input_2d,
|
|
501
|
+
self.act_quant_group_shape.col,
|
|
502
|
+
)
|
|
503
|
+
else:
|
|
504
|
+
q_input, input_scale = rocm_aiter_ops.group_fp8_quant(
|
|
505
|
+
input_2d, self.act_quant_group_shape.col
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
return gemm_a8w8_blockscale_op(
|
|
509
|
+
q_input,
|
|
510
|
+
weight,
|
|
511
|
+
input_scale,
|
|
512
|
+
weight_scale,
|
|
513
|
+
list(self.weight_group_shape),
|
|
514
|
+
output_dtype=input_2d.dtype,
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
def _run_triton(
|
|
518
|
+
self,
|
|
519
|
+
input_2d: torch.Tensor,
|
|
520
|
+
weight: torch.Tensor,
|
|
521
|
+
weight_scale: torch.Tensor,
|
|
522
|
+
input_scale: torch.Tensor | None = None,
|
|
523
|
+
) -> torch.Tensor:
|
|
524
|
+
assert input_scale is None
|
|
525
|
+
assert self.input_quant_op is not None
|
|
526
|
+
q_input, input_scale = self.input_quant_op(input_2d)
|
|
527
|
+
return torch.ops.vllm.w8a8_triton_block_scaled_mm_func(
|
|
528
|
+
q_input,
|
|
529
|
+
weight,
|
|
530
|
+
input_scale,
|
|
531
|
+
weight_scale,
|
|
532
|
+
list(self.weight_group_shape),
|
|
533
|
+
input_2d.dtype,
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
def _run_flashinfer(
|
|
537
|
+
self,
|
|
538
|
+
input_2d: torch.Tensor,
|
|
539
|
+
weight: torch.Tensor,
|
|
540
|
+
weight_scale: torch.Tensor,
|
|
541
|
+
) -> torch.Tensor:
|
|
542
|
+
"""
|
|
543
|
+
Run FlashInfer FP8 block-scale GEMM.
|
|
544
|
+
|
|
545
|
+
This backend uses TensorRT-LLM's FP8 block-scale GEMM kernels
|
|
546
|
+
and supports FP8+FP8 (W8A8 full quantization) on SM90+ (Hopper).
|
|
547
|
+
"""
|
|
548
|
+
# Now call FlashInfer with BF16 input + FP8 weight, input will be
|
|
549
|
+
# quantized with FlashInfer kernel (W8A8)
|
|
550
|
+
output = torch.ops.vllm.flashinfer_fp8_blockscale_gemm(
|
|
551
|
+
input=input_2d, # BF16 input
|
|
552
|
+
weight=weight, # FP8 weight
|
|
553
|
+
weight_scale=weight_scale, # Weight scales
|
|
554
|
+
group_size=self.act_quant_group_shape.col,
|
|
555
|
+
use_deep_gemm_e8m0=self.use_deep_gemm_e8m0,
|
|
556
|
+
)
|
|
557
|
+
return output
|
|
558
|
+
|
|
559
|
+
def _dispatch_w8a8_blockscale_op(
|
|
560
|
+
self,
|
|
561
|
+
use_cutlass: bool,
|
|
562
|
+
use_aiter_and_is_supported: bool,
|
|
563
|
+
) -> tuple[
|
|
564
|
+
Callable[
|
|
565
|
+
[
|
|
566
|
+
torch.Tensor,
|
|
567
|
+
torch.Tensor,
|
|
568
|
+
torch.Tensor,
|
|
569
|
+
torch.Tensor | None,
|
|
570
|
+
],
|
|
571
|
+
torch.Tensor,
|
|
572
|
+
],
|
|
573
|
+
QuantFP8 | None,
|
|
574
|
+
]:
|
|
575
|
+
if use_cutlass:
|
|
576
|
+
return self._run_cutlass, (
|
|
577
|
+
QuantFP8(
|
|
578
|
+
False,
|
|
579
|
+
self.act_quant_group_shape,
|
|
580
|
+
column_major_scales=True,
|
|
581
|
+
use_ue8m0=False,
|
|
582
|
+
)
|
|
583
|
+
)
|
|
584
|
+
if use_aiter_and_is_supported:
|
|
585
|
+
return self._run_aiter, None
|
|
586
|
+
return self._run_triton, (
|
|
587
|
+
QuantFP8(
|
|
588
|
+
False,
|
|
589
|
+
self.act_quant_group_shape,
|
|
590
|
+
column_major_scales=False,
|
|
591
|
+
use_ue8m0=False,
|
|
592
|
+
)
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
def input_to_float8(
|
|
597
|
+
x: torch.Tensor, dtype: torch.dtype | None = None
|
|
598
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
599
|
+
"""This function quantizes input values to float8 values "
|
|
600
|
+
"with tensor-wise quantization."""
|
|
601
|
+
dtype = current_platform.fp8_dtype() if dtype is None else dtype
|
|
602
|
+
finfo = torch.finfo(dtype)
|
|
603
|
+
min_val, max_val = x.aminmax()
|
|
604
|
+
amax = torch.maximum(min_val.abs(), max_val.abs()).clamp(min=1e-12)
|
|
605
|
+
scale = finfo.max / amax
|
|
606
|
+
x_scl_sat = (x * scale).clamp(min=finfo.min, max=finfo.max)
|
|
607
|
+
return x_scl_sat.to(dtype).contiguous(), scale.float().reciprocal()
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
@triton.jit
|
|
611
|
+
def _per_token_group_quant_fp8(
|
|
612
|
+
# Pointers to inputs and output
|
|
613
|
+
y_ptr,
|
|
614
|
+
y_q_ptr,
|
|
615
|
+
y_s_ptr,
|
|
616
|
+
group_size,
|
|
617
|
+
# Num columns of y
|
|
618
|
+
y_num_columns,
|
|
619
|
+
y_row_stride,
|
|
620
|
+
# Avoid to divide zero
|
|
621
|
+
eps,
|
|
622
|
+
# Information for float8
|
|
623
|
+
fp8_min,
|
|
624
|
+
fp8_max,
|
|
625
|
+
use_ue8m0: tl.constexpr,
|
|
626
|
+
# Meta-parameters
|
|
627
|
+
BLOCK: tl.constexpr,
|
|
628
|
+
):
|
|
629
|
+
"""A Triton-accelerated function to perform per-token-group
|
|
630
|
+
quantization on a tensor.
|
|
631
|
+
This function converts the tensor values into float8 values.
|
|
632
|
+
"""
|
|
633
|
+
groups_per_row = y_num_columns // group_size
|
|
634
|
+
|
|
635
|
+
# Map the program id to the row of X and Y it should compute.
|
|
636
|
+
g_id = tl.program_id(0)
|
|
637
|
+
row = g_id // groups_per_row
|
|
638
|
+
row_g_id = g_id % groups_per_row
|
|
639
|
+
|
|
640
|
+
# Ensure offset calculations use int64 to prevent overflow
|
|
641
|
+
y_ptr_offset = (row.to(tl.int64) * y_row_stride) + (
|
|
642
|
+
row_g_id.to(tl.int64) * group_size
|
|
643
|
+
)
|
|
644
|
+
y_ptr += y_ptr_offset
|
|
645
|
+
|
|
646
|
+
y_q_ptr_offset = g_id.to(tl.int64) * group_size
|
|
647
|
+
y_q_ptr += y_q_ptr_offset
|
|
648
|
+
y_s_ptr += g_id
|
|
649
|
+
|
|
650
|
+
cols = tl.arange(0, BLOCK) # N <= BLOCK
|
|
651
|
+
mask = cols < group_size
|
|
652
|
+
|
|
653
|
+
y = tl.load(y_ptr + cols, mask=mask, other=0.0).to(tl.float32)
|
|
654
|
+
# Quant
|
|
655
|
+
_absmax = tl.maximum(tl.max(tl.abs(y)), eps)
|
|
656
|
+
scale_raw = _absmax / fp8_max
|
|
657
|
+
y_s = tl.math.exp2(tl.ceil(tl.log2(scale_raw))) if use_ue8m0 else scale_raw
|
|
658
|
+
y_q = tl.clamp(y / y_s, fp8_min, fp8_max).to(y_q_ptr.dtype.element_ty)
|
|
659
|
+
|
|
660
|
+
tl.store(y_q_ptr + cols, y_q, mask=mask)
|
|
661
|
+
tl.store(y_s_ptr, y_s)
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
@triton.jit
|
|
665
|
+
def _silu_mul_per_token_group_quant_fp8_colmajor(
|
|
666
|
+
y_ptr, # [M, N]
|
|
667
|
+
y_q_ptr, # [M, N // 2]
|
|
668
|
+
y_s_ptr, # [M, (N // 2) // GROUP_SIZE]
|
|
669
|
+
M, # num tokens
|
|
670
|
+
N, # intermediate size
|
|
671
|
+
# Stride
|
|
672
|
+
y_s_col_stride: tl.int64,
|
|
673
|
+
# Information for float8
|
|
674
|
+
eps,
|
|
675
|
+
fp8_min,
|
|
676
|
+
fp8_max,
|
|
677
|
+
use_ue8m0: tl.constexpr,
|
|
678
|
+
# Meta-parameters
|
|
679
|
+
GROUP_SIZE: tl.constexpr,
|
|
680
|
+
BLOCK_M: tl.constexpr,
|
|
681
|
+
BLOCK_N: tl.constexpr,
|
|
682
|
+
):
|
|
683
|
+
# TODO(varun) : Add expert_ids so we may early-exit no-op thread blocks.
|
|
684
|
+
"""
|
|
685
|
+
Each thread block (BLOCK_N) computes [BLOCK_M, GROUP_SIZE] act-mul outputs. Then
|
|
686
|
+
the thread block quantizes the [BLOCK_M, GROUP_SIZE] block of values and fills
|
|
687
|
+
the outputs tensors at the right positions.
|
|
688
|
+
"""
|
|
689
|
+
|
|
690
|
+
pid_m = tl.program_id(0)
|
|
691
|
+
pid_n = tl.program_id(1)
|
|
692
|
+
N_2 = N // 2
|
|
693
|
+
|
|
694
|
+
m_offset = pid_m * BLOCK_M
|
|
695
|
+
n_offset = pid_n * BLOCK_N
|
|
696
|
+
if m_offset >= M:
|
|
697
|
+
return
|
|
698
|
+
|
|
699
|
+
offs_n = tl.arange(0, BLOCK_N).to(tl.int64)
|
|
700
|
+
offs_m = tl.arange(0, BLOCK_M).to(tl.int64)
|
|
701
|
+
|
|
702
|
+
base_y_ptr = y_ptr + m_offset * N + n_offset
|
|
703
|
+
|
|
704
|
+
act_in_ptrs = base_y_ptr + offs_m[:, None] * N + offs_n[None, :]
|
|
705
|
+
|
|
706
|
+
act_in = tl.load(act_in_ptrs)
|
|
707
|
+
mul_in = tl.load(act_in_ptrs + N_2)
|
|
708
|
+
|
|
709
|
+
# silu & mul
|
|
710
|
+
act_in = act_in.to(tl.float32)
|
|
711
|
+
one_f32 = tl.cast(1, tl.float32)
|
|
712
|
+
silu_out = (act_in / (one_f32 + tl.exp(-act_in))).to(y_ptr.dtype.element_ty)
|
|
713
|
+
y = (silu_out * mul_in).to(tl.float32)
|
|
714
|
+
|
|
715
|
+
# quant
|
|
716
|
+
_absmax = tl.maximum(tl.max(tl.abs(y), axis=1), eps)
|
|
717
|
+
scale_raw = _absmax / fp8_max
|
|
718
|
+
y_s = tl.math.exp2(tl.ceil(tl.log2(scale_raw))) if use_ue8m0 else scale_raw
|
|
719
|
+
y_s = tl.reshape(y_s, (BLOCK_M, 1))
|
|
720
|
+
y_q = tl.clamp(y / y_s, fp8_min, fp8_max).to(y_q_ptr.dtype.element_ty)
|
|
721
|
+
|
|
722
|
+
# store y_q
|
|
723
|
+
base_y_q_ptr = y_q_ptr + m_offset * N_2 + n_offset
|
|
724
|
+
y_q_ptrs = base_y_q_ptr + offs_m[:, None] * N_2 + offs_n[None, :]
|
|
725
|
+
tl.store(y_q_ptrs, y_q)
|
|
726
|
+
|
|
727
|
+
# store y_s
|
|
728
|
+
group_id = n_offset // GROUP_SIZE
|
|
729
|
+
base_y_s_ptr = y_s_ptr + group_id * y_s_col_stride + m_offset
|
|
730
|
+
y_s_ptrs = base_y_s_ptr + offs_m
|
|
731
|
+
y_s = tl.reshape(y_s, (BLOCK_M,))
|
|
732
|
+
tl.store(y_s_ptrs, y_s)
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
def silu_mul_per_token_group_quant_fp8_colmajor(
|
|
736
|
+
input: torch.Tensor, # [M, N]
|
|
737
|
+
output: torch.Tensor | None = None, # [M, N // 2]
|
|
738
|
+
use_ue8m0: bool | None = None,
|
|
739
|
+
eps: float = 1e-10,
|
|
740
|
+
):
|
|
741
|
+
"""
|
|
742
|
+
silu+mul + block-fp8 quant with group size 128.
|
|
743
|
+
"""
|
|
744
|
+
GROUP_SIZE = 128
|
|
745
|
+
assert input.ndim == 2
|
|
746
|
+
if output is not None:
|
|
747
|
+
assert output.ndim == 2
|
|
748
|
+
assert input.size(0) % GROUP_SIZE == 0
|
|
749
|
+
assert input.size(1) % (GROUP_SIZE * 2) == 0
|
|
750
|
+
|
|
751
|
+
if use_ue8m0 is None:
|
|
752
|
+
use_ue8m0 = is_deep_gemm_e8m0_used()
|
|
753
|
+
|
|
754
|
+
M, N = input.size()
|
|
755
|
+
N_2 = N // 2
|
|
756
|
+
|
|
757
|
+
fp8_dtype = current_platform.fp8_dtype()
|
|
758
|
+
if output is None:
|
|
759
|
+
output = torch.empty((M, N_2), dtype=fp8_dtype, device=input.device)
|
|
760
|
+
|
|
761
|
+
output_scales = torch.empty(
|
|
762
|
+
((N_2 // GROUP_SIZE), M), dtype=torch.float32, device=input.device
|
|
763
|
+
).transpose(0, 1)
|
|
764
|
+
|
|
765
|
+
BLOCK_M = 8
|
|
766
|
+
BLOCK_N = GROUP_SIZE
|
|
767
|
+
assert M % BLOCK_M == 0
|
|
768
|
+
assert N_2 % BLOCK_N == 0
|
|
769
|
+
|
|
770
|
+
# Using the default value (240.0) from pytorch will cause accuracy
|
|
771
|
+
# issue on dynamic quantization models. Here use 224.0 for fnuz on ROCm
|
|
772
|
+
# platforms that use the torch.float8_e4m3fnuz dtype.
|
|
773
|
+
finfo = torch.finfo(fp8_dtype)
|
|
774
|
+
fp8_min = -224.0 if current_platform.is_fp8_fnuz() else finfo.min
|
|
775
|
+
fp8_max = 224.0 if current_platform.is_fp8_fnuz() else finfo.max
|
|
776
|
+
|
|
777
|
+
# Force even division so we can avoid edgecases within the kernel.
|
|
778
|
+
assert M % BLOCK_M == 0
|
|
779
|
+
assert N_2 % BLOCK_N == 0
|
|
780
|
+
grid = (M // BLOCK_M, N_2 // BLOCK_N)
|
|
781
|
+
|
|
782
|
+
_silu_mul_per_token_group_quant_fp8_colmajor[grid](
|
|
783
|
+
input,
|
|
784
|
+
output,
|
|
785
|
+
output_scales,
|
|
786
|
+
M,
|
|
787
|
+
N,
|
|
788
|
+
output_scales.stride(-1),
|
|
789
|
+
eps,
|
|
790
|
+
fp8_min,
|
|
791
|
+
fp8_max,
|
|
792
|
+
use_ue8m0,
|
|
793
|
+
GROUP_SIZE,
|
|
794
|
+
BLOCK_M,
|
|
795
|
+
BLOCK_N,
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
return output, output_scales
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
@triton.jit
|
|
802
|
+
def _per_token_group_quant_fp8_colmajor(
|
|
803
|
+
# Pointers to inputs and output
|
|
804
|
+
y_ptr,
|
|
805
|
+
y_q_ptr,
|
|
806
|
+
y_s_ptr,
|
|
807
|
+
group_size,
|
|
808
|
+
# Num columns of y
|
|
809
|
+
y_num_columns,
|
|
810
|
+
y_row_stride,
|
|
811
|
+
# Stride from one column to the next of y_s
|
|
812
|
+
y_s_col_stride,
|
|
813
|
+
# Avoid to divide zero
|
|
814
|
+
eps,
|
|
815
|
+
# Information for float8
|
|
816
|
+
fp8_min,
|
|
817
|
+
fp8_max,
|
|
818
|
+
use_ue8m0: tl.constexpr,
|
|
819
|
+
# Meta-parameters
|
|
820
|
+
BLOCK: tl.constexpr,
|
|
821
|
+
):
|
|
822
|
+
"""A Triton-accelerated function to perform per-token-group
|
|
823
|
+
quantization on a tensor.
|
|
824
|
+
This function converts the tensor values into float8 values.
|
|
825
|
+
"""
|
|
826
|
+
groups_per_row = y_num_columns // group_size
|
|
827
|
+
|
|
828
|
+
# Map the program id to the row of X and Y it should compute.
|
|
829
|
+
g_id = tl.program_id(0)
|
|
830
|
+
row = g_id // groups_per_row
|
|
831
|
+
row_g_id = g_id % groups_per_row
|
|
832
|
+
|
|
833
|
+
# Ensure offset calculations use int64 to prevent overflow
|
|
834
|
+
y_ptr_offset = (row.to(tl.int64) * y_row_stride) + (
|
|
835
|
+
row_g_id.to(tl.int64) * group_size
|
|
836
|
+
)
|
|
837
|
+
y_ptr += y_ptr_offset
|
|
838
|
+
|
|
839
|
+
y_q_ptr_offset = g_id.to(tl.int64) * group_size
|
|
840
|
+
y_q_ptr += y_q_ptr_offset
|
|
841
|
+
|
|
842
|
+
# Convert g_id the flattened block coordinate to 2D so we can index
|
|
843
|
+
# into the output y_scales matrix
|
|
844
|
+
blocks_per_row = y_num_columns // group_size
|
|
845
|
+
scale_col = g_id % blocks_per_row
|
|
846
|
+
scale_row = g_id // blocks_per_row
|
|
847
|
+
# Ensure offset calculation uses int64 for y_s_ptr
|
|
848
|
+
y_s_ptr_offset = (scale_col.to(tl.int64) * y_s_col_stride) + scale_row.to(tl.int64)
|
|
849
|
+
y_s_ptr += y_s_ptr_offset
|
|
850
|
+
|
|
851
|
+
cols = tl.arange(0, BLOCK) # group_size <= BLOCK
|
|
852
|
+
mask = cols < group_size
|
|
853
|
+
|
|
854
|
+
y = tl.load(y_ptr + cols, mask=mask, other=0.0).to(tl.float32)
|
|
855
|
+
# Quant
|
|
856
|
+
_absmax = tl.maximum(tl.max(tl.abs(y)), eps)
|
|
857
|
+
scale_raw = _absmax / fp8_max
|
|
858
|
+
y_s = tl.math.exp2(tl.ceil(tl.log2(scale_raw))) if use_ue8m0 else scale_raw
|
|
859
|
+
y_q = tl.clamp(y / y_s, fp8_min, fp8_max).to(y_q_ptr.dtype.element_ty)
|
|
860
|
+
|
|
861
|
+
tl.store(y_q_ptr + cols, y_q, mask=mask)
|
|
862
|
+
tl.store(y_s_ptr, y_s)
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
def per_token_group_quant_fp8(
|
|
866
|
+
x: torch.Tensor,
|
|
867
|
+
group_size: int,
|
|
868
|
+
eps: float = 1e-10,
|
|
869
|
+
dtype: torch.dtype | None = None,
|
|
870
|
+
column_major_scales: bool = False,
|
|
871
|
+
out_q: torch.Tensor | None = None,
|
|
872
|
+
use_ue8m0: bool | None = None,
|
|
873
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
874
|
+
"""Function to perform per-token-group quantization on an input tensor `x`.
|
|
875
|
+
It converts the tensor values into signed float8 values and returns the
|
|
876
|
+
quantized tensor along with the scaling factor used for quantization.
|
|
877
|
+
Args:
|
|
878
|
+
x: The input tensor with ndim >= 2.
|
|
879
|
+
group_size: The group size used for quantization.
|
|
880
|
+
eps: The minimum to avoid dividing zero.
|
|
881
|
+
dtype: The dype of output tensor. Note that only `torch.float8_e4m3fn`
|
|
882
|
+
is supported for now.
|
|
883
|
+
column_major_scales: Outputs scales in column major.
|
|
884
|
+
out_q: Optional output tensor. If not provided, function will create.
|
|
885
|
+
Returns:
|
|
886
|
+
tuple[torch.Tensor, torch.Tensor]: The quantized tensor and the
|
|
887
|
+
scaling factor.
|
|
888
|
+
"""
|
|
889
|
+
if use_ue8m0 is None:
|
|
890
|
+
use_ue8m0 = is_deep_gemm_e8m0_used()
|
|
891
|
+
dtype = current_platform.fp8_dtype() if dtype is None else dtype
|
|
892
|
+
assert x.shape[-1] % group_size == 0, (
|
|
893
|
+
f"the last dimension of `x` {x.shape[-1]} must be divisible "
|
|
894
|
+
f"by `group_size` {group_size}"
|
|
895
|
+
)
|
|
896
|
+
assert x.stride(-1) == 1, "`x` groups must be contiguous"
|
|
897
|
+
|
|
898
|
+
fp8_min, fp8_max = get_fp8_min_max()
|
|
899
|
+
|
|
900
|
+
assert out_q is None or out_q.shape == x.shape
|
|
901
|
+
x_q = out_q
|
|
902
|
+
if x_q is None:
|
|
903
|
+
x_q = torch.empty(x.shape, device=x.device, dtype=dtype)
|
|
904
|
+
|
|
905
|
+
# Allocate the scale tensor in either row- or column-major format.
|
|
906
|
+
if column_major_scales:
|
|
907
|
+
shape = (x.shape[-1] // group_size,) + x.shape[:-1]
|
|
908
|
+
x_s = torch.empty(shape, device=x.device, dtype=torch.float32).permute(-1, -2)
|
|
909
|
+
else:
|
|
910
|
+
shape = x.shape[:-1] + (x.shape[-1] // group_size,)
|
|
911
|
+
x_s = torch.empty(shape, device=x.device, dtype=torch.float32)
|
|
912
|
+
|
|
913
|
+
# prefer CUDA kernel if available
|
|
914
|
+
# TODO(bnell): this causes some fp8 moe test to fail.
|
|
915
|
+
if current_platform.is_cuda() and x.is_contiguous():
|
|
916
|
+
torch.ops._C.per_token_group_fp8_quant(
|
|
917
|
+
x, x_q, x_s, group_size, eps, fp8_min, fp8_max, use_ue8m0
|
|
918
|
+
)
|
|
919
|
+
return x_q, x_s
|
|
920
|
+
|
|
921
|
+
# TRITON FALLBACK
|
|
922
|
+
M = x.numel() // group_size
|
|
923
|
+
N = group_size
|
|
924
|
+
BLOCK = triton.next_power_of_2(N)
|
|
925
|
+
# heuristics for number of warps
|
|
926
|
+
num_warps = min(max(BLOCK // 256, 1), 8)
|
|
927
|
+
num_stages = 1
|
|
928
|
+
if column_major_scales:
|
|
929
|
+
_per_token_group_quant_fp8_colmajor[(M,)](
|
|
930
|
+
x,
|
|
931
|
+
x_q,
|
|
932
|
+
x_s,
|
|
933
|
+
group_size,
|
|
934
|
+
x.shape[1],
|
|
935
|
+
x.stride(0),
|
|
936
|
+
x_s.stride(1),
|
|
937
|
+
eps,
|
|
938
|
+
fp8_min=fp8_min,
|
|
939
|
+
fp8_max=fp8_max,
|
|
940
|
+
use_ue8m0=use_ue8m0,
|
|
941
|
+
BLOCK=BLOCK,
|
|
942
|
+
num_warps=num_warps,
|
|
943
|
+
num_stages=num_stages,
|
|
944
|
+
)
|
|
945
|
+
else:
|
|
946
|
+
_per_token_group_quant_fp8[(M,)](
|
|
947
|
+
x,
|
|
948
|
+
x_q,
|
|
949
|
+
x_s,
|
|
950
|
+
group_size,
|
|
951
|
+
x.shape[1],
|
|
952
|
+
x.stride(0),
|
|
953
|
+
eps,
|
|
954
|
+
fp8_min=fp8_min,
|
|
955
|
+
fp8_max=fp8_max,
|
|
956
|
+
use_ue8m0=use_ue8m0,
|
|
957
|
+
BLOCK=BLOCK,
|
|
958
|
+
num_warps=num_warps,
|
|
959
|
+
num_stages=num_stages,
|
|
960
|
+
)
|
|
961
|
+
|
|
962
|
+
return x_q, x_s
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
def per_token_group_quant_fp8_packed_for_deepgemm(
|
|
966
|
+
x: torch.Tensor,
|
|
967
|
+
group_size: int,
|
|
968
|
+
eps: float = 1e-10,
|
|
969
|
+
use_ue8m0: bool | None = None,
|
|
970
|
+
out_q: torch.Tensor | None = None,
|
|
971
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
972
|
+
"""FP8 per-token-group quantization for DeepGEMM.
|
|
973
|
+
|
|
974
|
+
Returns:
|
|
975
|
+
(x_q, x_s_packed)
|
|
976
|
+
x_q: FP8 activations, same shape as `x`.
|
|
977
|
+
x_s_packed: Int32 tensor with logical shape
|
|
978
|
+
[mn, ceil(num_groups_per_row / 4)], laid out with
|
|
979
|
+
TMA-aligned stride along the packed-K dimension
|
|
980
|
+
"""
|
|
981
|
+
if use_ue8m0 is None:
|
|
982
|
+
use_ue8m0 = is_deep_gemm_e8m0_used()
|
|
983
|
+
# for DeepGEMM UE8M0-packed layout we *require* UE8M0 scales.
|
|
984
|
+
assert use_ue8m0, (
|
|
985
|
+
"per_token_group_quant_fp8_packed_for_deepgemm requires UE8M0 scales."
|
|
986
|
+
)
|
|
987
|
+
|
|
988
|
+
dtype = current_platform.fp8_dtype()
|
|
989
|
+
assert x.shape[-1] % group_size == 0, (
|
|
990
|
+
f"the last dimension of `x` {x.shape[-1]} must be divisible "
|
|
991
|
+
f"by `group_size` {group_size}"
|
|
992
|
+
)
|
|
993
|
+
assert x.stride(-1) == 1, "`x` groups must be contiguous"
|
|
994
|
+
|
|
995
|
+
finfo = torch.finfo(dtype)
|
|
996
|
+
fp8_min, fp8_max = finfo.min, finfo.max
|
|
997
|
+
|
|
998
|
+
# compute DeepGEMM-style packed scale tensor shape.
|
|
999
|
+
hidden_dim = x.shape[-1]
|
|
1000
|
+
mn = x.numel() // hidden_dim
|
|
1001
|
+
num_groups_per_row = hidden_dim // group_size
|
|
1002
|
+
k_num_packed_sf_k = (num_groups_per_row + 3) // 4
|
|
1003
|
+
tma_aligned_mn = ((mn + 3) // 4) * 4
|
|
1004
|
+
|
|
1005
|
+
x_s_packed = torch.empty_strided(
|
|
1006
|
+
(mn, k_num_packed_sf_k),
|
|
1007
|
+
(1, tma_aligned_mn),
|
|
1008
|
+
device=x.device,
|
|
1009
|
+
dtype=torch.int32,
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
# CUDA kernel path only (DeepGEMM + E8M0 is CUDA-specific).
|
|
1013
|
+
assert current_platform.is_cuda(), (
|
|
1014
|
+
"per_token_group_quant_fp8_packed_for_deepgemm is only valid on CUDA "
|
|
1015
|
+
"platforms using DeepGEMM."
|
|
1016
|
+
)
|
|
1017
|
+
|
|
1018
|
+
x_contiguous = x.contiguous()
|
|
1019
|
+
if out_q is not None:
|
|
1020
|
+
x_q_local = out_q
|
|
1021
|
+
else:
|
|
1022
|
+
x_q_local = torch.empty_like(x_contiguous, device=x.device, dtype=dtype)
|
|
1023
|
+
|
|
1024
|
+
torch.ops._C.per_token_group_fp8_quant_packed(
|
|
1025
|
+
x_contiguous,
|
|
1026
|
+
x_q_local,
|
|
1027
|
+
x_s_packed,
|
|
1028
|
+
group_size,
|
|
1029
|
+
eps,
|
|
1030
|
+
fp8_min,
|
|
1031
|
+
fp8_max,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
# return a tensor with the original logical shape.
|
|
1035
|
+
x_q = x_q_local.view_as(x)
|
|
1036
|
+
return x_q, x_s_packed
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
@triton.jit
|
|
1040
|
+
def _w8a8_triton_block_scaled_mm(
|
|
1041
|
+
# Pointers to inputs and output
|
|
1042
|
+
A,
|
|
1043
|
+
B,
|
|
1044
|
+
C,
|
|
1045
|
+
As,
|
|
1046
|
+
Bs,
|
|
1047
|
+
# Shape for matmul
|
|
1048
|
+
M,
|
|
1049
|
+
N,
|
|
1050
|
+
K,
|
|
1051
|
+
# Block size for block-wise quantization
|
|
1052
|
+
group_n,
|
|
1053
|
+
group_k,
|
|
1054
|
+
# Stride for inputs and output
|
|
1055
|
+
stride_am,
|
|
1056
|
+
stride_ak,
|
|
1057
|
+
stride_bk,
|
|
1058
|
+
stride_bn,
|
|
1059
|
+
stride_cm,
|
|
1060
|
+
stride_cn,
|
|
1061
|
+
stride_As_m,
|
|
1062
|
+
stride_As_k,
|
|
1063
|
+
stride_Bs_k,
|
|
1064
|
+
stride_Bs_n,
|
|
1065
|
+
# Meta-parameters
|
|
1066
|
+
BLOCK_SIZE_M: tl.constexpr,
|
|
1067
|
+
BLOCK_SIZE_N: tl.constexpr,
|
|
1068
|
+
BLOCK_SIZE_K: tl.constexpr,
|
|
1069
|
+
GROUP_SIZE_M: tl.constexpr,
|
|
1070
|
+
):
|
|
1071
|
+
"""Triton-accelerated function used to perform linear operations (dot
|
|
1072
|
+
product) on input tensors `A` and `B` with block-wise quantization, and
|
|
1073
|
+
store the result in output tensor `C`.
|
|
1074
|
+
"""
|
|
1075
|
+
|
|
1076
|
+
pid = tl.program_id(axis=0)
|
|
1077
|
+
num_pid_m = tl.cdiv(M, BLOCK_SIZE_M)
|
|
1078
|
+
num_pid_n = tl.cdiv(N, BLOCK_SIZE_N)
|
|
1079
|
+
num_pid_in_group = GROUP_SIZE_M * num_pid_n
|
|
1080
|
+
group_id = pid // num_pid_in_group
|
|
1081
|
+
first_pid_m = group_id * GROUP_SIZE_M
|
|
1082
|
+
group_size_m = min(num_pid_m - first_pid_m, GROUP_SIZE_M)
|
|
1083
|
+
pid_m = first_pid_m + (pid % group_size_m)
|
|
1084
|
+
pid_n = (pid % num_pid_in_group) // group_size_m
|
|
1085
|
+
|
|
1086
|
+
offs_am = (pid_m * BLOCK_SIZE_M + tl.arange(0, BLOCK_SIZE_M)) % M
|
|
1087
|
+
offs_bn = (pid_n * BLOCK_SIZE_N + tl.arange(0, BLOCK_SIZE_N)) % N
|
|
1088
|
+
offs_k = tl.arange(0, BLOCK_SIZE_K)
|
|
1089
|
+
a_ptrs = A + (offs_am[:, None] * stride_am + offs_k[None, :] * stride_ak)
|
|
1090
|
+
b_ptrs = B + (offs_k[:, None] * stride_bk + offs_bn[None, :] * stride_bn)
|
|
1091
|
+
|
|
1092
|
+
As_ptrs = As + offs_am * stride_As_m
|
|
1093
|
+
offs_bsn = offs_bn // group_n
|
|
1094
|
+
Bs_ptrs = Bs + offs_bsn * stride_Bs_n
|
|
1095
|
+
|
|
1096
|
+
accumulator = tl.zeros((BLOCK_SIZE_M, BLOCK_SIZE_N), dtype=tl.float32)
|
|
1097
|
+
for k in range(0, tl.cdiv(K, BLOCK_SIZE_K)):
|
|
1098
|
+
a = tl.load(a_ptrs, mask=offs_k[None, :] < K - k * BLOCK_SIZE_K, other=0.0)
|
|
1099
|
+
b = tl.load(b_ptrs, mask=offs_k[:, None] < K - k * BLOCK_SIZE_K, other=0.0)
|
|
1100
|
+
|
|
1101
|
+
k_start = k * BLOCK_SIZE_K
|
|
1102
|
+
offs_ks = k_start // group_k
|
|
1103
|
+
a_s = tl.load(As_ptrs + offs_ks * stride_As_k)
|
|
1104
|
+
b_s = tl.load(Bs_ptrs + offs_ks * stride_Bs_k)
|
|
1105
|
+
|
|
1106
|
+
accumulator += tl.dot(a, b) * a_s[:, None] * b_s[None, :]
|
|
1107
|
+
a_ptrs += BLOCK_SIZE_K * stride_ak
|
|
1108
|
+
b_ptrs += BLOCK_SIZE_K * stride_bk
|
|
1109
|
+
|
|
1110
|
+
if C.dtype.element_ty == tl.bfloat16:
|
|
1111
|
+
c = accumulator.to(tl.bfloat16)
|
|
1112
|
+
elif C.dtype.element_ty == tl.float16:
|
|
1113
|
+
c = accumulator.to(tl.float16)
|
|
1114
|
+
else:
|
|
1115
|
+
c = accumulator.to(tl.float32)
|
|
1116
|
+
|
|
1117
|
+
offs_cm = pid_m * BLOCK_SIZE_M + tl.arange(0, BLOCK_SIZE_M)
|
|
1118
|
+
offs_cn = pid_n * BLOCK_SIZE_N + tl.arange(0, BLOCK_SIZE_N)
|
|
1119
|
+
c_ptrs = C + stride_cm * offs_cm[:, None] + stride_cn * offs_cn[None, :]
|
|
1120
|
+
c_mask = (offs_cm[:, None] < M) & (offs_cn[None, :] < N)
|
|
1121
|
+
tl.store(c_ptrs, c, mask=c_mask)
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
@functools.lru_cache
|
|
1125
|
+
def get_w8a8_block_fp8_configs(
|
|
1126
|
+
N: int, K: int, block_n: int, block_k: int
|
|
1127
|
+
) -> dict[int, Any] | None:
|
|
1128
|
+
"""
|
|
1129
|
+
Return optimized configurations for the w8a8 block fp8 kernel.
|
|
1130
|
+
The return value will be a dictionary that maps an irregular grid of
|
|
1131
|
+
batch sizes to configurations of the w8a8 block fp8 kernel. To evaluate the
|
|
1132
|
+
kernel on a given batch size bs, the closest batch size in the grid should
|
|
1133
|
+
be picked and the associated configuration chosen to invoke the kernel.
|
|
1134
|
+
"""
|
|
1135
|
+
|
|
1136
|
+
# First look up if an optimized configuration is available in the configs
|
|
1137
|
+
# directory
|
|
1138
|
+
device_name = current_platform.get_device_name().replace(" ", "_")
|
|
1139
|
+
json_file_name = f"N={N},K={K},device_name={device_name},dtype=fp8_w8a8,block_shape=[{block_n},{block_k}].json" # noqa: E501
|
|
1140
|
+
|
|
1141
|
+
config_file_path = os.path.join(
|
|
1142
|
+
os.path.dirname(os.path.realpath(__file__)), "configs", json_file_name
|
|
1143
|
+
)
|
|
1144
|
+
if os.path.exists(config_file_path):
|
|
1145
|
+
with open(config_file_path) as f:
|
|
1146
|
+
logger.info(
|
|
1147
|
+
"Using configuration from %s for W8A8 Block FP8 kernel.",
|
|
1148
|
+
config_file_path,
|
|
1149
|
+
)
|
|
1150
|
+
# If a configuration has been found, return it
|
|
1151
|
+
return {int(key): val for key, val in json.load(f).items()}
|
|
1152
|
+
|
|
1153
|
+
# If no optimized configuration is available, we will use the default
|
|
1154
|
+
# configuration
|
|
1155
|
+
logger.warning(
|
|
1156
|
+
"Using default W8A8 Block FP8 kernel config. Performance might "
|
|
1157
|
+
"be sub-optimal! Config file not found at %s",
|
|
1158
|
+
config_file_path,
|
|
1159
|
+
)
|
|
1160
|
+
return None
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
def w8a8_triton_block_scaled_mm(
|
|
1164
|
+
A: torch.Tensor,
|
|
1165
|
+
B: torch.Tensor,
|
|
1166
|
+
As: torch.Tensor,
|
|
1167
|
+
Bs: torch.Tensor,
|
|
1168
|
+
block_size: list[int],
|
|
1169
|
+
output_dtype: torch.dtype = torch.float16,
|
|
1170
|
+
) -> torch.Tensor:
|
|
1171
|
+
"""This function performs matrix multiplication with block-wise
|
|
1172
|
+
quantization.
|
|
1173
|
+
It takes two input tensors `A` and `B` with scales `As` and `Bs`.
|
|
1174
|
+
The output is returned in the specified `output_dtype`.
|
|
1175
|
+
Args:
|
|
1176
|
+
A: The input tensor, e.g., activation.
|
|
1177
|
+
B: The input tensor, e.g., weight.
|
|
1178
|
+
As: The per-token-group quantization scale for `A`.
|
|
1179
|
+
Bs: The per-block quantization scale for `B`.
|
|
1180
|
+
block_size: The block size for per-block quantization. It should
|
|
1181
|
+
be 2-dim, e.g., [128, 128].
|
|
1182
|
+
output_dytpe: The dtype of the returned tensor.
|
|
1183
|
+
Returns:
|
|
1184
|
+
torch.Tensor: The result of matmul.
|
|
1185
|
+
"""
|
|
1186
|
+
assert len(block_size) == 2
|
|
1187
|
+
block_n, block_k = block_size[0], block_size[1]
|
|
1188
|
+
|
|
1189
|
+
assert A.shape[-1] == B.shape[-1]
|
|
1190
|
+
assert A.shape[:-1] == As.shape[:-1] and A.is_contiguous()
|
|
1191
|
+
assert triton.cdiv(A.shape[-1], block_k) == As.shape[-1]
|
|
1192
|
+
M = A.numel() // A.shape[-1]
|
|
1193
|
+
|
|
1194
|
+
assert B.ndim == 2 and Bs.ndim == 2
|
|
1195
|
+
N, K = B.shape
|
|
1196
|
+
assert triton.cdiv(N, block_n) == Bs.shape[0]
|
|
1197
|
+
assert triton.cdiv(K, block_k) == Bs.shape[1]
|
|
1198
|
+
|
|
1199
|
+
C_shape = A.shape[:-1] + (N,)
|
|
1200
|
+
C = A.new_empty(C_shape, dtype=output_dtype)
|
|
1201
|
+
|
|
1202
|
+
configs = get_w8a8_block_fp8_configs(N, K, block_size[0], block_size[1])
|
|
1203
|
+
if configs:
|
|
1204
|
+
# Get the optimal config if there is one
|
|
1205
|
+
config = configs[min(configs.keys(), key=lambda x: abs(x - M))]
|
|
1206
|
+
else:
|
|
1207
|
+
# Default config
|
|
1208
|
+
# Block-wise quant: BLOCK_SIZE_N must be divisible by block_size[0]
|
|
1209
|
+
# BLOCK_SIZE_K must be divisible by block_size[1]
|
|
1210
|
+
config = {
|
|
1211
|
+
"BLOCK_SIZE_M": 64,
|
|
1212
|
+
"BLOCK_SIZE_N": block_size[0],
|
|
1213
|
+
"BLOCK_SIZE_K": block_size[1],
|
|
1214
|
+
"GROUP_SIZE_M": 32,
|
|
1215
|
+
"num_warps": 4,
|
|
1216
|
+
"num_stages": 2,
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
def grid(META):
|
|
1220
|
+
return (
|
|
1221
|
+
triton.cdiv(M, META["BLOCK_SIZE_M"]) * triton.cdiv(N, META["BLOCK_SIZE_N"]),
|
|
1222
|
+
)
|
|
1223
|
+
|
|
1224
|
+
_w8a8_triton_block_scaled_mm[grid](
|
|
1225
|
+
A,
|
|
1226
|
+
B,
|
|
1227
|
+
C,
|
|
1228
|
+
As,
|
|
1229
|
+
Bs,
|
|
1230
|
+
M,
|
|
1231
|
+
N,
|
|
1232
|
+
K,
|
|
1233
|
+
block_n,
|
|
1234
|
+
block_k,
|
|
1235
|
+
A.stride(-2),
|
|
1236
|
+
A.stride(-1),
|
|
1237
|
+
B.stride(1),
|
|
1238
|
+
B.stride(0),
|
|
1239
|
+
C.stride(-2),
|
|
1240
|
+
C.stride(-1),
|
|
1241
|
+
As.stride(-2),
|
|
1242
|
+
As.stride(-1),
|
|
1243
|
+
Bs.stride(1),
|
|
1244
|
+
Bs.stride(0),
|
|
1245
|
+
**config,
|
|
1246
|
+
)
|
|
1247
|
+
|
|
1248
|
+
return C
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
def requant_weight_ue8m0_inplace(
|
|
1252
|
+
weight: torch.Tensor,
|
|
1253
|
+
weight_scale: torch.Tensor,
|
|
1254
|
+
block_size: Sequence[int] = (128, 128),
|
|
1255
|
+
) -> None:
|
|
1256
|
+
"""Re-quantise *weight* so that its per-block scaling factors are in the
|
|
1257
|
+
UE8M0 (power-of-two) format expected by the new DeepGEMM kernels inplace.
|
|
1258
|
+
|
|
1259
|
+
Args:
|
|
1260
|
+
weight: Block-quantised weight tensor stored in `torch.float8_e4m3fn`.
|
|
1261
|
+
Expected shape `(..., M, K)`.
|
|
1262
|
+
weight_scale: Corresponding per-block scale tensor (`torch.float32`)
|
|
1263
|
+
with shape `(..., M // block_size[0], K // block_size[1])`.
|
|
1264
|
+
block_size: 2-element iterable `[block_m, block_k]` describing the
|
|
1265
|
+
block quantisation granularity.
|
|
1266
|
+
"""
|
|
1267
|
+
if weight.numel() == 0:
|
|
1268
|
+
return
|
|
1269
|
+
|
|
1270
|
+
if weight.dtype != torch.float8_e4m3fn:
|
|
1271
|
+
raise ValueError(
|
|
1272
|
+
f"Expected *weight* to be torch.float8_e4m3fn, got {weight.dtype} instead."
|
|
1273
|
+
)
|
|
1274
|
+
|
|
1275
|
+
from vllm.utils.deep_gemm import per_block_cast_to_fp8
|
|
1276
|
+
|
|
1277
|
+
block_m, block_k = int(block_size[0]), int(block_size[1])
|
|
1278
|
+
|
|
1279
|
+
# Flatten leading dimensions so we can iterate over the last two dims.
|
|
1280
|
+
leading_shape = weight.shape[:-2]
|
|
1281
|
+
if len(leading_shape) == 0:
|
|
1282
|
+
w_view = weight.unsqueeze(0)
|
|
1283
|
+
s_view = weight_scale.unsqueeze(0)
|
|
1284
|
+
else:
|
|
1285
|
+
w_view = weight.reshape(-1, weight.shape[-2], weight.shape[-1])
|
|
1286
|
+
s_view = weight_scale.reshape(-1, *weight_scale.shape[-2:])
|
|
1287
|
+
|
|
1288
|
+
num_mats = w_view.size(0)
|
|
1289
|
+
for idx in range(num_mats):
|
|
1290
|
+
w_q = w_view[idx]
|
|
1291
|
+
s_old = s_view[idx]
|
|
1292
|
+
|
|
1293
|
+
# De-quantise with the *old* scaling factors (float32).
|
|
1294
|
+
m_cur, k_cur = w_q.shape
|
|
1295
|
+
s_float = s_old.to(torch.float32)
|
|
1296
|
+
# Expand scales along rows and cols by block size, then crop.
|
|
1297
|
+
s_exp_r = torch.repeat_interleave(s_float, block_m, dim=0)
|
|
1298
|
+
s_exp = torch.repeat_interleave(s_exp_r, block_k, dim=1)
|
|
1299
|
+
s_exp = s_exp[:m_cur, :k_cur]
|
|
1300
|
+
w_dq = w_q.to(torch.float32) * s_exp
|
|
1301
|
+
# Re-quantise using power-of-two scaling (UE8M0).
|
|
1302
|
+
w_requant, s_requant = per_block_cast_to_fp8(
|
|
1303
|
+
w_dq, [block_m, block_k], use_ue8m0=True
|
|
1304
|
+
)
|
|
1305
|
+
|
|
1306
|
+
# Write back the results in-place.
|
|
1307
|
+
w_q.copy_(w_requant)
|
|
1308
|
+
s_old.copy_(s_requant)
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
def deepgemm_post_process_fp8_weight_block(
|
|
1312
|
+
wq: torch.Tensor, ws: torch.Tensor, quant_block_shape: tuple[int], use_e8m0: bool
|
|
1313
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1314
|
+
assert wq.dtype == torch.float8_e4m3fn, (
|
|
1315
|
+
"Expected quantized tensor dtype "
|
|
1316
|
+
f"to be torch.float8_e4m3fn, got {wq.dtype} instead."
|
|
1317
|
+
)
|
|
1318
|
+
assert ws.dtype == torch.float32, (
|
|
1319
|
+
f"Expected tensor scales dtype to be torch.float32, got {ws.dtype} instead"
|
|
1320
|
+
)
|
|
1321
|
+
|
|
1322
|
+
if use_e8m0:
|
|
1323
|
+
requant_weight_ue8m0_inplace(wq, ws, block_size=quant_block_shape)
|
|
1324
|
+
|
|
1325
|
+
original_ndim = wq.ndim
|
|
1326
|
+
if wq.ndim == 2:
|
|
1327
|
+
assert ws.ndim == 2
|
|
1328
|
+
wq = wq.unsqueeze(0)
|
|
1329
|
+
ws = ws.unsqueeze(0)
|
|
1330
|
+
|
|
1331
|
+
# From https://github.com/deepseek-ai/DeepGEMM/blob/c9f8b34dcdacc20aa746b786f983492c51072870/csrc/utils/layout.hpp#L46
|
|
1332
|
+
recipe = (1, 128, 128)
|
|
1333
|
+
|
|
1334
|
+
# Ref : https://github.com/deepseek-ai/DeepGEMM/blob/c9f8b34dcdacc20aa746b786f983492c51072870/csrc/apis/gemm.hpp
|
|
1335
|
+
# DeepGemm uses the `transform_sf_into_required_layout` function to
|
|
1336
|
+
# represent scales in the correct format.
|
|
1337
|
+
dg_ws = transform_sf_into_required_layout(
|
|
1338
|
+
sf=ws,
|
|
1339
|
+
mn=wq.size(1),
|
|
1340
|
+
k=wq.size(2),
|
|
1341
|
+
recipe=recipe,
|
|
1342
|
+
num_groups=wq.size(0),
|
|
1343
|
+
# is the scale factors for A in (Refers to the argument A in A @ B).
|
|
1344
|
+
# Weights are B.
|
|
1345
|
+
is_sfa=False,
|
|
1346
|
+
)
|
|
1347
|
+
|
|
1348
|
+
if original_ndim == 2:
|
|
1349
|
+
wq = wq.squeeze(0)
|
|
1350
|
+
dg_ws = dg_ws.squeeze(0)
|
|
1351
|
+
|
|
1352
|
+
return wq, dg_ws
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
def prepare_fp8_moe_layer_for_deepgemm(
|
|
1356
|
+
w13: torch.Tensor,
|
|
1357
|
+
w2: torch.Tensor,
|
|
1358
|
+
w13_scale: torch.Tensor,
|
|
1359
|
+
w2_scale: torch.Tensor,
|
|
1360
|
+
block_shape: tuple[int],
|
|
1361
|
+
):
|
|
1362
|
+
w13, w13_scale = deepgemm_post_process_fp8_weight_block(
|
|
1363
|
+
wq=w13,
|
|
1364
|
+
ws=w13_scale,
|
|
1365
|
+
quant_block_shape=block_shape,
|
|
1366
|
+
use_e8m0=is_deep_gemm_e8m0_used(),
|
|
1367
|
+
)
|
|
1368
|
+
w2, w2_scale = deepgemm_post_process_fp8_weight_block(
|
|
1369
|
+
wq=w2,
|
|
1370
|
+
ws=w2_scale,
|
|
1371
|
+
quant_block_shape=block_shape,
|
|
1372
|
+
use_e8m0=is_deep_gemm_e8m0_used(),
|
|
1373
|
+
)
|
|
1374
|
+
|
|
1375
|
+
return w13, w2, w13_scale, w2_scale
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
def _maybe_pad_fp8_weight(weight: torch.Tensor) -> torch.Tensor:
|
|
1379
|
+
"""Pad the weight tensor. This is an optimization on ROCm platform, which
|
|
1380
|
+
can benefit from tensors located far enough from one another in memory"""
|
|
1381
|
+
if (
|
|
1382
|
+
envs.VLLM_ROCM_FP8_PADDING
|
|
1383
|
+
and current_platform.is_rocm()
|
|
1384
|
+
and weight.stride(-1) == 1
|
|
1385
|
+
and (weight.stride(-2) * weight.element_size()) % 512 == 0
|
|
1386
|
+
):
|
|
1387
|
+
num_pad = 256 // weight.element_size()
|
|
1388
|
+
import torch.nn.functional as F
|
|
1389
|
+
|
|
1390
|
+
weight = F.pad(weight, (0, num_pad), "constant", 0)[..., :-num_pad]
|
|
1391
|
+
torch.cuda.empty_cache()
|
|
1392
|
+
return weight
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
def validate_fp8_block_shape(
|
|
1396
|
+
layer: torch.nn.Module,
|
|
1397
|
+
input_size: int,
|
|
1398
|
+
output_size: int,
|
|
1399
|
+
input_size_per_partition: int,
|
|
1400
|
+
output_partition_sizes: list[int],
|
|
1401
|
+
block_size: list[int],
|
|
1402
|
+
) -> None:
|
|
1403
|
+
"""Validate block quantization shapes for tensor parallelism."""
|
|
1404
|
+
from vllm.distributed import get_tensor_model_parallel_world_size
|
|
1405
|
+
|
|
1406
|
+
if getattr(layer, "allow_fp8_block_shape_mismatch", False):
|
|
1407
|
+
logger.debug(
|
|
1408
|
+
"Skipping FP8 block shape validation for layer %s due to detected"
|
|
1409
|
+
" mismatch allowance.",
|
|
1410
|
+
getattr(layer, "prefix", "<unknown>"),
|
|
1411
|
+
)
|
|
1412
|
+
return
|
|
1413
|
+
|
|
1414
|
+
tp_size = getattr(layer, "tp_size", get_tensor_model_parallel_world_size())
|
|
1415
|
+
block_n, block_k = block_size[0], block_size[1]
|
|
1416
|
+
|
|
1417
|
+
# Required by row parallel
|
|
1418
|
+
if (
|
|
1419
|
+
tp_size > 1
|
|
1420
|
+
and input_size // input_size_per_partition == tp_size
|
|
1421
|
+
and input_size_per_partition % block_k != 0
|
|
1422
|
+
):
|
|
1423
|
+
raise ValueError(
|
|
1424
|
+
f"Weight input_size_per_partition = {input_size_per_partition} "
|
|
1425
|
+
f"is not divisible by weight quantization block_k = {block_k}."
|
|
1426
|
+
)
|
|
1427
|
+
|
|
1428
|
+
# Required by column parallel or enabling merged weights
|
|
1429
|
+
is_tp_split = tp_size > 1 and output_size // sum(output_partition_sizes) == tp_size
|
|
1430
|
+
is_merged_gemm = len(output_partition_sizes) > 1
|
|
1431
|
+
if is_tp_split or is_merged_gemm:
|
|
1432
|
+
sizes_to_check = output_partition_sizes
|
|
1433
|
+
if not is_tp_split and is_merged_gemm:
|
|
1434
|
+
# In case of merged matrices, we allow the last
|
|
1435
|
+
# matrix to not be a multiple of block size
|
|
1436
|
+
sizes_to_check = output_partition_sizes[:-1]
|
|
1437
|
+
for output_partition_size in sizes_to_check:
|
|
1438
|
+
if output_partition_size % block_n != 0:
|
|
1439
|
+
raise ValueError(
|
|
1440
|
+
f"Weight output_partition_size = "
|
|
1441
|
+
f"{output_partition_size} is not divisible by "
|
|
1442
|
+
f"weight quantization block_n = {block_n}."
|
|
1443
|
+
)
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
def create_fp8_weight_parameter(
|
|
1447
|
+
output_size_per_partition: int,
|
|
1448
|
+
input_size_per_partition: int,
|
|
1449
|
+
weight_loader: Callable | None,
|
|
1450
|
+
) -> torch.nn.Parameter:
|
|
1451
|
+
"""Create FP8 weight parameter."""
|
|
1452
|
+
from vllm.model_executor.parameter import ModelWeightParameter
|
|
1453
|
+
|
|
1454
|
+
return ModelWeightParameter(
|
|
1455
|
+
data=torch.empty(
|
|
1456
|
+
output_size_per_partition,
|
|
1457
|
+
input_size_per_partition,
|
|
1458
|
+
dtype=torch.float8_e4m3fn,
|
|
1459
|
+
),
|
|
1460
|
+
input_dim=1,
|
|
1461
|
+
output_dim=0,
|
|
1462
|
+
weight_loader=weight_loader,
|
|
1463
|
+
)
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
def create_fp8_scale_parameter(
|
|
1467
|
+
parameter_type: torch.nn.Parameter,
|
|
1468
|
+
output_partition_sizes: list[int],
|
|
1469
|
+
input_size_per_partition: int,
|
|
1470
|
+
block_size: list[int] | None,
|
|
1471
|
+
weight_loader: Callable | None,
|
|
1472
|
+
) -> torch.nn.Parameter:
|
|
1473
|
+
"""Create scale parameter based on quantization strategy."""
|
|
1474
|
+
if parameter_type == ChannelQuantScaleParameter:
|
|
1475
|
+
scale = parameter_type(
|
|
1476
|
+
data=torch.empty((sum(output_partition_sizes), 1), dtype=torch.float32),
|
|
1477
|
+
output_dim=0,
|
|
1478
|
+
weight_loader=weight_loader,
|
|
1479
|
+
)
|
|
1480
|
+
elif parameter_type == BlockQuantScaleParameter:
|
|
1481
|
+
assert block_size is not None
|
|
1482
|
+
block_n, block_k = block_size[0], block_size[1]
|
|
1483
|
+
output_size_per_partition = sum(output_partition_sizes)
|
|
1484
|
+
scale = parameter_type(
|
|
1485
|
+
data=torch.empty(
|
|
1486
|
+
(output_size_per_partition + block_n - 1) // block_n,
|
|
1487
|
+
(input_size_per_partition + block_k - 1) // block_k,
|
|
1488
|
+
dtype=torch.float32,
|
|
1489
|
+
),
|
|
1490
|
+
input_dim=1,
|
|
1491
|
+
output_dim=0,
|
|
1492
|
+
weight_loader=weight_loader,
|
|
1493
|
+
)
|
|
1494
|
+
elif parameter_type == PerTensorScaleParameter:
|
|
1495
|
+
scale = parameter_type(
|
|
1496
|
+
data=torch.empty(len(output_partition_sizes), dtype=torch.float32),
|
|
1497
|
+
weight_loader=weight_loader,
|
|
1498
|
+
)
|
|
1499
|
+
else:
|
|
1500
|
+
raise ValueError(f"Unknown parameter type: {parameter_type}")
|
|
1501
|
+
|
|
1502
|
+
scale[:] = torch.finfo(torch.float32).min
|
|
1503
|
+
return scale
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
def create_fp8_input_scale(
|
|
1507
|
+
output_partition_sizes: list[int], weight_loader: Callable | None
|
|
1508
|
+
) -> torch.nn.Parameter:
|
|
1509
|
+
"""Create input scale parameter for static activation quantization."""
|
|
1510
|
+
from vllm.model_executor.parameter import PerTensorScaleParameter
|
|
1511
|
+
|
|
1512
|
+
scale = PerTensorScaleParameter(
|
|
1513
|
+
data=torch.empty(len(output_partition_sizes), dtype=torch.float32),
|
|
1514
|
+
weight_loader=weight_loader,
|
|
1515
|
+
)
|
|
1516
|
+
scale[:] = torch.finfo(torch.float32).min
|
|
1517
|
+
return scale
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
def process_fp8_weight_tensor_strategy(
|
|
1521
|
+
weight: torch.Tensor,
|
|
1522
|
+
weight_scale: torch.Tensor,
|
|
1523
|
+
logical_widths: list[int],
|
|
1524
|
+
input_scale: torch.Tensor | None = None,
|
|
1525
|
+
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor | None]:
|
|
1526
|
+
"""Process weights for tensor-wise quantization strategy."""
|
|
1527
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
1528
|
+
normalize_e4m3fn_to_e4m3fnuz,
|
|
1529
|
+
requantize_with_max_scale,
|
|
1530
|
+
)
|
|
1531
|
+
|
|
1532
|
+
if current_platform.is_fp8_fnuz():
|
|
1533
|
+
weight, weight_scale, input_scale = normalize_e4m3fn_to_e4m3fnuz(
|
|
1534
|
+
weight=weight, weight_scale=weight_scale, input_scale=input_scale
|
|
1535
|
+
)
|
|
1536
|
+
|
|
1537
|
+
# Requantize with max scale
|
|
1538
|
+
weight_scale, weight = requantize_with_max_scale(
|
|
1539
|
+
weight=weight,
|
|
1540
|
+
weight_scale=weight_scale,
|
|
1541
|
+
logical_widths=logical_widths,
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1544
|
+
weight = _maybe_pad_fp8_weight(weight)
|
|
1545
|
+
return weight, weight_scale, input_scale
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
def process_fp8_weight_channel_strategy(
|
|
1549
|
+
weight: torch.Tensor,
|
|
1550
|
+
weight_scale: torch.Tensor,
|
|
1551
|
+
input_scale: torch.Tensor | None = None,
|
|
1552
|
+
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor | None]:
|
|
1553
|
+
"""Process weights for channel-wise quantization strategy."""
|
|
1554
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
1555
|
+
normalize_e4m3fn_to_e4m3fnuz,
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
if current_platform.is_fp8_fnuz():
|
|
1559
|
+
weight, weight_scale, input_scale = normalize_e4m3fn_to_e4m3fnuz(
|
|
1560
|
+
weight=weight, weight_scale=weight_scale, input_scale=input_scale
|
|
1561
|
+
)
|
|
1562
|
+
|
|
1563
|
+
return weight, weight_scale, input_scale
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
def process_fp8_weight_block_strategy(
|
|
1567
|
+
weight: torch.Tensor,
|
|
1568
|
+
weight_scale: torch.Tensor,
|
|
1569
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1570
|
+
"""Process weights for block-wise quantization strategy."""
|
|
1571
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
1572
|
+
normalize_e4m3fn_to_e4m3fnuz,
|
|
1573
|
+
)
|
|
1574
|
+
|
|
1575
|
+
if current_platform.is_fp8_fnuz():
|
|
1576
|
+
weight, weight_scale, _ = normalize_e4m3fn_to_e4m3fnuz(
|
|
1577
|
+
weight=weight, weight_scale=weight_scale
|
|
1578
|
+
)
|
|
1579
|
+
|
|
1580
|
+
weight = _maybe_pad_fp8_weight(weight)
|
|
1581
|
+
return weight, weight_scale
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
def maybe_post_process_fp8_weight_block(layer: torch.nn.Module):
|
|
1585
|
+
assert layer.weight_block_size is not None
|
|
1586
|
+
|
|
1587
|
+
from vllm.utils.deep_gemm import (
|
|
1588
|
+
is_deep_gemm_e8m0_used,
|
|
1589
|
+
should_use_deepgemm_for_fp8_linear,
|
|
1590
|
+
)
|
|
1591
|
+
|
|
1592
|
+
# On Blackwell or Hopper, if E8M0 for DeepGemm is used, we need to
|
|
1593
|
+
# requantize the weight and input to the specific scale
|
|
1594
|
+
# at the same time.
|
|
1595
|
+
should_use_deepgemm = should_use_deepgemm_for_fp8_linear(
|
|
1596
|
+
layer.orig_dtype, layer.weight
|
|
1597
|
+
)
|
|
1598
|
+
if should_use_deepgemm:
|
|
1599
|
+
scale_attr = (
|
|
1600
|
+
"weight_scale_inv" if hasattr(layer, "weight_scale_inv") else "weight_scale"
|
|
1601
|
+
)
|
|
1602
|
+
dg_weight, dg_weight_scale = deepgemm_post_process_fp8_weight_block(
|
|
1603
|
+
wq=layer.weight.data,
|
|
1604
|
+
ws=getattr(layer, scale_attr).data,
|
|
1605
|
+
quant_block_shape=tuple(layer.weight_block_size),
|
|
1606
|
+
use_e8m0=is_deep_gemm_e8m0_used(),
|
|
1607
|
+
)
|
|
1608
|
+
replace_parameter(layer, "weight", dg_weight)
|
|
1609
|
+
replace_parameter(layer, scale_attr, dg_weight_scale)
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
def process_fp8_weight_tensor_strategy_moe(
|
|
1613
|
+
weight: torch.Tensor,
|
|
1614
|
+
weight_scales: torch.Tensor,
|
|
1615
|
+
shard_size: int,
|
|
1616
|
+
num_experts: int,
|
|
1617
|
+
is_act_and_mul: bool = True,
|
|
1618
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1619
|
+
"""Process moe weights for tensor-wise quantization strategy."""
|
|
1620
|
+
max_scales = weight_scales.max(dim=1).values
|
|
1621
|
+
|
|
1622
|
+
# For w1 case (i.e. not w13): there is already just one scale per expert.
|
|
1623
|
+
if not is_act_and_mul:
|
|
1624
|
+
assert weight_scales.shape[1] == 1
|
|
1625
|
+
# One scale per expert
|
|
1626
|
+
assert max_scales.shape == (num_experts,)
|
|
1627
|
+
return weight, max_scales
|
|
1628
|
+
|
|
1629
|
+
# For w13 case (common): require single scale for w13 per expert, but
|
|
1630
|
+
# on disk there is a scale for w1 and w3. Use the max to requantize.
|
|
1631
|
+
for expert_id in range(num_experts):
|
|
1632
|
+
start = 0
|
|
1633
|
+
for shard_id in range(2):
|
|
1634
|
+
dq_weight = per_tensor_dequantize(
|
|
1635
|
+
weight[expert_id][start : start + shard_size, :],
|
|
1636
|
+
weight_scales[expert_id][shard_id],
|
|
1637
|
+
)
|
|
1638
|
+
weight[expert_id][start : start + shard_size, :], _ = ops.scaled_fp8_quant(
|
|
1639
|
+
dq_weight, max_scales[expert_id]
|
|
1640
|
+
)
|
|
1641
|
+
start += shard_size
|
|
1642
|
+
return weight, max_scales
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
def process_fp8_input_tensor_strategy_moe(
|
|
1646
|
+
w13_input_scale: torch.Tensor,
|
|
1647
|
+
w2_input_scale: torch.Tensor,
|
|
1648
|
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
|
1649
|
+
"""Process moe input scales for tensor-wise quantization strategy."""
|
|
1650
|
+
|
|
1651
|
+
if not all_close_1d(w13_input_scale) or not all_close_1d(w2_input_scale):
|
|
1652
|
+
logger.info_once(
|
|
1653
|
+
"Found input_scales that are not equal for "
|
|
1654
|
+
"fp8 MoE layer. Using the maximum across experts "
|
|
1655
|
+
"for each layer."
|
|
1656
|
+
)
|
|
1657
|
+
|
|
1658
|
+
return w13_input_scale.max(), w2_input_scale.max()
|