vllm-cpu-amxbf16 0.9.1__cp312-cp312-manylinux_2_17_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +53 -0
- vllm/_custom_ops.py +1828 -0
- vllm/_ipex_ops.py +244 -0
- vllm/_version.py +34 -0
- vllm/adapter_commons/__init__.py +0 -0
- vllm/adapter_commons/layers.py +16 -0
- vllm/adapter_commons/models.py +106 -0
- vllm/adapter_commons/request.py +26 -0
- vllm/adapter_commons/utils.py +93 -0
- vllm/adapter_commons/worker_manager.py +39 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +45 -0
- vllm/assets/base.py +41 -0
- vllm/assets/image.py +34 -0
- vllm/assets/video.py +115 -0
- vllm/attention/__init__.py +20 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +308 -0
- vllm/attention/backends/blocksparse_attn.py +461 -0
- vllm/attention/backends/cpu_mla.py +307 -0
- vllm/attention/backends/dual_chunk_flash_attn.py +1498 -0
- vllm/attention/backends/flash_attn.py +1003 -0
- vllm/attention/backends/flashinfer.py +1104 -0
- vllm/attention/backends/flashmla.py +244 -0
- vllm/attention/backends/hpu_attn.py +313 -0
- vllm/attention/backends/ipex_attn.py +398 -0
- vllm/attention/backends/mla/__init__.py +0 -0
- vllm/attention/backends/mla/common.py +1385 -0
- vllm/attention/backends/pallas.py +351 -0
- vllm/attention/backends/placeholder_attn.py +400 -0
- vllm/attention/backends/rocm_aiter_mla.py +435 -0
- vllm/attention/backends/rocm_flash_attn.py +975 -0
- vllm/attention/backends/torch_sdpa.py +703 -0
- vllm/attention/backends/triton_mla.py +115 -0
- vllm/attention/backends/utils.py +610 -0
- vllm/attention/backends/xformers.py +802 -0
- vllm/attention/layer.py +468 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/blocksparse_attention/__init__.py +0 -0
- vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py +433 -0
- vllm/attention/ops/blocksparse_attention/interface.py +239 -0
- vllm/attention/ops/blocksparse_attention/utils.py +246 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +368 -0
- vllm/attention/ops/flashmla.py +116 -0
- vllm/attention/ops/hpu_paged_attn.py +88 -0
- vllm/attention/ops/ipex_attn.py +195 -0
- vllm/attention/ops/merge_attn_states.py +43 -0
- vllm/attention/ops/nki_flash_attn.py +906 -0
- vllm/attention/ops/paged_attn.py +256 -0
- vllm/attention/ops/prefix_prefill.py +902 -0
- vllm/attention/ops/rocm_aiter_mla.py +100 -0
- vllm/attention/ops/rocm_aiter_paged_attn.py +102 -0
- vllm/attention/ops/triton_decode_attention.py +674 -0
- vllm/attention/ops/triton_flash_attention.py +979 -0
- vllm/attention/ops/triton_merge_attn_states.py +97 -0
- vllm/attention/ops/triton_unified_attention.py +334 -0
- vllm/attention/selector.py +187 -0
- vllm/attention/utils/fa_utils.py +55 -0
- vllm/beam_search.py +87 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +1185 -0
- vllm/benchmarks/endpoint_request_func.py +381 -0
- vllm/benchmarks/latency.py +168 -0
- vllm/benchmarks/serve.py +1135 -0
- vllm/benchmarks/throughput.py +609 -0
- vllm/benchmarks/utils.py +70 -0
- vllm/collect_env.py +820 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +89 -0
- vllm/compilation/backends.py +563 -0
- vllm/compilation/base_piecewise_backend.py +72 -0
- vllm/compilation/collective_fusion.py +127 -0
- vllm/compilation/compiler_interface.py +544 -0
- vllm/compilation/counter.py +38 -0
- vllm/compilation/cuda_piecewise_backend.py +214 -0
- vllm/compilation/decorators.py +250 -0
- vllm/compilation/fix_functionalization.py +191 -0
- vllm/compilation/fusion.py +618 -0
- vllm/compilation/fx_utils.py +62 -0
- vllm/compilation/inductor_pass.py +115 -0
- vllm/compilation/monitor.py +39 -0
- vllm/compilation/multi_output_match.py +109 -0
- vllm/compilation/noop_elimination.py +137 -0
- vllm/compilation/pass_manager.py +78 -0
- vllm/compilation/sequence_parallelism.py +268 -0
- vllm/compilation/torch25_custom_graph_pass.py +42 -0
- vllm/compilation/vllm_inductor_pass.py +67 -0
- vllm/compilation/wrapper.py +135 -0
- vllm/config.py +4746 -0
- vllm/connections.py +174 -0
- vllm/core/__init__.py +0 -0
- vllm/core/block/__init__.py +0 -0
- vllm/core/block/block_table.py +399 -0
- vllm/core/block/common.py +371 -0
- vllm/core/block/cpu_gpu_block_allocator.py +441 -0
- vllm/core/block/interfaces.py +319 -0
- vllm/core/block/naive_block.py +466 -0
- vllm/core/block/prefix_caching_block.py +1135 -0
- vllm/core/block/utils.py +28 -0
- vllm/core/block_manager.py +521 -0
- vllm/core/evictor.py +157 -0
- vllm/core/interfaces.py +135 -0
- vllm/core/placeholder_block_space_manager.py +100 -0
- vllm/core/scheduler.py +2093 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +281 -0
- vllm/distributed/__init__.py +6 -0
- vllm/distributed/communication_op.py +41 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/all2all.py +264 -0
- vllm/distributed/device_communicators/base_device_communicator.py +260 -0
- vllm/distributed/device_communicators/cpu_communicator.py +145 -0
- vllm/distributed/device_communicators/cuda_communicator.py +176 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +180 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +304 -0
- vllm/distributed/device_communicators/custom_all_reduce_utils.py +259 -0
- vllm/distributed/device_communicators/hpu_communicator.py +46 -0
- vllm/distributed/device_communicators/neuron_communicator.py +20 -0
- vllm/distributed/device_communicators/pynccl.py +218 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +341 -0
- vllm/distributed/device_communicators/shm_broadcast.py +585 -0
- vllm/distributed/device_communicators/tpu_communicator.py +103 -0
- vllm/distributed/device_communicators/xpu_communicator.py +55 -0
- vllm/distributed/kv_events.py +356 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +12 -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 +128 -0
- vllm/distributed/kv_transfer/kv_connector/factory.py +128 -0
- vllm/distributed/kv_transfer/kv_connector/lmcache_connector.py +99 -0
- vllm/distributed/kv_transfer/kv_connector/mooncake_store_connector.py +203 -0
- vllm/distributed/kv_transfer/kv_connector/simple_connector.py +329 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +108 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +6 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +283 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +134 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +201 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +1030 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +384 -0
- vllm/distributed/kv_transfer/kv_connector_agent.py +77 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +175 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +161 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +237 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +67 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +280 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +280 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +71 -0
- vllm/distributed/parallel_state.py +1296 -0
- vllm/distributed/tpu_distributed_utils.py +177 -0
- vllm/distributed/utils.py +536 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +1708 -0
- vllm/engine/async_llm_engine.py +1200 -0
- vllm/engine/async_timeout.py +173 -0
- vllm/engine/llm_engine.py +2097 -0
- vllm/engine/metrics.py +629 -0
- vllm/engine/metrics_types.py +94 -0
- vllm/engine/multiprocessing/__init__.py +148 -0
- vllm/engine/multiprocessing/client.py +681 -0
- vllm/engine/multiprocessing/engine.py +460 -0
- vllm/engine/output_processor/__init__.py +0 -0
- vllm/engine/output_processor/interfaces.py +75 -0
- vllm/engine/output_processor/multi_step.py +216 -0
- vllm/engine/output_processor/single_step.py +145 -0
- vllm/engine/output_processor/stop_checker.py +131 -0
- vllm/engine/output_processor/util.py +28 -0
- vllm/engine/protocol.py +317 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/api_server.py +178 -0
- vllm/entrypoints/chat_utils.py +1299 -0
- vllm/entrypoints/cli/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/base.py +39 -0
- vllm/entrypoints/cli/benchmark/latency.py +30 -0
- vllm/entrypoints/cli/benchmark/main.py +54 -0
- vllm/entrypoints/cli/benchmark/serve.py +30 -0
- vllm/entrypoints/cli/benchmark/throughput.py +30 -0
- vllm/entrypoints/cli/collect_env.py +35 -0
- vllm/entrypoints/cli/main.py +65 -0
- vllm/entrypoints/cli/openai.py +205 -0
- vllm/entrypoints/cli/run_batch.py +62 -0
- vllm/entrypoints/cli/serve.py +328 -0
- vllm/entrypoints/cli/types.py +25 -0
- vllm/entrypoints/launcher.py +147 -0
- vllm/entrypoints/llm.py +1544 -0
- vllm/entrypoints/logger.py +50 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +1387 -0
- vllm/entrypoints/openai/cli_args.py +315 -0
- vllm/entrypoints/openai/logits_processors.py +90 -0
- vllm/entrypoints/openai/protocol.py +1913 -0
- vllm/entrypoints/openai/run_batch.py +463 -0
- vllm/entrypoints/openai/serving_chat.py +1221 -0
- vllm/entrypoints/openai/serving_classification.py +160 -0
- vllm/entrypoints/openai/serving_completion.py +592 -0
- vllm/entrypoints/openai/serving_embedding.py +201 -0
- vllm/entrypoints/openai/serving_engine.py +986 -0
- vllm/entrypoints/openai/serving_models.py +315 -0
- vllm/entrypoints/openai/serving_pooling.py +232 -0
- vllm/entrypoints/openai/serving_score.py +433 -0
- vllm/entrypoints/openai/serving_tokenization.py +157 -0
- vllm/entrypoints/openai/serving_transcription.py +424 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +23 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +164 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +370 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +259 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +237 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +371 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +216 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +308 -0
- vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +316 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +267 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +369 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +112 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +308 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +124 -0
- vllm/entrypoints/score_utils.py +50 -0
- vllm/entrypoints/ssl.py +75 -0
- vllm/entrypoints/utils.py +233 -0
- vllm/env_override.py +41 -0
- vllm/envs.py +944 -0
- vllm/executor/__init__.py +0 -0
- vllm/executor/executor_base.py +401 -0
- vllm/executor/mp_distributed_executor.py +244 -0
- vllm/executor/msgspec_utils.py +30 -0
- vllm/executor/multiproc_worker_utils.py +313 -0
- vllm/executor/ray_distributed_executor.py +701 -0
- vllm/executor/ray_utils.py +399 -0
- vllm/executor/uniproc_executor.py +139 -0
- vllm/forward_context.py +179 -0
- vllm/inputs/__init__.py +41 -0
- vllm/inputs/data.py +331 -0
- vllm/inputs/parse.py +151 -0
- vllm/inputs/preprocess.py +909 -0
- vllm/inputs/registry.py +237 -0
- vllm/jsontree.py +80 -0
- vllm/logger.py +212 -0
- vllm/logging_utils/__init__.py +8 -0
- vllm/logging_utils/dump_input.py +85 -0
- vllm/logging_utils/formatter.py +18 -0
- vllm/logits_process.py +119 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/fully_sharded_layers.py +355 -0
- vllm/lora/layers.py +1285 -0
- vllm/lora/lora.py +199 -0
- vllm/lora/models.py +818 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/torch_ops/__init__.py +16 -0
- vllm/lora/ops/torch_ops/lora_ops.py +119 -0
- vllm/lora/ops/triton_ops/__init__.py +12 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +243 -0
- vllm/lora/ops/triton_ops/lora_expand_op.py +290 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +148 -0
- vllm/lora/ops/triton_ops/lora_shrink_op.py +244 -0
- vllm/lora/ops/triton_ops/utils.py +120 -0
- vllm/lora/ops/xla_ops/__init__.py +7 -0
- vllm/lora/ops/xla_ops/lora_ops.py +145 -0
- vllm/lora/peft_helper.py +136 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +485 -0
- vllm/lora/punica_wrapper/punica_cpu.py +349 -0
- vllm/lora/punica_wrapper/punica_gpu.py +290 -0
- vllm/lora/punica_wrapper/punica_hpu.py +145 -0
- vllm/lora/punica_wrapper/punica_selector.py +20 -0
- vllm/lora/punica_wrapper/punica_tpu.py +405 -0
- vllm/lora/punica_wrapper/utils.py +164 -0
- vllm/lora/request.py +99 -0
- vllm/lora/resolver.py +85 -0
- vllm/lora/utils.py +240 -0
- vllm/lora/worker_manager.py +259 -0
- vllm/model_executor/__init__.py +16 -0
- vllm/model_executor/custom_op.py +152 -0
- vllm/model_executor/guided_decoding/__init__.py +181 -0
- vllm/model_executor/guided_decoding/guidance_decoding.py +63 -0
- vllm/model_executor/guided_decoding/guidance_logits_processors.py +104 -0
- vllm/model_executor/guided_decoding/guided_fields.py +41 -0
- vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py +67 -0
- vllm/model_executor/guided_decoding/outlines_decoding.py +155 -0
- vllm/model_executor/guided_decoding/outlines_logits_processors.py +284 -0
- vllm/model_executor/guided_decoding/utils.py +242 -0
- vllm/model_executor/guided_decoding/xgrammar_decoding.py +426 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +369 -0
- vllm/model_executor/layers/fused_moe/__init__.py +54 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +125 -0
- vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +117 -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=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 +218 -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=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=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=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=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=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_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.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=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=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.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=96,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.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=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=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=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=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=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=NVIDIA_A800-SXM4-80GB.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=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=64,device_name=NVIDIA_A800-SXM4-80GB.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=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=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=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=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=896,device_name=NVIDIA_H20.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.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/cutlass_moe.py +461 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +240 -0
- vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +240 -0
- vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +186 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +775 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +232 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +1724 -0
- vllm/model_executor/layers/fused_moe/layer.py +1535 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +446 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +243 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +80 -0
- vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +190 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +159 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +69 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +421 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +117 -0
- vllm/model_executor/layers/fused_moe/utils.py +98 -0
- vllm/model_executor/layers/layernorm.py +288 -0
- vllm/model_executor/layers/lightning_attn.py +652 -0
- vllm/model_executor/layers/linear.py +1524 -0
- vllm/model_executor/layers/logits_processor.py +197 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/mamba2_metadata.py +125 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +245 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +616 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +105 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +414 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +262 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +589 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +751 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +232 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +206 -0
- vllm/model_executor/layers/pooler.py +350 -0
- vllm/model_executor/layers/quantization/__init__.py +157 -0
- vllm/model_executor/layers/quantization/aqlm.py +376 -0
- vllm/model_executor/layers/quantization/auto_round.py +310 -0
- vllm/model_executor/layers/quantization/awq.py +194 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +519 -0
- vllm/model_executor/layers/quantization/awq_triton.py +320 -0
- vllm/model_executor/layers/quantization/base_config.py +151 -0
- vllm/model_executor/layers/quantization/bitblas.py +461 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +396 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +668 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +1260 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +24 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +358 -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 +160 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +93 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +178 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +121 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +150 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +111 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +201 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +206 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +195 -0
- vllm/model_executor/layers/quantization/experts_int8.py +196 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +172 -0
- vllm/model_executor/layers/quantization/fp8.py +906 -0
- vllm/model_executor/layers/quantization/gguf.py +565 -0
- vllm/model_executor/layers/quantization/gptq.py +278 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +445 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +648 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +297 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +332 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +250 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +90 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +83 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +116 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +300 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +143 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +120 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +131 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +67 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +87 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +120 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +137 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +41 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +105 -0
- vllm/model_executor/layers/quantization/kv_cache.py +139 -0
- vllm/model_executor/layers/quantization/marlin.py +261 -0
- vllm/model_executor/layers/quantization/modelopt.py +737 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +449 -0
- vllm/model_executor/layers/quantization/neuron_quant.py +76 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +127 -0
- vllm/model_executor/layers/quantization/qqq.py +275 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +441 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +237 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w4a4_mxfp4.py +126 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +146 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +122 -0
- vllm/model_executor/layers/quantization/quark/utils.py +105 -0
- vllm/model_executor/layers/quantization/schema.py +86 -0
- vllm/model_executor/layers/quantization/torchao.py +161 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +121 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +52 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +208 -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=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=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=4608,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +18 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +618 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +95 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +485 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +40 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +33 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +476 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +283 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +325 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +165 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +464 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py +126 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +45 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +104 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +573 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +405 -0
- vllm/model_executor/layers/rejection_sampler.py +406 -0
- vllm/model_executor/layers/resampler.py +270 -0
- vllm/model_executor/layers/rotary_embedding.py +1862 -0
- vllm/model_executor/layers/sampler.py +1204 -0
- vllm/model_executor/layers/spec_decode_base_sampler.py +259 -0
- vllm/model_executor/layers/typical_acceptance_sampler.py +166 -0
- vllm/model_executor/layers/utils.py +95 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +487 -0
- vllm/model_executor/model_loader/__init__.py +76 -0
- vllm/model_executor/model_loader/base_loader.py +43 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +570 -0
- vllm/model_executor/model_loader/default_loader.py +282 -0
- vllm/model_executor/model_loader/dummy_loader.py +27 -0
- vllm/model_executor/model_loader/gguf_loader.py +120 -0
- vllm/model_executor/model_loader/neuron.py +476 -0
- vllm/model_executor/model_loader/neuronx_distributed.py +685 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +109 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +201 -0
- vllm/model_executor/model_loader/tensorizer.py +600 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +123 -0
- vllm/model_executor/model_loader/tpu.py +112 -0
- vllm/model_executor/model_loader/utils.py +302 -0
- vllm/model_executor/model_loader/weight_utils.py +782 -0
- vllm/model_executor/models/__init__.py +28 -0
- vllm/model_executor/models/adapters.py +248 -0
- vllm/model_executor/models/aimv2.py +246 -0
- vllm/model_executor/models/arctic.py +559 -0
- vllm/model_executor/models/aria.py +657 -0
- vllm/model_executor/models/aya_vision.py +466 -0
- vllm/model_executor/models/baichuan.py +474 -0
- vllm/model_executor/models/bamba.py +543 -0
- vllm/model_executor/models/bart.py +938 -0
- vllm/model_executor/models/bert.py +523 -0
- vllm/model_executor/models/bert_with_rope.py +769 -0
- vllm/model_executor/models/blip.py +339 -0
- vllm/model_executor/models/blip2.py +718 -0
- vllm/model_executor/models/bloom.py +373 -0
- vllm/model_executor/models/chameleon.py +1136 -0
- vllm/model_executor/models/chatglm.py +478 -0
- vllm/model_executor/models/clip.py +407 -0
- vllm/model_executor/models/commandr.py +472 -0
- vllm/model_executor/models/constant_size_cache.py +137 -0
- vllm/model_executor/models/dbrx.py +472 -0
- vllm/model_executor/models/deepseek.py +486 -0
- vllm/model_executor/models/deepseek_mtp.py +269 -0
- vllm/model_executor/models/deepseek_v2.py +843 -0
- vllm/model_executor/models/deepseek_vl2.py +648 -0
- vllm/model_executor/models/eagle.py +260 -0
- vllm/model_executor/models/exaone.py +551 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +510 -0
- vllm/model_executor/models/falcon_h1.py +685 -0
- vllm/model_executor/models/florence2.py +1103 -0
- vllm/model_executor/models/fuyu.py +389 -0
- vllm/model_executor/models/gemma.py +425 -0
- vllm/model_executor/models/gemma2.py +425 -0
- vllm/model_executor/models/gemma3.py +533 -0
- vllm/model_executor/models/gemma3_mm.py +709 -0
- vllm/model_executor/models/glm.py +23 -0
- vllm/model_executor/models/glm4.py +305 -0
- vllm/model_executor/models/glm4v.py +648 -0
- vllm/model_executor/models/gpt2.py +328 -0
- vllm/model_executor/models/gpt_bigcode.py +335 -0
- vllm/model_executor/models/gpt_j.py +339 -0
- vllm/model_executor/models/gpt_neox.py +332 -0
- vllm/model_executor/models/granite.py +493 -0
- vllm/model_executor/models/granite_speech.py +779 -0
- vllm/model_executor/models/granitemoe.py +437 -0
- vllm/model_executor/models/granitemoehybrid.py +586 -0
- vllm/model_executor/models/granitemoeshared.py +341 -0
- vllm/model_executor/models/gritlm.py +224 -0
- vllm/model_executor/models/grok1.py +546 -0
- vllm/model_executor/models/h2ovl.py +546 -0
- vllm/model_executor/models/idefics2_vision_model.py +389 -0
- vllm/model_executor/models/idefics3.py +776 -0
- vllm/model_executor/models/interfaces.py +572 -0
- vllm/model_executor/models/interfaces_base.py +164 -0
- vllm/model_executor/models/intern_vit.py +480 -0
- vllm/model_executor/models/internlm2.py +455 -0
- vllm/model_executor/models/internlm2_ve.py +147 -0
- vllm/model_executor/models/internvl.py +1418 -0
- vllm/model_executor/models/jais.py +373 -0
- vllm/model_executor/models/jamba.py +592 -0
- vllm/model_executor/models/kimi_vl.py +577 -0
- vllm/model_executor/models/llama.py +644 -0
- vllm/model_executor/models/llama4.py +532 -0
- vllm/model_executor/models/llama_eagle.py +165 -0
- vllm/model_executor/models/llama_eagle3.py +263 -0
- vllm/model_executor/models/llava.py +866 -0
- vllm/model_executor/models/llava_next.py +586 -0
- vllm/model_executor/models/llava_next_video.py +471 -0
- vllm/model_executor/models/llava_onevision.py +956 -0
- vllm/model_executor/models/mamba.py +273 -0
- vllm/model_executor/models/mamba2.py +308 -0
- vllm/model_executor/models/mamba_cache.py +76 -0
- vllm/model_executor/models/medusa.py +219 -0
- vllm/model_executor/models/mimo.py +192 -0
- vllm/model_executor/models/mimo_mtp.py +285 -0
- vllm/model_executor/models/minicpm.py +592 -0
- vllm/model_executor/models/minicpm3.py +230 -0
- vllm/model_executor/models/minicpm_eagle.py +391 -0
- vllm/model_executor/models/minicpmo.py +759 -0
- vllm/model_executor/models/minicpmv.py +1287 -0
- vllm/model_executor/models/minimax_cache.py +36 -0
- vllm/model_executor/models/minimax_text_01.py +1301 -0
- vllm/model_executor/models/minimax_vl_01.py +364 -0
- vllm/model_executor/models/mistral3.py +604 -0
- vllm/model_executor/models/mixtral.py +488 -0
- vllm/model_executor/models/mixtral_quant.py +453 -0
- vllm/model_executor/models/mllama.py +1624 -0
- vllm/model_executor/models/mllama4.py +938 -0
- vllm/model_executor/models/mlp_speculator.py +206 -0
- vllm/model_executor/models/modernbert.py +331 -0
- vllm/model_executor/models/module_mapping.py +72 -0
- vllm/model_executor/models/molmo.py +1568 -0
- vllm/model_executor/models/moonvit.py +630 -0
- vllm/model_executor/models/mpt.py +331 -0
- vllm/model_executor/models/nemotron.py +508 -0
- vllm/model_executor/models/nemotron_h.py +573 -0
- vllm/model_executor/models/nemotron_nas.py +484 -0
- vllm/model_executor/models/nvlm_d.py +216 -0
- vllm/model_executor/models/olmo.py +389 -0
- vllm/model_executor/models/olmo2.py +414 -0
- vllm/model_executor/models/olmoe.py +468 -0
- vllm/model_executor/models/opt.py +412 -0
- vllm/model_executor/models/orion.py +349 -0
- vllm/model_executor/models/ovis.py +567 -0
- vllm/model_executor/models/paligemma.py +398 -0
- vllm/model_executor/models/persimmon.py +344 -0
- vllm/model_executor/models/phi.py +356 -0
- vllm/model_executor/models/phi3.py +19 -0
- vllm/model_executor/models/phi3_small.py +465 -0
- vllm/model_executor/models/phi3v.py +723 -0
- vllm/model_executor/models/phi4mm.py +1246 -0
- vllm/model_executor/models/phi4mm_audio.py +1233 -0
- vllm/model_executor/models/phi4mm_utils.py +1884 -0
- vllm/model_executor/models/phimoe.py +665 -0
- vllm/model_executor/models/pixtral.py +1316 -0
- vllm/model_executor/models/plamo2.py +738 -0
- vllm/model_executor/models/prithvi_geospatial_mae.py +232 -0
- vllm/model_executor/models/qwen.py +362 -0
- vllm/model_executor/models/qwen2.py +497 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +904 -0
- vllm/model_executor/models/qwen2_5_vl.py +1166 -0
- vllm/model_executor/models/qwen2_audio.py +410 -0
- vllm/model_executor/models/qwen2_moe.py +540 -0
- vllm/model_executor/models/qwen2_rm.py +132 -0
- vllm/model_executor/models/qwen2_vl.py +1405 -0
- vllm/model_executor/models/qwen3.py +321 -0
- vllm/model_executor/models/qwen3_moe.py +535 -0
- vllm/model_executor/models/qwen_vl.py +785 -0
- vllm/model_executor/models/registry.py +622 -0
- vllm/model_executor/models/roberta.py +276 -0
- vllm/model_executor/models/siglip.py +524 -0
- vllm/model_executor/models/skyworkr1v.py +951 -0
- vllm/model_executor/models/smolvlm.py +52 -0
- vllm/model_executor/models/solar.py +506 -0
- vllm/model_executor/models/stablelm.py +343 -0
- vllm/model_executor/models/starcoder2.py +356 -0
- vllm/model_executor/models/tarsier.py +643 -0
- vllm/model_executor/models/telechat2.py +140 -0
- vllm/model_executor/models/teleflm.py +79 -0
- vllm/model_executor/models/transformers.py +508 -0
- vllm/model_executor/models/ultravox.py +656 -0
- vllm/model_executor/models/utils.py +731 -0
- vllm/model_executor/models/vision.py +147 -0
- vllm/model_executor/models/whisper.py +747 -0
- vllm/model_executor/models/zamba2.py +1009 -0
- vllm/model_executor/parameter.py +459 -0
- vllm/model_executor/pooling_metadata.py +72 -0
- vllm/model_executor/sampling_metadata.py +597 -0
- vllm/model_executor/utils.py +77 -0
- vllm/multimodal/__init__.py +33 -0
- vllm/multimodal/audio.py +106 -0
- vllm/multimodal/base.py +219 -0
- vllm/multimodal/hasher.py +118 -0
- vllm/multimodal/image.py +97 -0
- vllm/multimodal/inputs.py +876 -0
- vllm/multimodal/parse.py +461 -0
- vllm/multimodal/processing.py +1895 -0
- vllm/multimodal/profiling.py +258 -0
- vllm/multimodal/registry.py +331 -0
- vllm/multimodal/utils.py +436 -0
- vllm/multimodal/video.py +198 -0
- vllm/outputs.py +512 -0
- vllm/platforms/__init__.py +291 -0
- vllm/platforms/cpu.py +266 -0
- vllm/platforms/cuda.py +526 -0
- vllm/platforms/hpu.py +106 -0
- vllm/platforms/interface.py +538 -0
- vllm/platforms/neuron.py +150 -0
- vllm/platforms/rocm.py +435 -0
- vllm/platforms/tpu.py +216 -0
- vllm/platforms/xpu.py +156 -0
- vllm/plugins/__init__.py +94 -0
- vllm/plugins/lora_resolvers/README.md +15 -0
- vllm/plugins/lora_resolvers/__init__.py +0 -0
- vllm/plugins/lora_resolvers/filesystem_resolver.py +50 -0
- vllm/pooling_params.py +54 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/layerwise_profile.py +375 -0
- vllm/profiler/utils.py +148 -0
- vllm/prompt_adapter/__init__.py +0 -0
- vllm/prompt_adapter/layers.py +83 -0
- vllm/prompt_adapter/models.py +358 -0
- vllm/prompt_adapter/request.py +37 -0
- vllm/prompt_adapter/utils.py +98 -0
- vllm/prompt_adapter/worker_manager.py +179 -0
- vllm/py.typed +2 -0
- vllm/reasoning/__init__.py +15 -0
- vllm/reasoning/abs_reasoning_parsers.py +192 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +173 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/qwen3_reasoning_parser.py +151 -0
- vllm/sampling_params.py +602 -0
- vllm/scalar_type.py +347 -0
- vllm/scripts.py +15 -0
- vllm/sequence.py +1568 -0
- vllm/spec_decode/__init__.py +0 -0
- vllm/spec_decode/batch_expansion.py +506 -0
- vllm/spec_decode/draft_model_runner.py +349 -0
- vllm/spec_decode/interfaces.py +99 -0
- vllm/spec_decode/medusa_worker.py +138 -0
- vllm/spec_decode/metrics.py +213 -0
- vllm/spec_decode/mlp_speculator_worker.py +94 -0
- vllm/spec_decode/mqa_scorer.py +160 -0
- vllm/spec_decode/multi_step_worker.py +423 -0
- vllm/spec_decode/ngram_worker.py +196 -0
- vllm/spec_decode/proposer_worker_base.py +59 -0
- vllm/spec_decode/smaller_tp_proposer_worker.py +196 -0
- vllm/spec_decode/spec_decode_worker.py +1326 -0
- vllm/spec_decode/target_model_runner.py +45 -0
- vllm/spec_decode/top1_proposer.py +275 -0
- vllm/spec_decode/util.py +277 -0
- vllm/test_utils.py +130 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tracing.py +131 -0
- vllm/transformers_utils/__init__.py +24 -0
- vllm/transformers_utils/chat_templates/__init__.py +5 -0
- vllm/transformers_utils/chat_templates/registry.py +60 -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_vl2.jinja +23 -0
- vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
- vllm/transformers_utils/config.py +887 -0
- vllm/transformers_utils/configs/__init__.py +61 -0
- vllm/transformers_utils/configs/arctic.py +207 -0
- vllm/transformers_utils/configs/chatglm.py +72 -0
- vllm/transformers_utils/configs/cohere2.py +195 -0
- vllm/transformers_utils/configs/dbrx.py +280 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +216 -0
- vllm/transformers_utils/configs/eagle.py +85 -0
- vllm/transformers_utils/configs/exaone.py +190 -0
- vllm/transformers_utils/configs/falcon.py +90 -0
- vllm/transformers_utils/configs/h2ovl.py +16 -0
- vllm/transformers_utils/configs/internvl.py +54 -0
- vllm/transformers_utils/configs/jais.py +238 -0
- vllm/transformers_utils/configs/kimi_vl.py +37 -0
- vllm/transformers_utils/configs/medusa.py +63 -0
- vllm/transformers_utils/configs/minimax_text_01.py +70 -0
- vllm/transformers_utils/configs/minimax_vl_01.py +71 -0
- vllm/transformers_utils/configs/mllama.py +31 -0
- vllm/transformers_utils/configs/mlp_speculator.py +68 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/mpt.py +180 -0
- vllm/transformers_utils/configs/nemotron.py +205 -0
- vllm/transformers_utils/configs/nemotron_h.py +258 -0
- vllm/transformers_utils/configs/nvlm_d.py +15 -0
- vllm/transformers_utils/configs/ovis.py +184 -0
- vllm/transformers_utils/configs/skyworkr1v.py +54 -0
- vllm/transformers_utils/configs/solar.py +247 -0
- vllm/transformers_utils/configs/telechat2.py +64 -0
- vllm/transformers_utils/configs/ultravox.py +108 -0
- vllm/transformers_utils/detokenizer.py +168 -0
- vllm/transformers_utils/detokenizer_utils.py +189 -0
- vllm/transformers_utils/processor.py +221 -0
- vllm/transformers_utils/processors/__init__.py +8 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +363 -0
- vllm/transformers_utils/processors/ovis.py +420 -0
- vllm/transformers_utils/s3_utils.py +162 -0
- vllm/transformers_utils/tokenizer.py +302 -0
- vllm/transformers_utils/tokenizer_base.py +149 -0
- vllm/transformers_utils/tokenizer_group.py +120 -0
- vllm/transformers_utils/tokenizers/__init__.py +10 -0
- vllm/transformers_utils/tokenizers/mistral.py +493 -0
- vllm/transformers_utils/utils.py +99 -0
- vllm/triton_utils/__init__.py +14 -0
- vllm/triton_utils/importing.py +50 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +256 -0
- vllm/utils.py +2910 -0
- vllm/v1/__init__.py +0 -0
- vllm/v1/attention/__init__.py +0 -0
- vllm/v1/attention/backends/__init__.py +0 -0
- vllm/v1/attention/backends/cpu_attn.py +163 -0
- vllm/v1/attention/backends/flash_attn.py +869 -0
- vllm/v1/attention/backends/flashinfer.py +651 -0
- vllm/v1/attention/backends/flex_attention.py +477 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/common.py +931 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +97 -0
- vllm/v1/attention/backends/mla/flashmla.py +152 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +220 -0
- vllm/v1/attention/backends/mla/triton_mla.py +120 -0
- vllm/v1/attention/backends/pallas.py +240 -0
- vllm/v1/attention/backends/triton_attn.py +285 -0
- vllm/v1/attention/backends/utils.py +52 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +349 -0
- vllm/v1/core/encoder_cache_manager.py +150 -0
- vllm/v1/core/kv_cache_coordinator.py +363 -0
- vllm/v1/core/kv_cache_manager.py +392 -0
- vllm/v1/core/kv_cache_utils.py +996 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/interface.py +150 -0
- vllm/v1/core/sched/output.py +154 -0
- vllm/v1/core/sched/scheduler.py +1044 -0
- vllm/v1/core/sched/utils.py +23 -0
- vllm/v1/core/single_type_kv_cache_manager.py +403 -0
- vllm/v1/engine/__init__.py +173 -0
- vllm/v1/engine/async_llm.py +558 -0
- vllm/v1/engine/coordinator.py +253 -0
- vllm/v1/engine/core.py +961 -0
- vllm/v1/engine/core_client.py +1129 -0
- vllm/v1/engine/detokenizer.py +261 -0
- vllm/v1/engine/exceptions.py +17 -0
- vllm/v1/engine/llm_engine.py +317 -0
- vllm/v1/engine/logprobs.py +199 -0
- vllm/v1/engine/mm_input_cache.py +91 -0
- vllm/v1/engine/output_processor.py +428 -0
- vllm/v1/engine/parallel_sampling.py +133 -0
- vllm/v1/engine/processor.py +407 -0
- vllm/v1/executor/__init__.py +0 -0
- vllm/v1/executor/abstract.py +113 -0
- vllm/v1/executor/multiproc_executor.py +537 -0
- vllm/v1/executor/ray_distributed_executor.py +62 -0
- vllm/v1/kv_cache_interface.py +194 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +523 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +131 -0
- vllm/v1/metrics/reader.py +246 -0
- vllm/v1/metrics/stats.py +239 -0
- vllm/v1/outputs.py +116 -0
- vllm/v1/request.py +193 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/metadata.py +44 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +39 -0
- vllm/v1/sample/ops/penalties.py +59 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +293 -0
- vllm/v1/sample/rejection_sampler.py +631 -0
- vllm/v1/sample/sampler.py +286 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +124 -0
- vllm/v1/sample/tpu/sampler.py +145 -0
- vllm/v1/serial_utils.py +315 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +432 -0
- vllm/v1/spec_decode/medusa.py +62 -0
- vllm/v1/spec_decode/metadata.py +62 -0
- vllm/v1/spec_decode/metrics.py +178 -0
- vllm/v1/spec_decode/ngram_proposer.py +132 -0
- vllm/v1/spec_decode/utils.py +46 -0
- vllm/v1/structured_output/__init__.py +222 -0
- vllm/v1/structured_output/backend_guidance.py +245 -0
- vllm/v1/structured_output/backend_types.py +134 -0
- vllm/v1/structured_output/backend_xgrammar.py +318 -0
- vllm/v1/structured_output/request.py +86 -0
- vllm/v1/structured_output/utils.py +175 -0
- vllm/v1/utils.py +743 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +142 -0
- vllm/v1/worker/cpu_model_runner.py +86 -0
- vllm/v1/worker/cpu_worker.py +152 -0
- vllm/v1/worker/gpu_input_batch.py +681 -0
- vllm/v1/worker/gpu_model_runner.py +2320 -0
- vllm/v1/worker/gpu_worker.py +393 -0
- vllm/v1/worker/lora_model_runner_mixin.py +173 -0
- vllm/v1/worker/tpu_model_runner.py +1673 -0
- vllm/v1/worker/tpu_worker.py +299 -0
- vllm/v1/worker/utils.py +111 -0
- vllm/v1/worker/worker_base.py +65 -0
- vllm/version.py +41 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm/worker/__init__.py +0 -0
- vllm/worker/cache_engine.py +145 -0
- vllm/worker/cpu_enc_dec_model_runner.py +326 -0
- vllm/worker/cpu_model_runner.py +671 -0
- vllm/worker/cpu_pooling_model_runner.py +125 -0
- vllm/worker/cpu_worker.py +450 -0
- vllm/worker/enc_dec_model_runner.py +555 -0
- vllm/worker/hpu_model_runner.py +2320 -0
- vllm/worker/hpu_worker.py +484 -0
- vllm/worker/model_runner.py +2178 -0
- vllm/worker/model_runner_base.py +282 -0
- vllm/worker/multi_step_hpu_worker.py +123 -0
- vllm/worker/multi_step_model_runner.py +911 -0
- vllm/worker/multi_step_neuron_model_runner.py +84 -0
- vllm/worker/multi_step_neuronx_distributed_model_runner.py +63 -0
- vllm/worker/multi_step_tpu_worker.py +108 -0
- vllm/worker/multi_step_worker.py +197 -0
- vllm/worker/neuron_model_runner.py +460 -0
- vllm/worker/neuron_worker.py +193 -0
- vllm/worker/neuronx_distributed_model_runner.py +294 -0
- vllm/worker/pooling_model_runner.py +211 -0
- vllm/worker/tpu_model_runner.py +909 -0
- vllm/worker/tpu_worker.py +337 -0
- vllm/worker/utils.py +53 -0
- vllm/worker/worker.py +577 -0
- vllm/worker/worker_base.py +646 -0
- vllm/worker/xpu_model_runner.py +606 -0
- vllm/worker/xpu_worker.py +186 -0
- vllm_cpu_amxbf16-0.9.1.dist-info/METADATA +305 -0
- vllm_cpu_amxbf16-0.9.1.dist-info/RECORD +1197 -0
- vllm_cpu_amxbf16-0.9.1.dist-info/WHEEL +5 -0
- vllm_cpu_amxbf16-0.9.1.dist-info/entry_points.txt +5 -0
- vllm_cpu_amxbf16-0.9.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
|
|
4
|
+
import dataclasses
|
|
5
|
+
import functools
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from typing import (TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple,
|
|
8
|
+
Union)
|
|
9
|
+
|
|
10
|
+
import torch
|
|
11
|
+
|
|
12
|
+
from vllm.distributed import get_pp_group
|
|
13
|
+
from vllm.logger import init_logger
|
|
14
|
+
from vllm.model_executor.layers.sampler import (PromptLogprobs, SampleLogprobs,
|
|
15
|
+
SamplerOutput,
|
|
16
|
+
SamplingMetadata, get_logprobs,
|
|
17
|
+
get_pythonized_sample_results)
|
|
18
|
+
from vllm.platforms import current_platform
|
|
19
|
+
from vllm.sequence import (CompletionSequenceGroupOutput, IntermediateTensors,
|
|
20
|
+
Logprob, SequenceGroupMetadata, SequenceOutput)
|
|
21
|
+
from vllm.utils import PyObjectCache, async_tensor_h2d, current_stream
|
|
22
|
+
from vllm.worker.model_runner import (GPUModelRunnerBase,
|
|
23
|
+
ModelInputForGPUWithSamplingMetadata)
|
|
24
|
+
from vllm.worker.model_runner_base import (
|
|
25
|
+
BroadcastableModelInput, _init_attn_metadata_from_tensor_dict,
|
|
26
|
+
_init_frozen_model_input_from_tensor_dict,
|
|
27
|
+
_init_sampling_metadata_from_tensor_dict)
|
|
28
|
+
|
|
29
|
+
from ..model_executor.model_loader.tensorizer import TensorizerConfig
|
|
30
|
+
|
|
31
|
+
if TYPE_CHECKING:
|
|
32
|
+
from vllm.attention.backends.abstract import AttentionBackend
|
|
33
|
+
|
|
34
|
+
logger = init_logger(__name__)
|
|
35
|
+
|
|
36
|
+
MULTI_STEP_ATTENTION_BACKENDS = [
|
|
37
|
+
"FLASH_ATTN", "ROCM_FLASH", "FLASHINFER", "NO_ATTENTION"
|
|
38
|
+
]
|
|
39
|
+
MULTI_STEP_CHUNKED_PREFILL_ATTENTION_BACKENDS = ["FLASH_ATTN", "FLASHINFER"]
|
|
40
|
+
|
|
41
|
+
def _get_supported_attention_backends(chunked_prefill_enabled: bool) \
|
|
42
|
+
-> List[str]:
|
|
43
|
+
if chunked_prefill_enabled:
|
|
44
|
+
return MULTI_STEP_CHUNKED_PREFILL_ATTENTION_BACKENDS
|
|
45
|
+
else:
|
|
46
|
+
return MULTI_STEP_ATTENTION_BACKENDS
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def seq_output_builder():
|
|
50
|
+
return SequenceOutput(
|
|
51
|
+
0, 0,
|
|
52
|
+
{0: Logprob(logprob=float('inf'), rank=None, decoded_token=None)})
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def completion_seq_group_output_builder():
|
|
56
|
+
return CompletionSequenceGroupOutput([], None)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Used by pythonization to reduce python object allocations
|
|
60
|
+
class PythonizationCache:
|
|
61
|
+
|
|
62
|
+
def __init__(self):
|
|
63
|
+
self.cached_seq_output = PyObjectCache(seq_output_builder)
|
|
64
|
+
self.cached_completion_seq_group_output = PyObjectCache(
|
|
65
|
+
completion_seq_group_output_builder)
|
|
66
|
+
|
|
67
|
+
def reset(self):
|
|
68
|
+
self.cached_seq_output.reset()
|
|
69
|
+
self.cached_completion_seq_group_output.reset()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@dataclass
|
|
73
|
+
class ModelOutput:
|
|
74
|
+
"""The output of a single model forward pass.
|
|
75
|
+
|
|
76
|
+
The sampler_output_ready_event is set when the tensors in
|
|
77
|
+
sampler_output are ready (the model+sampler forward pass has
|
|
78
|
+
completed). We use the event to synchronize the GPU->CPU transfer,
|
|
79
|
+
which we want to only run when the data has been written to the
|
|
80
|
+
GPU tensors. Until the event is ready, the tensors in sampler_output
|
|
81
|
+
will have garbage data.
|
|
82
|
+
|
|
83
|
+
There are two scenarios:
|
|
84
|
+
1. The output tensors are ready and we can pythonize them immediately.
|
|
85
|
+
2. The output tensors are not ready and we need to wait for the event to be
|
|
86
|
+
ready.
|
|
87
|
+
"""
|
|
88
|
+
sampler_output: SamplerOutput
|
|
89
|
+
sampler_output_ready_event: torch.cuda.Event
|
|
90
|
+
sampled_token_ids: Optional[torch.Tensor] = None
|
|
91
|
+
pythonized: bool = False
|
|
92
|
+
# On-device tensor containing the logprobs of each token.
|
|
93
|
+
logprobs: Optional["torch.Tensor"] = None
|
|
94
|
+
pythonization_cache: Optional[PythonizationCache] = None
|
|
95
|
+
|
|
96
|
+
def pythonize(self, input_metadata: "StatefulModelInput",
|
|
97
|
+
copy_stream: torch.cuda.Stream,
|
|
98
|
+
pinned_sampled_token_buffer: torch.Tensor) -> None:
|
|
99
|
+
"""Pythonize the output. Blocking."""
|
|
100
|
+
if not self.pythonized:
|
|
101
|
+
self._pythonize_sampler_output(input_metadata, copy_stream,
|
|
102
|
+
pinned_sampled_token_buffer, True)
|
|
103
|
+
self.pythonized = True
|
|
104
|
+
|
|
105
|
+
def maybe_pythonize(self, input_metadata: "StatefulModelInput",
|
|
106
|
+
copy_stream: torch.cuda.Stream,
|
|
107
|
+
pinned_sampled_token_buffer: torch.Tensor) -> None:
|
|
108
|
+
"""Pythonize the output if ready, else return None. Non-blocking."""
|
|
109
|
+
if not self.pythonized:
|
|
110
|
+
self.pythonized = self._pythonize_sampler_output(
|
|
111
|
+
input_metadata, copy_stream, pinned_sampled_token_buffer,
|
|
112
|
+
False)
|
|
113
|
+
|
|
114
|
+
def _pythonize_sampler_output(self, input_metadata: "StatefulModelInput",
|
|
115
|
+
copy_stream: torch.cuda.Stream,
|
|
116
|
+
pinned_sampled_token_buffer: torch.Tensor,
|
|
117
|
+
blocking: bool) -> bool:
|
|
118
|
+
"""
|
|
119
|
+
If blocking is set, will block until the forward pass for the output is
|
|
120
|
+
ready and pythonize the output. Upon completing Pythonization, erases
|
|
121
|
+
self.logprobs (note that a non-blocking call that is performed when
|
|
122
|
+
the sampler output is not yet ready, will not erase self.logprobs.)
|
|
123
|
+
"""
|
|
124
|
+
assert self.sampled_token_ids is not None
|
|
125
|
+
if not blocking and not self.sampler_output_ready_event.query():
|
|
126
|
+
return False
|
|
127
|
+
|
|
128
|
+
if blocking:
|
|
129
|
+
self.sampler_output_ready_event.synchronize()
|
|
130
|
+
with torch.cuda.stream(copy_stream):
|
|
131
|
+
_pythonize_sampler_output(input_metadata, self.sampler_output,
|
|
132
|
+
pinned_sampled_token_buffer,
|
|
133
|
+
self.sampled_token_ids, self.logprobs,
|
|
134
|
+
self.pythonization_cache)
|
|
135
|
+
|
|
136
|
+
# Erase the logprobs GPU-side tensor.
|
|
137
|
+
# Note that although _pythonize_sampler_output() runs in its
|
|
138
|
+
# own CUDA stream, nonetheless _pythonize_sampler_output()
|
|
139
|
+
# cannot return until Pythonization is complete; therefore
|
|
140
|
+
# we know that by the time the CPU reaches this point,
|
|
141
|
+
# `self.logprobs` is no longer needed.
|
|
142
|
+
self.logprobs = None
|
|
143
|
+
return True
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@dataclass(frozen=False)
|
|
147
|
+
class StatefulModelInput(BroadcastableModelInput):
|
|
148
|
+
# actual frozen model input dataclass passed to _base_model_runner
|
|
149
|
+
frozen_model_input: Optional[ModelInputForGPUWithSamplingMetadata] = None
|
|
150
|
+
|
|
151
|
+
# list of model outputs for each step, may not be all pythonized
|
|
152
|
+
cached_outputs: List[ModelOutput] = field(default_factory=list)
|
|
153
|
+
|
|
154
|
+
# used to pass sampled token ids from the last step to the current step for
|
|
155
|
+
# TP workers. Used to append to end of outputs and used by advance_step
|
|
156
|
+
last_sampled_token_ids: Optional[torch.Tensor] = None
|
|
157
|
+
current_step: int = 0
|
|
158
|
+
is_multi_step: bool = True
|
|
159
|
+
is_last_step: bool = False
|
|
160
|
+
is_first_multi_step: bool = False
|
|
161
|
+
base_output_proc_callback: Optional[Callable] = None
|
|
162
|
+
# ping-pong data structures for multi-step to wait on the previous step
|
|
163
|
+
step_cuda_events: List[current_platform.Event] = field(
|
|
164
|
+
default_factory=lambda: [current_platform.Event(blocking=True)] * 2)
|
|
165
|
+
num_seqs: int = -1
|
|
166
|
+
num_queries: int = -1
|
|
167
|
+
num_single_step_prefills: int = 0
|
|
168
|
+
|
|
169
|
+
def as_broadcastable_tensor_dict(self) -> Dict[str, Any]:
|
|
170
|
+
assert self.frozen_model_input is not None
|
|
171
|
+
tensor_dict = self.frozen_model_input.as_broadcastable_tensor_dict()
|
|
172
|
+
new_tensor_dict = {
|
|
173
|
+
'last_sampled_token_ids': self.last_sampled_token_ids,
|
|
174
|
+
'current_step': self.current_step,
|
|
175
|
+
'is_multi_step': self.is_multi_step,
|
|
176
|
+
'is_last_step': self.is_last_step,
|
|
177
|
+
'is_first_multi_step': self.is_first_multi_step,
|
|
178
|
+
'num_seqs': self.num_seqs,
|
|
179
|
+
'num_queries': self.num_queries,
|
|
180
|
+
'num_single_step_prefills': self.num_single_step_prefills,
|
|
181
|
+
}
|
|
182
|
+
tensor_dict.update(new_tensor_dict)
|
|
183
|
+
return tensor_dict
|
|
184
|
+
|
|
185
|
+
@classmethod
|
|
186
|
+
def from_broadcasted_tensor_dict(
|
|
187
|
+
cls,
|
|
188
|
+
tensor_dict: Dict[str, Any],
|
|
189
|
+
attn_backend: Optional["AttentionBackend"] = None,
|
|
190
|
+
) -> "StatefulModelInput":
|
|
191
|
+
tensor_dict = _init_sampling_metadata_from_tensor_dict(tensor_dict)
|
|
192
|
+
if attn_backend is not None:
|
|
193
|
+
tensor_dict = _init_attn_metadata_from_tensor_dict(
|
|
194
|
+
attn_backend, tensor_dict)
|
|
195
|
+
tensor_dict = _init_frozen_model_input_from_tensor_dict(
|
|
196
|
+
ModelInputForGPUWithSamplingMetadata, tensor_dict)
|
|
197
|
+
|
|
198
|
+
return cls(**tensor_dict)
|
|
199
|
+
|
|
200
|
+
def record_step_event(self, current_stream: torch.cuda.Stream):
|
|
201
|
+
# record the event for the current step so that the next step can sync
|
|
202
|
+
# on it. We modulo by 2 to keep the events in a circular buffer and
|
|
203
|
+
# support any attn backends that may be supported in the future. ie
|
|
204
|
+
# Flashinfer would want two DecodeWrappers to overlap the CPU and GPU.
|
|
205
|
+
self.step_cuda_events[self.current_step & 1] = \
|
|
206
|
+
torch.cuda.Event(blocking=True)
|
|
207
|
+
self.step_cuda_events[self.current_step & 1].record(current_stream)
|
|
208
|
+
|
|
209
|
+
def wait_previous_step(self):
|
|
210
|
+
# These cuda events are an explicit synchronization to ensure that
|
|
211
|
+
# advance_step() (for other attn backends that may be supported in the
|
|
212
|
+
# future) do not clobber any data structures that is also used by any
|
|
213
|
+
# enqueued forwards steps. For distributed case, only a single event is
|
|
214
|
+
# needed, but for single GPU case, since we can let the CPU run much
|
|
215
|
+
# further ahead, two events allow us to overlap the advance_step with
|
|
216
|
+
# the previous forward (ie using two DecodeWrappers for flashinfer
|
|
217
|
+
# backend)
|
|
218
|
+
self.step_cuda_events[(self.current_step + 1) & 1].wait()
|
|
219
|
+
|
|
220
|
+
def add_sampler_output(self,
|
|
221
|
+
sampler_output: SamplerOutput,
|
|
222
|
+
sampled_token_ids: Optional[torch.Tensor] = None):
|
|
223
|
+
self.cached_outputs.append(
|
|
224
|
+
ModelOutput(sampler_output=sampler_output,
|
|
225
|
+
sampler_output_ready_event=None,
|
|
226
|
+
sampled_token_ids=sampled_token_ids,
|
|
227
|
+
pythonized=False))
|
|
228
|
+
|
|
229
|
+
def maybe_advance_sampling_metadata(self, device: str, pin_memory: bool):
|
|
230
|
+
"""
|
|
231
|
+
sampling_metadata.selected_token_indices is constructed for the
|
|
232
|
+
first-step in Multi-Step. However, when chunked-prefill is enabled with
|
|
233
|
+
multi-step, the scheduled prompts are fully processed in the
|
|
234
|
+
first-step and are processed as decodes in the rest of the steps.
|
|
235
|
+
This function updates the sampling_metadata.selected_token_indices
|
|
236
|
+
to account for this conversion.
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
Let 2 prompts and 2 decodes be scheduled together. Let the
|
|
240
|
+
num-tokens to process for the 2 prompts be 5 and 8 respectively.
|
|
241
|
+
|
|
242
|
+
In that case, sampling_metadata.sampled_token_indices will be,
|
|
243
|
+
[4, 12, 13, 14] as it is constructed for the first-step in
|
|
244
|
+
multi-step.
|
|
245
|
+
However, the prompts turns to decodes after the first-step
|
|
246
|
+
and the num-tokens for the previously-prompt sequences will
|
|
247
|
+
be 1 and 1 as they are decodes now. The self.sampled_token_indices
|
|
248
|
+
must be updated to [0,1,2,3].
|
|
249
|
+
"""
|
|
250
|
+
assert self.current_step == 1 and self.num_single_step_prefills > 0
|
|
251
|
+
if not get_pp_group().is_last_rank:
|
|
252
|
+
return
|
|
253
|
+
|
|
254
|
+
assert self.frozen_model_input is not None
|
|
255
|
+
assert self.frozen_model_input.sampling_metadata is not None
|
|
256
|
+
self.frozen_model_input.sampling_metadata.selected_token_indices = \
|
|
257
|
+
async_tensor_h2d(list(range(self.num_queries)),
|
|
258
|
+
dtype=torch.long,
|
|
259
|
+
target_device=device,
|
|
260
|
+
pin_memory=pin_memory)
|
|
261
|
+
|
|
262
|
+
def maybe_advance_frozen_model_input(self, device: str, pin_memory: bool):
|
|
263
|
+
"""
|
|
264
|
+
Advancing the datastructures of StatefulModelInput::frozen_model_input
|
|
265
|
+
is only required when prefills are scheduled with decodes to run in
|
|
266
|
+
multi-step. This advancement/correction is required to account for
|
|
267
|
+
the conversion of Prefills to Decodes after the first multi-step.
|
|
268
|
+
"""
|
|
269
|
+
if self.current_step != 1 or self.num_single_step_prefills == 0:
|
|
270
|
+
return
|
|
271
|
+
|
|
272
|
+
assert self.frozen_model_input is not None
|
|
273
|
+
fmi = self.frozen_model_input
|
|
274
|
+
|
|
275
|
+
# Truncate input_tokens
|
|
276
|
+
assert fmi.input_tokens is not None
|
|
277
|
+
assert fmi.input_tokens.shape[0] >= self.num_seqs
|
|
278
|
+
fmi_new_input_tokens: torch.Tensor = fmi.input_tokens[:self.num_seqs]
|
|
279
|
+
|
|
280
|
+
# Update frozen_model_input::input_positons.
|
|
281
|
+
assert fmi.input_positions is not None
|
|
282
|
+
assert fmi.input_positions.shape[0] >= self.num_seqs
|
|
283
|
+
fmi_new_input_positions: torch.Tensor = fmi.input_positions[:self.
|
|
284
|
+
num_seqs]
|
|
285
|
+
|
|
286
|
+
# Assert unsupported
|
|
287
|
+
assert fmi.lora_mapping is None
|
|
288
|
+
assert fmi.lora_requests is not None
|
|
289
|
+
assert len(fmi.lora_requests) == 0
|
|
290
|
+
assert fmi.attn_metadata is not None
|
|
291
|
+
assert fmi.prompt_adapter_mapping is None
|
|
292
|
+
assert fmi.prompt_adapter_requests is not None
|
|
293
|
+
assert len(fmi.prompt_adapter_requests) == 0
|
|
294
|
+
assert fmi.multi_modal_kwargs is not None
|
|
295
|
+
assert len(fmi.multi_modal_kwargs) == 0
|
|
296
|
+
|
|
297
|
+
self.frozen_model_input = dataclasses.replace(
|
|
298
|
+
self.frozen_model_input,
|
|
299
|
+
input_tokens=fmi_new_input_tokens,
|
|
300
|
+
input_positions=fmi_new_input_positions)
|
|
301
|
+
|
|
302
|
+
self.maybe_advance_sampling_metadata(device, pin_memory)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# MutableModelInputForGPUWithMultiStepMetadata is not subclass of
|
|
306
|
+
# ModelInputForGPU but it wraps the actual input dataclass and adds multi-step
|
|
307
|
+
# metadata
|
|
308
|
+
# mypy: disable-error-code=type-var
|
|
309
|
+
class MultiStepModelRunner(GPUModelRunnerBase[StatefulModelInput]):
|
|
310
|
+
# mypy: enable-error-code=type-var
|
|
311
|
+
|
|
312
|
+
def __init__(self, base_model_runner: GPUModelRunnerBase, *args, **kwargs):
|
|
313
|
+
|
|
314
|
+
super().__init__(*args, **kwargs)
|
|
315
|
+
|
|
316
|
+
# Check attention backend support.
|
|
317
|
+
supported_attention_backends: List[str] = \
|
|
318
|
+
_get_supported_attention_backends(
|
|
319
|
+
self.scheduler_config.chunked_prefill_enabled)
|
|
320
|
+
if self.attn_backend.get_name() not in supported_attention_backends:
|
|
321
|
+
ms_config_str: str = "Multi-Step + Chunked-Prefill" \
|
|
322
|
+
if self.scheduler_config.chunked_prefill_enabled \
|
|
323
|
+
else "Multi-Step"
|
|
324
|
+
raise ValueError(
|
|
325
|
+
f"{ms_config_str} not supported for attention backend: "
|
|
326
|
+
f"{self.attn_backend.get_name()}. Set VLLM_ATTENTION_BACKEND "
|
|
327
|
+
f"to a value from {supported_attention_backends}.")
|
|
328
|
+
|
|
329
|
+
# uses the base model runner to execute the model and wraps it with
|
|
330
|
+
# multi-step logic
|
|
331
|
+
self._base_model_runner: GPUModelRunnerBase = base_model_runner
|
|
332
|
+
|
|
333
|
+
self.is_multi_step = self.scheduler_config.is_multi_step
|
|
334
|
+
self.pinned_sampled_token_ids: Optional[torch.Tensor] = None
|
|
335
|
+
|
|
336
|
+
# Using the PythonizationCache in Pipeline-Parallel clobbers the
|
|
337
|
+
# SequenceOutput and CompletionSequenceGroupOutput object.
|
|
338
|
+
# When cache-reset happens at the last step of a multi-step
|
|
339
|
+
# execution, there may be other on-going single-step/multi-step
|
|
340
|
+
# executions. The current caching implementation does not check
|
|
341
|
+
# for this.
|
|
342
|
+
self.pythonization_cache = PythonizationCache() \
|
|
343
|
+
if self.parallel_config.pipeline_parallel_size == 1 else None
|
|
344
|
+
|
|
345
|
+
@functools.cached_property
|
|
346
|
+
def _copy_stream(self):
|
|
347
|
+
# used to copy tensors from GPU to CPU asynchronously
|
|
348
|
+
return torch.cuda.Stream()
|
|
349
|
+
|
|
350
|
+
def make_model_input_from_broadcasted_tensor_dict(
|
|
351
|
+
self, tensor_dict: Dict[str, Any]) -> StatefulModelInput:
|
|
352
|
+
model_input = (StatefulModelInput.from_broadcasted_tensor_dict(
|
|
353
|
+
tensor_dict,
|
|
354
|
+
attn_backend=self.attn_backend,
|
|
355
|
+
))
|
|
356
|
+
return model_input
|
|
357
|
+
|
|
358
|
+
def prepare_model_input(
|
|
359
|
+
self,
|
|
360
|
+
seq_group_metadata_list: List[SequenceGroupMetadata],
|
|
361
|
+
virtual_engine: int = 0,
|
|
362
|
+
finished_requests_ids: Optional[List[str]] = None
|
|
363
|
+
) -> StatefulModelInput:
|
|
364
|
+
frozen_model_input: ModelInputForGPUWithSamplingMetadata = \
|
|
365
|
+
self._base_model_runner.prepare_model_input(
|
|
366
|
+
seq_group_metadata_list,
|
|
367
|
+
virtual_engine,
|
|
368
|
+
finished_requests_ids)
|
|
369
|
+
|
|
370
|
+
assert frozen_model_input.query_lens is not None
|
|
371
|
+
assert frozen_model_input.seq_lens is not None
|
|
372
|
+
assert frozen_model_input.attn_metadata is not None
|
|
373
|
+
num_queries = len(frozen_model_input.query_lens)
|
|
374
|
+
num_seqs = len(frozen_model_input.seq_lens)
|
|
375
|
+
num_single_step_prefills = frozen_model_input.attn_metadata.num_prefills
|
|
376
|
+
|
|
377
|
+
model_input = StatefulModelInput(
|
|
378
|
+
frozen_model_input=frozen_model_input,
|
|
379
|
+
num_seqs=num_seqs,
|
|
380
|
+
num_queries=num_queries,
|
|
381
|
+
num_single_step_prefills=num_single_step_prefills)
|
|
382
|
+
|
|
383
|
+
return model_input
|
|
384
|
+
|
|
385
|
+
def _async_process_outputs(self, model_input: StatefulModelInput,
|
|
386
|
+
output_proc_callback: Callable):
|
|
387
|
+
# Proceed with pythonization and output_proc in order.
|
|
388
|
+
# Stop on the first one that fails to pythonize
|
|
389
|
+
output_proc_callback()
|
|
390
|
+
|
|
391
|
+
cont = True
|
|
392
|
+
for step_num, model_output in enumerate(model_input.cached_outputs):
|
|
393
|
+
if not model_output.pythonized:
|
|
394
|
+
model_output.maybe_pythonize(model_input, self._copy_stream,
|
|
395
|
+
self.pinned_sampled_token_ids)
|
|
396
|
+
if model_output.pythonized:
|
|
397
|
+
ctx = output_proc_callback.keywords["ctx"]
|
|
398
|
+
ctx.append_output(
|
|
399
|
+
outputs=[model_output.sampler_output],
|
|
400
|
+
seq_group_metadata_list=ctx.seq_group_metadata_list,
|
|
401
|
+
scheduler_outputs=ctx.scheduler_outputs,
|
|
402
|
+
is_async=False,
|
|
403
|
+
is_last_step=False,
|
|
404
|
+
is_first_step_output=step_num == 0)
|
|
405
|
+
|
|
406
|
+
output_proc_callback()
|
|
407
|
+
else:
|
|
408
|
+
cont = False
|
|
409
|
+
|
|
410
|
+
if not cont:
|
|
411
|
+
break
|
|
412
|
+
|
|
413
|
+
def _final_process_outputs(
|
|
414
|
+
self, model_input: StatefulModelInput,
|
|
415
|
+
output_proc_callback: Optional[Callable]) -> List[SamplerOutput]:
|
|
416
|
+
assert model_input.frozen_model_input is not None
|
|
417
|
+
|
|
418
|
+
has_async_callback = output_proc_callback is not None
|
|
419
|
+
|
|
420
|
+
outputs = []
|
|
421
|
+
for step_num, output in enumerate(model_input.cached_outputs):
|
|
422
|
+
is_last_step = step_num == len(model_input.cached_outputs) - 1
|
|
423
|
+
|
|
424
|
+
# For non-async case:
|
|
425
|
+
# -- We simply add the outputs
|
|
426
|
+
# For async case:
|
|
427
|
+
# -- Invoke callback, pythonize, add to callback queue and repeat
|
|
428
|
+
# -- For last output, just add to callback queue
|
|
429
|
+
if has_async_callback:
|
|
430
|
+
assert output_proc_callback is not None
|
|
431
|
+
|
|
432
|
+
# Invoke callback before pythonize (to overlap with GPU)
|
|
433
|
+
output_proc_callback()
|
|
434
|
+
|
|
435
|
+
# Pythonize
|
|
436
|
+
if not output.pythonized:
|
|
437
|
+
output.pythonize(model_input, self._copy_stream,
|
|
438
|
+
self.pinned_sampled_token_ids)
|
|
439
|
+
|
|
440
|
+
# For non last step, add to callback queue to chain
|
|
441
|
+
# callbacks=>pythonize pairs (for GPU overlap)
|
|
442
|
+
if not is_last_step:
|
|
443
|
+
ctx = output_proc_callback.keywords[ # type: ignore
|
|
444
|
+
"ctx"] # type: ignore
|
|
445
|
+
ctx.append_output(
|
|
446
|
+
outputs=[output.sampler_output],
|
|
447
|
+
seq_group_metadata_list=ctx.
|
|
448
|
+
seq_group_metadata_list,
|
|
449
|
+
scheduler_outputs=ctx.scheduler_outputs,
|
|
450
|
+
is_async=False,
|
|
451
|
+
is_last_step=False,
|
|
452
|
+
is_first_step_output=step_num == 0)
|
|
453
|
+
else:
|
|
454
|
+
outputs.append(output.sampler_output)
|
|
455
|
+
else:
|
|
456
|
+
output.pythonize(model_input, self._copy_stream,
|
|
457
|
+
self.pinned_sampled_token_ids)
|
|
458
|
+
outputs.append(output.sampler_output)
|
|
459
|
+
|
|
460
|
+
return outputs
|
|
461
|
+
|
|
462
|
+
@torch.inference_mode()
|
|
463
|
+
def execute_model(
|
|
464
|
+
self,
|
|
465
|
+
model_input: StatefulModelInput,
|
|
466
|
+
kv_caches: List[torch.Tensor],
|
|
467
|
+
intermediate_tensors: Optional[IntermediateTensors] = None,
|
|
468
|
+
num_steps: int = 1,
|
|
469
|
+
) -> Optional[Union[List[SamplerOutput], IntermediateTensors]]:
|
|
470
|
+
"""
|
|
471
|
+
Execute the model for a single step and update multi-step
|
|
472
|
+
metadata
|
|
473
|
+
"""
|
|
474
|
+
assert num_steps == 1, "MultiStepModelRunner only supports num_steps=1"
|
|
475
|
+
frozen_model_input = model_input.frozen_model_input
|
|
476
|
+
assert frozen_model_input is not None
|
|
477
|
+
|
|
478
|
+
# path for warm up runs
|
|
479
|
+
if not model_input.is_multi_step:
|
|
480
|
+
return self._base_model_runner.execute_model(
|
|
481
|
+
frozen_model_input, None, intermediate_tensors, num_steps)
|
|
482
|
+
|
|
483
|
+
# make sure we skip the sampler on the lask rank and only pythonize
|
|
484
|
+
# if CPU is ahead.
|
|
485
|
+
if self.is_driver_worker and get_pp_group().is_last_rank:
|
|
486
|
+
if self.pinned_sampled_token_ids is None:
|
|
487
|
+
self.pinned_sampled_token_ids = torch.zeros(
|
|
488
|
+
(self.scheduler_config.max_num_seqs, 1),
|
|
489
|
+
dtype=torch.long,
|
|
490
|
+
device="cpu",
|
|
491
|
+
pin_memory=True)
|
|
492
|
+
|
|
493
|
+
self._base_model_runner.sampler.include_gpu_probs_tensor = True
|
|
494
|
+
if frozen_model_input.sampling_metadata:
|
|
495
|
+
frozen_model_input.sampling_metadata.skip_sampler_cpu_output = (
|
|
496
|
+
True)
|
|
497
|
+
|
|
498
|
+
# some pre-execute model logic for multi-step:
|
|
499
|
+
# - if it's the first step, we need to reset the sampling tensors
|
|
500
|
+
# - if it's not the first step, we need to advance the step using the
|
|
501
|
+
# appended sampler output from last iteration
|
|
502
|
+
# - also maybe pythonize if CPU is ahead of GPU
|
|
503
|
+
|
|
504
|
+
stream = current_stream()
|
|
505
|
+
if not model_input.is_first_multi_step:
|
|
506
|
+
# Explicitly block on the previous step's forward to make sure we
|
|
507
|
+
# don't clobber any GPU tensors still in use.
|
|
508
|
+
# This is not needed for flashattn backend, but for other attn
|
|
509
|
+
# backends such as flashinfer that performs extra CPU operations on
|
|
510
|
+
# input metadata we may need to synchronize any CPU operations that
|
|
511
|
+
# might clobber enqueued forwards. (prevents CPU from running too
|
|
512
|
+
# far ahead if needed)
|
|
513
|
+
model_input.wait_previous_step()
|
|
514
|
+
model_input = self._advance_step(
|
|
515
|
+
model_input, model_input.cached_outputs[-1].sampler_output)
|
|
516
|
+
|
|
517
|
+
# frozen_model_input may have been updated
|
|
518
|
+
frozen_model_input = model_input.frozen_model_input
|
|
519
|
+
assert frozen_model_input is not None
|
|
520
|
+
|
|
521
|
+
if model_input.base_output_proc_callback is None:
|
|
522
|
+
assert frozen_model_input is not None
|
|
523
|
+
model_input.base_output_proc_callback = \
|
|
524
|
+
frozen_model_input.async_callback
|
|
525
|
+
|
|
526
|
+
if frozen_model_input.async_callback is not None:
|
|
527
|
+
assert model_input.base_output_proc_callback is not None
|
|
528
|
+
async_callback = functools.partial(
|
|
529
|
+
self._async_process_outputs,
|
|
530
|
+
model_input=model_input,
|
|
531
|
+
output_proc_callback=model_input.base_output_proc_callback)
|
|
532
|
+
|
|
533
|
+
model_input.frozen_model_input = dataclasses.replace( # type: ignore
|
|
534
|
+
model_input.frozen_model_input,
|
|
535
|
+
async_callback=async_callback)
|
|
536
|
+
# Update the local instance
|
|
537
|
+
frozen_model_input = model_input.frozen_model_input
|
|
538
|
+
assert frozen_model_input is not None
|
|
539
|
+
|
|
540
|
+
# Execute the model
|
|
541
|
+
output = self._base_model_runner.execute_model(frozen_model_input,
|
|
542
|
+
None,
|
|
543
|
+
intermediate_tensors,
|
|
544
|
+
num_steps=1)
|
|
545
|
+
|
|
546
|
+
# record the event for the current step so that the next step can sync
|
|
547
|
+
model_input.record_step_event(stream)
|
|
548
|
+
|
|
549
|
+
if get_pp_group().is_last_rank and self.is_driver_worker:
|
|
550
|
+
assert isinstance(output, list)
|
|
551
|
+
assert len(
|
|
552
|
+
output
|
|
553
|
+
) == 1, "MultiStepModelRunner requires single-step base_models"
|
|
554
|
+
|
|
555
|
+
# event for the pythonization so that we only pythonize if the
|
|
556
|
+
# tensors are ready. May be able to be combined with the step event
|
|
557
|
+
output_ready_event = torch.cuda.Event()
|
|
558
|
+
output_ready_event.record(stream)
|
|
559
|
+
if self.parallel_config.pipeline_parallel_size > 1:
|
|
560
|
+
output[0].sampled_token_ids_cpu = output[
|
|
561
|
+
0].sampled_token_ids.cpu()
|
|
562
|
+
model_input.cached_outputs.append(
|
|
563
|
+
ModelOutput(output[0], output_ready_event,
|
|
564
|
+
output[0].sampled_token_ids, False,
|
|
565
|
+
output[0].logprobs, self.pythonization_cache))
|
|
566
|
+
|
|
567
|
+
# These GPU tensors are not required by multi-step;
|
|
568
|
+
# erase them to ensure they are not pythonized or
|
|
569
|
+
# transferred to CPU
|
|
570
|
+
output[0].sampled_token_ids = None
|
|
571
|
+
output[0].sampled_token_probs = None
|
|
572
|
+
output[0].logprobs = None
|
|
573
|
+
|
|
574
|
+
# Pythonize the output if CPU is ahead and the previous step is
|
|
575
|
+
# ready.
|
|
576
|
+
if frozen_model_input.async_callback is None:
|
|
577
|
+
for model_output in model_input.cached_outputs:
|
|
578
|
+
model_output.maybe_pythonize(model_input,
|
|
579
|
+
self._copy_stream,
|
|
580
|
+
self.pinned_sampled_token_ids)
|
|
581
|
+
|
|
582
|
+
model_input.current_step += 1
|
|
583
|
+
|
|
584
|
+
if not get_pp_group().is_last_rank:
|
|
585
|
+
# Should be IntermediateTensors
|
|
586
|
+
assert isinstance(output, IntermediateTensors)
|
|
587
|
+
return output
|
|
588
|
+
if not self.is_driver_worker:
|
|
589
|
+
return []
|
|
590
|
+
|
|
591
|
+
# Pythonize the output and block if needed since it is the last step
|
|
592
|
+
if model_input.is_last_step:
|
|
593
|
+
outputs = self._final_process_outputs(
|
|
594
|
+
model_input, model_input.base_output_proc_callback)
|
|
595
|
+
if self.pythonization_cache:
|
|
596
|
+
self.pythonization_cache.reset()
|
|
597
|
+
return outputs
|
|
598
|
+
|
|
599
|
+
# should be [SamplerOutput]
|
|
600
|
+
return output
|
|
601
|
+
|
|
602
|
+
def _update_sampling_metadata(self, sampling_metadata: SamplingMetadata,
|
|
603
|
+
num_seqs: Optional[int], num_queries: int):
|
|
604
|
+
|
|
605
|
+
assert sampling_metadata.num_prompts == 0
|
|
606
|
+
assert len(sampling_metadata.seq_groups) == num_queries
|
|
607
|
+
assert sampling_metadata.selected_token_indices.shape == (
|
|
608
|
+
num_queries, )
|
|
609
|
+
# assert sampling_metadata.categorized_sample_indices == TODO: Add if needed # noqa: E501
|
|
610
|
+
|
|
611
|
+
# Verify that all sequences are decodes
|
|
612
|
+
for i in range(num_queries):
|
|
613
|
+
seq_group = sampling_metadata.seq_groups[i]
|
|
614
|
+
|
|
615
|
+
assert seq_group.is_prompt is False # No prompt
|
|
616
|
+
assert seq_group.prompt_logprob_indices == [] # No prompt
|
|
617
|
+
assert seq_group.sample_indices == [i] # Simple
|
|
618
|
+
assert seq_group.seq_len is None # Decode
|
|
619
|
+
assert seq_group.query_len is None # Decode
|
|
620
|
+
|
|
621
|
+
def _advance_step(self, model_input: StatefulModelInput,
|
|
622
|
+
out: SamplerOutput) -> StatefulModelInput:
|
|
623
|
+
|
|
624
|
+
model_input.maybe_advance_frozen_model_input(self.device,
|
|
625
|
+
self.pin_memory)
|
|
626
|
+
frozen_model_input = model_input.frozen_model_input
|
|
627
|
+
assert frozen_model_input is not None
|
|
628
|
+
assert frozen_model_input.input_tokens is not None
|
|
629
|
+
assert frozen_model_input.input_tokens.shape[0] == model_input.num_seqs
|
|
630
|
+
assert frozen_model_input.attn_metadata is not None
|
|
631
|
+
|
|
632
|
+
sampled_token_ids = model_input.cached_outputs[-1].sampled_token_ids
|
|
633
|
+
num_seqs = model_input.num_seqs
|
|
634
|
+
num_queries = model_input.num_queries
|
|
635
|
+
frozen_model_input = model_input.frozen_model_input
|
|
636
|
+
assert frozen_model_input is not None
|
|
637
|
+
attn_metadata = frozen_model_input.attn_metadata
|
|
638
|
+
assert attn_metadata is not None
|
|
639
|
+
|
|
640
|
+
turn_prefills_into_decodes: bool = model_input.current_step == 1 and \
|
|
641
|
+
model_input.num_single_step_prefills != 0
|
|
642
|
+
attn_metadata.advance_step(
|
|
643
|
+
frozen_model_input,
|
|
644
|
+
sampled_token_ids,
|
|
645
|
+
self.block_size,
|
|
646
|
+
num_seqs,
|
|
647
|
+
num_queries,
|
|
648
|
+
turn_prefills_into_decodes=turn_prefills_into_decodes)
|
|
649
|
+
|
|
650
|
+
return model_input
|
|
651
|
+
|
|
652
|
+
def load_model(self) -> None:
|
|
653
|
+
self._base_model_runner.load_model()
|
|
654
|
+
self.model_memory_usage = self._base_model_runner.model_memory_usage
|
|
655
|
+
|
|
656
|
+
def save_sharded_state(
|
|
657
|
+
self,
|
|
658
|
+
path: str,
|
|
659
|
+
pattern: Optional[str] = None,
|
|
660
|
+
max_size: Optional[int] = None,
|
|
661
|
+
) -> None:
|
|
662
|
+
return self._base_model_runner.save_sharded_state(
|
|
663
|
+
path, pattern, max_size)
|
|
664
|
+
|
|
665
|
+
def save_tensorized_model(self,
|
|
666
|
+
tensorizer_config: TensorizerConfig) -> None:
|
|
667
|
+
return self._base_model_runner.save_tensorized_model(tensorizer_config)
|
|
668
|
+
|
|
669
|
+
def profile_run(self) -> None:
|
|
670
|
+
return self._base_model_runner.profile_run()
|
|
671
|
+
|
|
672
|
+
def remove_all_loras(self):
|
|
673
|
+
return self._base_model_runner.remove_all_loras()
|
|
674
|
+
|
|
675
|
+
def capture_model(self, kv_caches: List[List]) -> None:
|
|
676
|
+
return self._base_model_runner.capture_model(kv_caches)
|
|
677
|
+
|
|
678
|
+
@property
|
|
679
|
+
def vocab_size(self) -> int:
|
|
680
|
+
return self._base_model_runner.vocab_size
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
DeferredLogprobsReturnType = Tuple[Optional[List[Optional[PromptLogprobs]]],
|
|
684
|
+
Optional[List[SampleLogprobs]]]
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
def deferred_pythonize_logprobs(
|
|
688
|
+
output: SamplerOutput,
|
|
689
|
+
sampling_metadata: SamplingMetadata,
|
|
690
|
+
logprobs_tensor: Optional[torch.Tensor],
|
|
691
|
+
) -> DeferredLogprobsReturnType:
|
|
692
|
+
"""Perform deferred logprob Pythonization.
|
|
693
|
+
|
|
694
|
+
1. Pythonize GPU-side sampler result tensors into CPU-side sampler result.
|
|
695
|
+
2. Pythonize GPU-side logprobs tensor into CPU-side logprobs lists,
|
|
696
|
+
utilizing the Pythonized sampler result computed in step 1.
|
|
697
|
+
|
|
698
|
+
These deferred computations are not required for single-step scheduling
|
|
699
|
+
or the `profile_run()` phase of multi-step scheduling.
|
|
700
|
+
|
|
701
|
+
Args:
|
|
702
|
+
output: sampler output (under deferred Pythonization)
|
|
703
|
+
sampling_metadata
|
|
704
|
+
|
|
705
|
+
Returns:
|
|
706
|
+
prompt_logprobs (CPU), sample_logprobs (CPU)
|
|
707
|
+
"""
|
|
708
|
+
|
|
709
|
+
# - Deferred pythonization of sample result
|
|
710
|
+
sampler_result = get_pythonized_sample_results(
|
|
711
|
+
output.deferred_sample_results_args)
|
|
712
|
+
|
|
713
|
+
# - Erase the GPU-side deferred sample_result
|
|
714
|
+
# computation args to ensure it is never
|
|
715
|
+
# pythonized or transferred to CPU
|
|
716
|
+
output.deferred_sample_results_args = None
|
|
717
|
+
|
|
718
|
+
# - Deferred pythonization of logprobs
|
|
719
|
+
(
|
|
720
|
+
prompt_logprobs,
|
|
721
|
+
sample_logprobs,
|
|
722
|
+
) = get_logprobs(logprobs_tensor, sampling_metadata, sampler_result)
|
|
723
|
+
assert len(prompt_logprobs) == len(sampling_metadata.seq_groups)
|
|
724
|
+
assert len(sample_logprobs) == len(sampling_metadata.seq_groups)
|
|
725
|
+
|
|
726
|
+
return prompt_logprobs, sample_logprobs
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
def _pythonize_sampler_output(
|
|
730
|
+
model_input: StatefulModelInput,
|
|
731
|
+
output: SamplerOutput,
|
|
732
|
+
pinned_sampled_token_buffer: torch.Tensor,
|
|
733
|
+
sampled_token_ids: torch.Tensor,
|
|
734
|
+
logprobs_tensor: Optional[torch.Tensor],
|
|
735
|
+
cache: Optional[PythonizationCache],
|
|
736
|
+
) -> None:
|
|
737
|
+
""" This function is only called when the output tensors are ready.
|
|
738
|
+
See [`ModelOutput`][vllm.worker.multi_step_model_runner.ModelOutput].
|
|
739
|
+
|
|
740
|
+
Modifies `output.outputs` and `pinned_sampled_token_buffer` in-place,
|
|
741
|
+
adding a Pythonized output data structure
|
|
742
|
+
([`CompletionSequenceGroupOutput`][vllm.sequence.CompletionSequenceGroupOutput])
|
|
743
|
+
for each [`SequenceGroup`][vllm.sequence.SequenceGroup].
|
|
744
|
+
|
|
745
|
+
Args:
|
|
746
|
+
model_input
|
|
747
|
+
output: sampler output
|
|
748
|
+
pinned_sampled_token_token_buffer: CPU-side pinned memory
|
|
749
|
+
(receives copy of
|
|
750
|
+
GPU-side token buffer.)
|
|
751
|
+
sampled_token_ids: GPU-side token buffer
|
|
752
|
+
logprobs_tensor: GPU-side tensor containing
|
|
753
|
+
logprobs computed during sampling
|
|
754
|
+
"""
|
|
755
|
+
|
|
756
|
+
assert model_input.frozen_model_input is not None
|
|
757
|
+
|
|
758
|
+
frozen_model_input = model_input.frozen_model_input
|
|
759
|
+
assert frozen_model_input.sampling_metadata is not None
|
|
760
|
+
sampling_metadata = frozen_model_input.sampling_metadata
|
|
761
|
+
# samples generation should have been skipped
|
|
762
|
+
assert not output.outputs
|
|
763
|
+
|
|
764
|
+
pinned_buffer = pinned_sampled_token_buffer[:model_input.num_queries]
|
|
765
|
+
|
|
766
|
+
# We guarantee output tensors are ready, so it is safe to
|
|
767
|
+
# pythonize the sampler output & obtain CPU-side logprobs.
|
|
768
|
+
#
|
|
769
|
+
# However we should check whether logprobs pythonization may
|
|
770
|
+
# be skipped entirely, i.e. because no logprobs were requested
|
|
771
|
+
# or pythonization was not deferred. To that end,
|
|
772
|
+
#
|
|
773
|
+
# * `prompt_logprobs_are_requested_for_prefill` signals that
|
|
774
|
+
# there are *any* prefill-phase requests which specify that
|
|
775
|
+
# prompt logprobs should be returned.
|
|
776
|
+
#
|
|
777
|
+
# * `any_logprobs_are_requested` signals that there are any
|
|
778
|
+
# requests which (1) specify that sample logprobs should be
|
|
779
|
+
# returned, or (2) are in the prefill phase AND specify that
|
|
780
|
+
# prompt logprobs should be returned.
|
|
781
|
+
#
|
|
782
|
+
# Later on, these flags cause adjustments to the pythonization
|
|
783
|
+
# process to accommodate logprobs.
|
|
784
|
+
|
|
785
|
+
seq_groups = sampling_metadata.seq_groups
|
|
786
|
+
prompt_logprobs_are_requested_for_prefill = any([
|
|
787
|
+
sg.sampling_params.prompt_logprobs is not None and sg.is_prompt
|
|
788
|
+
for sg in seq_groups
|
|
789
|
+
])
|
|
790
|
+
any_logprobs_are_requested = (
|
|
791
|
+
prompt_logprobs_are_requested_for_prefill
|
|
792
|
+
or any([sg.sampling_params.logprobs is not None for sg in seq_groups]))
|
|
793
|
+
|
|
794
|
+
if prompt_logprobs_are_requested_for_prefill:
|
|
795
|
+
# CPU GPU sync, after gathering *only* sampled tokens (since
|
|
796
|
+
# requesting prompt logprobs leads `sampled_token_ids` to
|
|
797
|
+
# include prompt token ids in addition to sampled token ids.)
|
|
798
|
+
sample_idx_tensor = torch.tensor(
|
|
799
|
+
[sdx for sg in seq_groups for sdx in sg.sample_indices])
|
|
800
|
+
pinned_buffer = pinned_buffer.copy_(
|
|
801
|
+
sampled_token_ids[sample_idx_tensor, :], non_blocking=False)
|
|
802
|
+
else:
|
|
803
|
+
# CPU GPU sync
|
|
804
|
+
pinned_buffer = pinned_buffer.copy_(sampled_token_ids,
|
|
805
|
+
non_blocking=False)
|
|
806
|
+
|
|
807
|
+
# this will not block as the tensors are already on CPU
|
|
808
|
+
samples_list = pinned_buffer.tolist()
|
|
809
|
+
|
|
810
|
+
skip_sampler_cpu_output = (
|
|
811
|
+
frozen_model_input.sampling_metadata.skip_sampler_cpu_output)
|
|
812
|
+
|
|
813
|
+
# *Don't* skip logprobs pythonization *if*:
|
|
814
|
+
# * Any requests require logprobs to be returned in this
|
|
815
|
+
# iteration AND
|
|
816
|
+
# * These requests are being scheduled in a fashion which
|
|
817
|
+
# defers pythonization (i.e. multi-step scheduling.)
|
|
818
|
+
do_pythonize_logprobs = (skip_sampler_cpu_output
|
|
819
|
+
and any_logprobs_are_requested)
|
|
820
|
+
(
|
|
821
|
+
prompt_logprobs,
|
|
822
|
+
sample_logprobs,
|
|
823
|
+
) = (deferred_pythonize_logprobs(output, sampling_metadata,
|
|
824
|
+
logprobs_tensor)
|
|
825
|
+
if do_pythonize_logprobs else (None, None))
|
|
826
|
+
|
|
827
|
+
for sgdx, (seq_group,
|
|
828
|
+
sample_result) in enumerate(zip(seq_groups, samples_list)):
|
|
829
|
+
# Reminder: Please update docs/features/compatibility_matrix.md
|
|
830
|
+
# If the feature combo become valid
|
|
831
|
+
# (Check for Guided Decoding)
|
|
832
|
+
if seq_group.sampling_params.logits_processors:
|
|
833
|
+
assert len(seq_group.sampling_params.logits_processors) == 0, (
|
|
834
|
+
"Logits Processors are not supported in multi-step decoding")
|
|
835
|
+
|
|
836
|
+
if do_pythonize_logprobs:
|
|
837
|
+
assert prompt_logprobs is not None
|
|
838
|
+
assert sample_logprobs is not None
|
|
839
|
+
|
|
840
|
+
(
|
|
841
|
+
group_prompt_logprobs,
|
|
842
|
+
group_sample_logprobs,
|
|
843
|
+
) = ( # Utilize deferred pythonization results
|
|
844
|
+
prompt_logprobs[sgdx],
|
|
845
|
+
sample_logprobs[sgdx],
|
|
846
|
+
)
|
|
847
|
+
elif any_logprobs_are_requested:
|
|
848
|
+
(
|
|
849
|
+
group_prompt_logprobs,
|
|
850
|
+
group_sample_logprobs,
|
|
851
|
+
) = (
|
|
852
|
+
# profile_run: use already-computed logprobs
|
|
853
|
+
output.outputs[sgdx].prompt_logprobs,
|
|
854
|
+
[sample.logprobs for sample in output.outputs[sgdx].samples])
|
|
855
|
+
|
|
856
|
+
seq_ids = seq_group.seq_ids
|
|
857
|
+
next_token_ids = sample_result
|
|
858
|
+
parent_ids = [0]
|
|
859
|
+
seq_outputs: List[SequenceOutput]
|
|
860
|
+
|
|
861
|
+
if cache is not None:
|
|
862
|
+
completion_seq_group_output: CompletionSequenceGroupOutput = \
|
|
863
|
+
cache.cached_completion_seq_group_output.get_object()
|
|
864
|
+
completion_seq_group_output.samples.clear()
|
|
865
|
+
seq_outputs = completion_seq_group_output.samples
|
|
866
|
+
else:
|
|
867
|
+
seq_outputs = []
|
|
868
|
+
|
|
869
|
+
for tdx, (parent_id,
|
|
870
|
+
next_token_id) in enumerate(zip(parent_ids, next_token_ids)):
|
|
871
|
+
if cache is not None:
|
|
872
|
+
seq_output: SequenceOutput = cache.cached_seq_output.get_object(
|
|
873
|
+
)
|
|
874
|
+
seq_output.parent_seq_id = seq_ids[parent_id]
|
|
875
|
+
seq_output.output_token = next_token_id
|
|
876
|
+
|
|
877
|
+
if any_logprobs_are_requested:
|
|
878
|
+
seq_output.logprobs = group_sample_logprobs[tdx]
|
|
879
|
+
else:
|
|
880
|
+
logprobs = next(iter(seq_output.logprobs.values()))
|
|
881
|
+
seq_output.logprobs.clear()
|
|
882
|
+
|
|
883
|
+
logprobs.logprob = float('inf')
|
|
884
|
+
logprobs.rank = None
|
|
885
|
+
logprobs.decoded_token = None
|
|
886
|
+
|
|
887
|
+
seq_output.logprobs[next_token_id] = logprobs
|
|
888
|
+
|
|
889
|
+
seq_outputs.append(seq_output)
|
|
890
|
+
|
|
891
|
+
else:
|
|
892
|
+
seq_outputs.append(
|
|
893
|
+
SequenceOutput(seq_ids[parent_id], next_token_id,
|
|
894
|
+
(group_sample_logprobs[tdx]
|
|
895
|
+
if any_logprobs_are_requested else {
|
|
896
|
+
next_token_id:
|
|
897
|
+
Logprob(logprob=float('inf'),
|
|
898
|
+
rank=None,
|
|
899
|
+
decoded_token=None)
|
|
900
|
+
})))
|
|
901
|
+
if cache is not None:
|
|
902
|
+
completion_seq_group_output.prompt_logprobs = \
|
|
903
|
+
group_prompt_logprobs if any_logprobs_are_requested else None
|
|
904
|
+
output.outputs.append(completion_seq_group_output)
|
|
905
|
+
else:
|
|
906
|
+
output.outputs.append(
|
|
907
|
+
CompletionSequenceGroupOutput(
|
|
908
|
+
seq_outputs, (group_prompt_logprobs
|
|
909
|
+
if any_logprobs_are_requested else None)))
|
|
910
|
+
|
|
911
|
+
assert len(output.outputs) > 0
|