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,1129 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
import asyncio
|
|
4
|
+
import contextlib
|
|
5
|
+
import queue
|
|
6
|
+
import sys
|
|
7
|
+
import uuid
|
|
8
|
+
import weakref
|
|
9
|
+
from abc import ABC, abstractmethod
|
|
10
|
+
from collections import deque
|
|
11
|
+
from collections.abc import Awaitable, Sequence
|
|
12
|
+
from concurrent.futures import Future
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from threading import Thread
|
|
15
|
+
from typing import Any, Callable, Optional, TypeVar, Union
|
|
16
|
+
|
|
17
|
+
import msgspec.msgpack
|
|
18
|
+
import zmq
|
|
19
|
+
import zmq.asyncio
|
|
20
|
+
|
|
21
|
+
from vllm.config import VllmConfig
|
|
22
|
+
from vllm.logger import init_logger
|
|
23
|
+
from vllm.lora.request import LoRARequest
|
|
24
|
+
from vllm.utils import (get_open_zmq_inproc_path, make_zmq_socket,
|
|
25
|
+
zmq_socket_ctx)
|
|
26
|
+
from vllm.v1.engine import (EngineCoreOutputs, EngineCoreRequest,
|
|
27
|
+
EngineCoreRequestType, UtilityOutput)
|
|
28
|
+
from vllm.v1.engine.coordinator import DPCoordinator
|
|
29
|
+
from vllm.v1.engine.core import EngineCore, EngineCoreProc
|
|
30
|
+
from vllm.v1.engine.exceptions import EngineDeadError
|
|
31
|
+
from vllm.v1.executor.abstract import Executor
|
|
32
|
+
from vllm.v1.serial_utils import MsgpackDecoder, MsgpackEncoder, bytestr
|
|
33
|
+
from vllm.v1.utils import (CoreEngine, CoreEngineActorManager,
|
|
34
|
+
CoreEngineProcManager, EngineZmqAddresses,
|
|
35
|
+
get_engine_client_zmq_addr, wait_for_engine_startup)
|
|
36
|
+
|
|
37
|
+
logger = init_logger(__name__)
|
|
38
|
+
|
|
39
|
+
AnyFuture = Union[asyncio.Future[Any], Future[Any]]
|
|
40
|
+
|
|
41
|
+
_R = TypeVar('_R') # Return type for collective_rpc
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class EngineCoreClient(ABC):
|
|
45
|
+
"""
|
|
46
|
+
EngineCoreClient: subclasses handle different methods for pushing
|
|
47
|
+
and pulling from the EngineCore for asyncio / multiprocessing.
|
|
48
|
+
|
|
49
|
+
Subclasses:
|
|
50
|
+
* InprocClient: In process EngineCore (for V0-style LLMEngine use)
|
|
51
|
+
* SyncMPClient: ZMQ + background proc EngineCore (for LLM)
|
|
52
|
+
* AsyncMPClient: ZMQ + background proc EngineCore w/ asyncio (for AsyncLLM)
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def make_client(
|
|
57
|
+
multiprocess_mode: bool,
|
|
58
|
+
asyncio_mode: bool,
|
|
59
|
+
vllm_config: VllmConfig,
|
|
60
|
+
executor_class: type[Executor],
|
|
61
|
+
log_stats: bool,
|
|
62
|
+
) -> "EngineCoreClient":
|
|
63
|
+
|
|
64
|
+
# TODO: support this for debugging purposes.
|
|
65
|
+
if asyncio_mode and not multiprocess_mode:
|
|
66
|
+
raise NotImplementedError(
|
|
67
|
+
"Running EngineCore in asyncio without multiprocessing "
|
|
68
|
+
"is not currently supported.")
|
|
69
|
+
|
|
70
|
+
if multiprocess_mode and asyncio_mode:
|
|
71
|
+
return EngineCoreClient.make_async_mp_client(
|
|
72
|
+
vllm_config, executor_class, log_stats)
|
|
73
|
+
|
|
74
|
+
if multiprocess_mode and not asyncio_mode:
|
|
75
|
+
return SyncMPClient(vllm_config, executor_class, log_stats)
|
|
76
|
+
|
|
77
|
+
return InprocClient(vllm_config, executor_class, log_stats)
|
|
78
|
+
|
|
79
|
+
@staticmethod
|
|
80
|
+
def make_async_mp_client(
|
|
81
|
+
vllm_config: VllmConfig,
|
|
82
|
+
executor_class: type[Executor],
|
|
83
|
+
log_stats: bool,
|
|
84
|
+
client_addresses: Optional[dict[str, str]] = None,
|
|
85
|
+
client_index: int = 0,
|
|
86
|
+
) -> "MPClient":
|
|
87
|
+
if vllm_config.parallel_config.data_parallel_size > 1:
|
|
88
|
+
if vllm_config.parallel_config.data_parallel_backend == "ray":
|
|
89
|
+
return RayDPClient(vllm_config, executor_class, log_stats,
|
|
90
|
+
client_addresses, client_index)
|
|
91
|
+
return DPAsyncMPClient(vllm_config, executor_class, log_stats,
|
|
92
|
+
client_addresses, client_index)
|
|
93
|
+
return AsyncMPClient(vllm_config, executor_class, log_stats,
|
|
94
|
+
client_addresses, client_index)
|
|
95
|
+
|
|
96
|
+
@abstractmethod
|
|
97
|
+
def shutdown(self):
|
|
98
|
+
...
|
|
99
|
+
|
|
100
|
+
def get_output(self) -> EngineCoreOutputs:
|
|
101
|
+
raise NotImplementedError
|
|
102
|
+
|
|
103
|
+
def add_request(self, request: EngineCoreRequest) -> None:
|
|
104
|
+
raise NotImplementedError
|
|
105
|
+
|
|
106
|
+
def profile(self, is_start: bool = True) -> None:
|
|
107
|
+
raise NotImplementedError
|
|
108
|
+
|
|
109
|
+
def reset_mm_cache(self) -> None:
|
|
110
|
+
raise NotImplementedError
|
|
111
|
+
|
|
112
|
+
def reset_prefix_cache(self) -> None:
|
|
113
|
+
raise NotImplementedError
|
|
114
|
+
|
|
115
|
+
def sleep(self, level: int = 1) -> None:
|
|
116
|
+
raise NotImplementedError
|
|
117
|
+
|
|
118
|
+
def wake_up(self, tags: Optional[list[str]] = None) -> None:
|
|
119
|
+
raise NotImplementedError
|
|
120
|
+
|
|
121
|
+
def is_sleeping(self) -> bool:
|
|
122
|
+
raise NotImplementedError
|
|
123
|
+
|
|
124
|
+
def execute_dummy_batch(self) -> None:
|
|
125
|
+
raise NotImplementedError
|
|
126
|
+
|
|
127
|
+
async def execute_dummy_batch_async(self) -> None:
|
|
128
|
+
raise NotImplementedError
|
|
129
|
+
|
|
130
|
+
def abort_requests(self, request_ids: list[str]) -> None:
|
|
131
|
+
raise NotImplementedError
|
|
132
|
+
|
|
133
|
+
def add_lora(self, lora_request: LoRARequest) -> bool:
|
|
134
|
+
raise NotImplementedError
|
|
135
|
+
|
|
136
|
+
def remove_lora(self, lora_id: int) -> bool:
|
|
137
|
+
raise NotImplementedError
|
|
138
|
+
|
|
139
|
+
def list_loras(self) -> set[int]:
|
|
140
|
+
raise NotImplementedError
|
|
141
|
+
|
|
142
|
+
def pin_lora(self, lora_id: int) -> bool:
|
|
143
|
+
raise NotImplementedError
|
|
144
|
+
|
|
145
|
+
def save_sharded_state(self,
|
|
146
|
+
path: str,
|
|
147
|
+
pattern: Optional[str] = None,
|
|
148
|
+
max_size: Optional[int] = None) -> None:
|
|
149
|
+
raise NotImplementedError
|
|
150
|
+
|
|
151
|
+
def collective_rpc(self,
|
|
152
|
+
method: Union[str, Callable[..., _R]],
|
|
153
|
+
timeout: Optional[float] = None,
|
|
154
|
+
args: tuple = (),
|
|
155
|
+
kwargs: Optional[dict[str, Any]] = None) -> list[_R]:
|
|
156
|
+
raise NotImplementedError
|
|
157
|
+
|
|
158
|
+
async def get_output_async(self) -> EngineCoreOutputs:
|
|
159
|
+
raise NotImplementedError
|
|
160
|
+
|
|
161
|
+
async def add_request_async(self, request: EngineCoreRequest) -> None:
|
|
162
|
+
raise NotImplementedError
|
|
163
|
+
|
|
164
|
+
async def profile_async(self, is_start: bool = True) -> None:
|
|
165
|
+
raise NotImplementedError
|
|
166
|
+
|
|
167
|
+
async def reset_mm_cache_async(self) -> None:
|
|
168
|
+
raise NotImplementedError
|
|
169
|
+
|
|
170
|
+
async def reset_prefix_cache_async(self) -> None:
|
|
171
|
+
raise NotImplementedError
|
|
172
|
+
|
|
173
|
+
async def sleep_async(self, level: int = 1) -> None:
|
|
174
|
+
raise NotImplementedError
|
|
175
|
+
|
|
176
|
+
async def wake_up_async(self, tags: Optional[list[str]] = None) -> None:
|
|
177
|
+
raise NotImplementedError
|
|
178
|
+
|
|
179
|
+
async def is_sleeping_async(self) -> bool:
|
|
180
|
+
raise NotImplementedError
|
|
181
|
+
|
|
182
|
+
async def abort_requests_async(self, request_ids: list[str]) -> None:
|
|
183
|
+
raise NotImplementedError
|
|
184
|
+
|
|
185
|
+
async def add_lora_async(self, lora_request: LoRARequest) -> bool:
|
|
186
|
+
raise NotImplementedError
|
|
187
|
+
|
|
188
|
+
async def remove_lora_async(self, lora_id: int) -> bool:
|
|
189
|
+
raise NotImplementedError
|
|
190
|
+
|
|
191
|
+
async def list_loras_async(self) -> set[int]:
|
|
192
|
+
raise NotImplementedError
|
|
193
|
+
|
|
194
|
+
async def pin_lora_async(self, lora_id: int) -> bool:
|
|
195
|
+
raise NotImplementedError
|
|
196
|
+
|
|
197
|
+
async def save_sharded_state_async(self,
|
|
198
|
+
path: str,
|
|
199
|
+
pattern: Optional[str] = None,
|
|
200
|
+
max_size: Optional[int] = None) -> None:
|
|
201
|
+
raise NotImplementedError
|
|
202
|
+
|
|
203
|
+
async def collective_rpc_async(
|
|
204
|
+
self,
|
|
205
|
+
method: Union[str, Callable[..., _R]],
|
|
206
|
+
timeout: Optional[float] = None,
|
|
207
|
+
args: tuple = (),
|
|
208
|
+
kwargs: Optional[dict[str, Any]] = None) -> list[_R]:
|
|
209
|
+
raise NotImplementedError
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class InprocClient(EngineCoreClient):
|
|
213
|
+
"""
|
|
214
|
+
InprocClient: client for in-process EngineCore. Intended
|
|
215
|
+
for use in LLMEngine for V0-style add_request() and step()
|
|
216
|
+
EngineCore setup in this process (no busy loop).
|
|
217
|
+
|
|
218
|
+
* pushes EngineCoreRequest directly into the EngineCore
|
|
219
|
+
* pulls EngineCoreOutputs by stepping the EngineCore
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
def __init__(self, *args, **kwargs):
|
|
223
|
+
self.engine_core = EngineCore(*args, **kwargs)
|
|
224
|
+
|
|
225
|
+
def get_output(self) -> EngineCoreOutputs:
|
|
226
|
+
outputs, _ = self.engine_core.step()
|
|
227
|
+
return outputs.get(0) or EngineCoreOutputs()
|
|
228
|
+
|
|
229
|
+
def add_request(self, request: EngineCoreRequest) -> None:
|
|
230
|
+
self.engine_core.add_request(request)
|
|
231
|
+
|
|
232
|
+
def abort_requests(self, request_ids: list[str]) -> None:
|
|
233
|
+
if len(request_ids) > 0:
|
|
234
|
+
self.engine_core.abort_requests(request_ids)
|
|
235
|
+
|
|
236
|
+
def shutdown(self) -> None:
|
|
237
|
+
self.engine_core.shutdown()
|
|
238
|
+
|
|
239
|
+
def profile(self, is_start: bool = True) -> None:
|
|
240
|
+
self.engine_core.profile(is_start)
|
|
241
|
+
|
|
242
|
+
def reset_mm_cache(self) -> None:
|
|
243
|
+
self.engine_core.reset_mm_cache()
|
|
244
|
+
|
|
245
|
+
def reset_prefix_cache(self) -> None:
|
|
246
|
+
self.engine_core.reset_prefix_cache()
|
|
247
|
+
|
|
248
|
+
def sleep(self, level: int = 1) -> None:
|
|
249
|
+
self.engine_core.sleep(level)
|
|
250
|
+
|
|
251
|
+
def wake_up(self, tags: Optional[list[str]] = None) -> None:
|
|
252
|
+
self.engine_core.wake_up(tags)
|
|
253
|
+
|
|
254
|
+
def is_sleeping(self) -> bool:
|
|
255
|
+
return self.engine_core.is_sleeping()
|
|
256
|
+
|
|
257
|
+
def execute_dummy_batch(self) -> None:
|
|
258
|
+
self.engine_core.execute_dummy_batch()
|
|
259
|
+
|
|
260
|
+
def add_lora(self, lora_request: LoRARequest) -> bool:
|
|
261
|
+
return self.engine_core.add_lora(lora_request)
|
|
262
|
+
|
|
263
|
+
def remove_lora(self, lora_id: int) -> bool:
|
|
264
|
+
return self.engine_core.remove_lora(lora_id)
|
|
265
|
+
|
|
266
|
+
def list_loras(self) -> set[int]:
|
|
267
|
+
return self.engine_core.list_loras()
|
|
268
|
+
|
|
269
|
+
def pin_lora(self, lora_id: int) -> bool:
|
|
270
|
+
return self.engine_core.pin_lora(lora_id)
|
|
271
|
+
|
|
272
|
+
def save_sharded_state(self,
|
|
273
|
+
path: str,
|
|
274
|
+
pattern: Optional[str] = None,
|
|
275
|
+
max_size: Optional[int] = None) -> None:
|
|
276
|
+
self.engine_core.save_sharded_state(path, pattern, max_size)
|
|
277
|
+
|
|
278
|
+
def collective_rpc(self,
|
|
279
|
+
method: Union[str, Callable[..., _R]],
|
|
280
|
+
timeout: Optional[float] = None,
|
|
281
|
+
args: tuple = (),
|
|
282
|
+
kwargs: Optional[dict[str, Any]] = None) -> list[_R]:
|
|
283
|
+
return self.engine_core.collective_rpc(method, timeout, args, kwargs)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
@dataclass
|
|
287
|
+
class BackgroundResources:
|
|
288
|
+
"""Used as a finalizer for clean shutdown, avoiding
|
|
289
|
+
circular reference back to the client object."""
|
|
290
|
+
|
|
291
|
+
ctx: Union[zmq.Context]
|
|
292
|
+
# If CoreEngineProcManager, it manages local engines;
|
|
293
|
+
# if CoreEngineActorManager, it manages all engines.
|
|
294
|
+
engine_manager: Optional[Union[CoreEngineProcManager,
|
|
295
|
+
CoreEngineActorManager]] = None
|
|
296
|
+
coordinator: Optional[DPCoordinator] = None
|
|
297
|
+
output_socket: Optional[Union[zmq.Socket, zmq.asyncio.Socket]] = None
|
|
298
|
+
input_socket: Optional[Union[zmq.Socket, zmq.asyncio.Socket]] = None
|
|
299
|
+
first_req_send_socket: Optional[zmq.asyncio.Socket] = None
|
|
300
|
+
output_queue_task: Optional[asyncio.Task] = None
|
|
301
|
+
stats_update_task: Optional[asyncio.Task] = None
|
|
302
|
+
shutdown_path: Optional[str] = None
|
|
303
|
+
|
|
304
|
+
# Set if any of the engines are dead. Here so that the output
|
|
305
|
+
# processing threads can access it without holding a ref to the client.
|
|
306
|
+
engine_dead: bool = False
|
|
307
|
+
|
|
308
|
+
def __call__(self):
|
|
309
|
+
"""Clean up background resources."""
|
|
310
|
+
|
|
311
|
+
self.engine_dead = True
|
|
312
|
+
if self.engine_manager is not None:
|
|
313
|
+
self.engine_manager.close()
|
|
314
|
+
if self.coordinator is not None:
|
|
315
|
+
self.coordinator.close()
|
|
316
|
+
|
|
317
|
+
if self.output_queue_task is not None:
|
|
318
|
+
self.output_queue_task.cancel()
|
|
319
|
+
if self.stats_update_task is not None:
|
|
320
|
+
self.stats_update_task.cancel()
|
|
321
|
+
|
|
322
|
+
# ZMQ context termination can hang if the sockets
|
|
323
|
+
# aren't explicitly closed first.
|
|
324
|
+
for socket in (self.output_socket, self.input_socket,
|
|
325
|
+
self.first_req_send_socket):
|
|
326
|
+
if socket is not None:
|
|
327
|
+
socket.close(linger=0)
|
|
328
|
+
|
|
329
|
+
if self.shutdown_path is not None:
|
|
330
|
+
# We must ensure that the sync output socket is
|
|
331
|
+
# closed cleanly in its own thread.
|
|
332
|
+
with self.ctx.socket(zmq.PAIR) as shutdown_sender:
|
|
333
|
+
shutdown_sender.connect(self.shutdown_path)
|
|
334
|
+
# Send shutdown signal.
|
|
335
|
+
shutdown_sender.send(b'')
|
|
336
|
+
|
|
337
|
+
def validate_alive(self, frames: Sequence[zmq.Frame]):
|
|
338
|
+
if len(frames) == 1 and (frames[0].buffer
|
|
339
|
+
== EngineCoreProc.ENGINE_CORE_DEAD):
|
|
340
|
+
self.engine_dead = True
|
|
341
|
+
raise EngineDeadError()
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class MPClient(EngineCoreClient):
|
|
345
|
+
"""
|
|
346
|
+
MPClient: base client for multi-proc EngineCore.
|
|
347
|
+
EngineCore runs in a background process busy loop, getting
|
|
348
|
+
new EngineCoreRequests and returning EngineCoreOutputs
|
|
349
|
+
|
|
350
|
+
* pushes EngineCoreRequests via input_socket
|
|
351
|
+
* pulls EngineCoreOutputs via output_socket
|
|
352
|
+
|
|
353
|
+
* AsyncMPClient subclass for AsyncLLM usage
|
|
354
|
+
* SyncMPClient subclass for LLM usage
|
|
355
|
+
"""
|
|
356
|
+
|
|
357
|
+
def __init__(
|
|
358
|
+
self,
|
|
359
|
+
asyncio_mode: bool,
|
|
360
|
+
vllm_config: VllmConfig,
|
|
361
|
+
executor_class: type[Executor],
|
|
362
|
+
log_stats: bool,
|
|
363
|
+
client_addresses: Optional[dict[str, str]] = None,
|
|
364
|
+
):
|
|
365
|
+
self.vllm_config = vllm_config
|
|
366
|
+
# Serialization setup.
|
|
367
|
+
self.encoder = MsgpackEncoder()
|
|
368
|
+
self.decoder = MsgpackDecoder(EngineCoreOutputs)
|
|
369
|
+
|
|
370
|
+
# ZMQ setup.
|
|
371
|
+
sync_ctx = zmq.Context(io_threads=2)
|
|
372
|
+
self.ctx = zmq.asyncio.Context(sync_ctx) if asyncio_mode else sync_ctx
|
|
373
|
+
|
|
374
|
+
# This will ensure resources created so far are closed
|
|
375
|
+
# when the client is garbage collected, even if an
|
|
376
|
+
# exception is raised mid-construction.
|
|
377
|
+
self.resources = BackgroundResources(ctx=sync_ctx)
|
|
378
|
+
self._finalizer = weakref.finalize(self, self.resources)
|
|
379
|
+
success = False
|
|
380
|
+
try:
|
|
381
|
+
parallel_config = vllm_config.parallel_config
|
|
382
|
+
local_engine_count = parallel_config.data_parallel_size_local
|
|
383
|
+
local_start_index = parallel_config.data_parallel_rank_local
|
|
384
|
+
dp_size = parallel_config.data_parallel_size
|
|
385
|
+
dp_rank = parallel_config.data_parallel_rank
|
|
386
|
+
|
|
387
|
+
# SPMD mode is where there is an LLM instance per DP rank and
|
|
388
|
+
# one core engine per LLM, see
|
|
389
|
+
# examples/offline_inference/data_parallel.py.
|
|
390
|
+
spmd_mode = local_start_index is not None
|
|
391
|
+
if spmd_mode:
|
|
392
|
+
assert local_engine_count == 1
|
|
393
|
+
self.core_engines = [CoreEngine(index=dp_rank, local=True)]
|
|
394
|
+
else:
|
|
395
|
+
assert dp_rank == 0
|
|
396
|
+
local_start_index = 0
|
|
397
|
+
self.core_engines = [
|
|
398
|
+
CoreEngine(index=i, local=(i < local_engine_count))
|
|
399
|
+
for i in range(dp_size)
|
|
400
|
+
]
|
|
401
|
+
|
|
402
|
+
local_only = spmd_mode or local_engine_count == dp_size
|
|
403
|
+
|
|
404
|
+
self.stats_update_address: Optional[str] = None
|
|
405
|
+
if client_addresses is not None:
|
|
406
|
+
input_address = client_addresses["input_address"]
|
|
407
|
+
output_address = client_addresses["output_address"]
|
|
408
|
+
self.stats_update_address = client_addresses.get(
|
|
409
|
+
"stats_update_address")
|
|
410
|
+
else:
|
|
411
|
+
host = parallel_config.data_parallel_master_ip
|
|
412
|
+
input_address = get_engine_client_zmq_addr(local_only, host)
|
|
413
|
+
output_address = get_engine_client_zmq_addr(local_only, host)
|
|
414
|
+
|
|
415
|
+
# Create input and output sockets.
|
|
416
|
+
self.input_socket = self.resources.input_socket = make_zmq_socket(
|
|
417
|
+
self.ctx, input_address, zmq.ROUTER, bind=True)
|
|
418
|
+
self.resources.output_socket = make_zmq_socket(
|
|
419
|
+
self.ctx, output_address, zmq.PULL)
|
|
420
|
+
|
|
421
|
+
if client_addresses is None:
|
|
422
|
+
self._init_engines_direct(vllm_config, local_only,
|
|
423
|
+
local_start_index, input_address,
|
|
424
|
+
output_address, executor_class,
|
|
425
|
+
log_stats)
|
|
426
|
+
coordinator = self.resources.coordinator
|
|
427
|
+
if coordinator:
|
|
428
|
+
self.stats_update_address = (
|
|
429
|
+
coordinator.get_stats_publish_address())
|
|
430
|
+
|
|
431
|
+
# Wait for ready messages from each engine on the input socket.
|
|
432
|
+
identities = set(e.identity for e in self.core_engines)
|
|
433
|
+
sync_input_socket = zmq.Socket.shadow(self.input_socket)
|
|
434
|
+
while identities:
|
|
435
|
+
if not sync_input_socket.poll(timeout=600_000):
|
|
436
|
+
raise TimeoutError("Timed out waiting for engines to send"
|
|
437
|
+
"initial message on input socket.")
|
|
438
|
+
identity, _ = sync_input_socket.recv_multipart()
|
|
439
|
+
identities.remove(identity)
|
|
440
|
+
|
|
441
|
+
self.core_engine = self.core_engines[0]
|
|
442
|
+
self.utility_results: dict[int, AnyFuture] = {}
|
|
443
|
+
|
|
444
|
+
# Request objects which may contain pytorch-allocated tensors
|
|
445
|
+
# that we need to keep references to until zmq is done with the
|
|
446
|
+
# underlying data.
|
|
447
|
+
self.pending_messages = deque[tuple[zmq.MessageTracker, Any]]()
|
|
448
|
+
|
|
449
|
+
success = True
|
|
450
|
+
finally:
|
|
451
|
+
if not success:
|
|
452
|
+
self._finalizer()
|
|
453
|
+
|
|
454
|
+
def _init_engines_direct(self, vllm_config: VllmConfig, local_only: bool,
|
|
455
|
+
local_start_index: int, input_address: str,
|
|
456
|
+
output_address: str,
|
|
457
|
+
executor_class: type[Executor], log_stats: bool):
|
|
458
|
+
"""Self-contained client mode, launch engine and coordinator process
|
|
459
|
+
as needed."""
|
|
460
|
+
|
|
461
|
+
parallel_config = vllm_config.parallel_config
|
|
462
|
+
local_engine_count = parallel_config.data_parallel_size_local
|
|
463
|
+
start_index = parallel_config.data_parallel_rank
|
|
464
|
+
host = parallel_config.data_parallel_master_ip
|
|
465
|
+
|
|
466
|
+
if len(self.core_engines) > 1:
|
|
467
|
+
self.resources.coordinator = DPCoordinator(parallel_config)
|
|
468
|
+
|
|
469
|
+
handshake_address = get_engine_client_zmq_addr(
|
|
470
|
+
local_only, host, parallel_config.data_parallel_rpc_port)
|
|
471
|
+
|
|
472
|
+
with zmq_socket_ctx(handshake_address, zmq.ROUTER,
|
|
473
|
+
bind=True) as handshake_socket:
|
|
474
|
+
|
|
475
|
+
# Start local engines.
|
|
476
|
+
if local_engine_count:
|
|
477
|
+
# In server mode, start_index and local_start_index will
|
|
478
|
+
# both be 0.
|
|
479
|
+
self.resources.engine_manager = CoreEngineProcManager(
|
|
480
|
+
EngineCoreProc.run_engine_core,
|
|
481
|
+
vllm_config=vllm_config,
|
|
482
|
+
executor_class=executor_class,
|
|
483
|
+
log_stats=log_stats,
|
|
484
|
+
handshake_address=handshake_address,
|
|
485
|
+
on_head_node=True,
|
|
486
|
+
local_engine_count=local_engine_count,
|
|
487
|
+
start_index=start_index,
|
|
488
|
+
local_start_index=local_start_index)
|
|
489
|
+
|
|
490
|
+
# Wait for engine core process(es) to start.
|
|
491
|
+
self._wait_for_engine_startup(handshake_socket, input_address,
|
|
492
|
+
output_address)
|
|
493
|
+
|
|
494
|
+
def _wait_for_engine_startup(self, handshake_socket: zmq.Socket,
|
|
495
|
+
input_address: str, output_address: str):
|
|
496
|
+
addresses = EngineZmqAddresses(
|
|
497
|
+
inputs=[input_address],
|
|
498
|
+
outputs=[output_address],
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
coordinator = self.resources.coordinator
|
|
502
|
+
if coordinator is not None:
|
|
503
|
+
addresses.coordinator_input, addresses.coordinator_output = (
|
|
504
|
+
coordinator.get_engine_socket_addresses())
|
|
505
|
+
|
|
506
|
+
proc_manager = self.resources.engine_manager
|
|
507
|
+
assert isinstance(proc_manager, (type(None), CoreEngineProcManager)), (
|
|
508
|
+
"_wait_for_engine_startup should only be "
|
|
509
|
+
"called with CoreEngineProcManager")
|
|
510
|
+
|
|
511
|
+
wait_for_engine_startup(
|
|
512
|
+
handshake_socket,
|
|
513
|
+
addresses,
|
|
514
|
+
self.core_engines,
|
|
515
|
+
self.vllm_config.parallel_config,
|
|
516
|
+
self.vllm_config.cache_config,
|
|
517
|
+
proc_manager,
|
|
518
|
+
coordinator.proc if coordinator else None,
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
def shutdown(self):
|
|
522
|
+
# Terminate background resources.
|
|
523
|
+
self._finalizer()
|
|
524
|
+
|
|
525
|
+
def _format_exception(self, e: Exception) -> Exception:
|
|
526
|
+
"""If errored, use EngineDeadError so root cause is clear."""
|
|
527
|
+
return EngineDeadError(
|
|
528
|
+
suppress_context=True) if self.resources.engine_dead else e
|
|
529
|
+
|
|
530
|
+
def ensure_alive(self):
|
|
531
|
+
if self.resources.engine_dead:
|
|
532
|
+
raise EngineDeadError()
|
|
533
|
+
|
|
534
|
+
def add_pending_message(self, tracker: zmq.MessageTracker, msg: Any):
|
|
535
|
+
if not tracker.done:
|
|
536
|
+
self.pending_messages.appendleft((tracker, msg))
|
|
537
|
+
|
|
538
|
+
def free_pending_messages(self):
|
|
539
|
+
while self.pending_messages and self.pending_messages[-1][0].done:
|
|
540
|
+
self.pending_messages.pop()
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
def _process_utility_output(output: UtilityOutput,
|
|
544
|
+
utility_results: dict[int, AnyFuture]):
|
|
545
|
+
"""Set the result from a utility method in the waiting future"""
|
|
546
|
+
future = utility_results.pop(output.call_id)
|
|
547
|
+
if output.failure_message is not None:
|
|
548
|
+
future.set_exception(Exception(output.failure_message))
|
|
549
|
+
else:
|
|
550
|
+
future.set_result(output.result)
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
class SyncMPClient(MPClient):
|
|
554
|
+
"""Synchronous client for multi-proc EngineCore."""
|
|
555
|
+
|
|
556
|
+
def __init__(self, vllm_config: VllmConfig, executor_class: type[Executor],
|
|
557
|
+
log_stats: bool):
|
|
558
|
+
super().__init__(
|
|
559
|
+
asyncio_mode=False,
|
|
560
|
+
vllm_config=vllm_config,
|
|
561
|
+
executor_class=executor_class,
|
|
562
|
+
log_stats=log_stats,
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
self.outputs_queue = queue.Queue[Union[EngineCoreOutputs, Exception]]()
|
|
566
|
+
|
|
567
|
+
# Ensure that the outputs socket processing thread does not have
|
|
568
|
+
# a ref to the client which prevents gc.
|
|
569
|
+
ctx = self.ctx
|
|
570
|
+
out_socket = self.resources.output_socket
|
|
571
|
+
assert out_socket is not None
|
|
572
|
+
decoder = self.decoder
|
|
573
|
+
utility_results = self.utility_results
|
|
574
|
+
outputs_queue = self.outputs_queue
|
|
575
|
+
|
|
576
|
+
shutdown_path = get_open_zmq_inproc_path()
|
|
577
|
+
resources = self.resources
|
|
578
|
+
resources.shutdown_path = shutdown_path
|
|
579
|
+
|
|
580
|
+
def process_outputs_socket():
|
|
581
|
+
shutdown_socket = ctx.socket(zmq.PAIR)
|
|
582
|
+
try:
|
|
583
|
+
shutdown_socket.bind(shutdown_path)
|
|
584
|
+
poller = zmq.Poller()
|
|
585
|
+
poller.register(shutdown_socket, zmq.POLLIN)
|
|
586
|
+
poller.register(out_socket, zmq.POLLIN)
|
|
587
|
+
while True:
|
|
588
|
+
socks = poller.poll()
|
|
589
|
+
if not socks:
|
|
590
|
+
continue
|
|
591
|
+
if len(socks) == 2 or socks[0][0] == shutdown_socket:
|
|
592
|
+
# shutdown signal, exit thread.
|
|
593
|
+
break
|
|
594
|
+
|
|
595
|
+
frames = out_socket.recv_multipart(copy=False)
|
|
596
|
+
resources.validate_alive(frames)
|
|
597
|
+
outputs = decoder.decode(frames)
|
|
598
|
+
if outputs.utility_output:
|
|
599
|
+
_process_utility_output(outputs.utility_output,
|
|
600
|
+
utility_results)
|
|
601
|
+
else:
|
|
602
|
+
outputs_queue.put_nowait(outputs)
|
|
603
|
+
except Exception as e:
|
|
604
|
+
outputs_queue.put_nowait(e)
|
|
605
|
+
finally:
|
|
606
|
+
# Close sockets.
|
|
607
|
+
shutdown_socket.close(linger=0)
|
|
608
|
+
out_socket.close(linger=0)
|
|
609
|
+
|
|
610
|
+
# Process outputs from engine in separate thread.
|
|
611
|
+
self.output_queue_thread = Thread(target=process_outputs_socket,
|
|
612
|
+
name="EngineCoreOutputQueueThread",
|
|
613
|
+
daemon=True)
|
|
614
|
+
self.output_queue_thread.start()
|
|
615
|
+
|
|
616
|
+
# The thread takes on responsibility for closing the socket.
|
|
617
|
+
self.resources.output_socket = None
|
|
618
|
+
|
|
619
|
+
def get_output(self) -> EngineCoreOutputs:
|
|
620
|
+
# If an exception arises in process_outputs_socket task,
|
|
621
|
+
# it is forwarded to the outputs_queue so we can raise it
|
|
622
|
+
# from this (run_output_handler) task to shut down the server.
|
|
623
|
+
outputs = self.outputs_queue.get()
|
|
624
|
+
if isinstance(outputs, Exception):
|
|
625
|
+
raise self._format_exception(outputs) from None
|
|
626
|
+
return outputs
|
|
627
|
+
|
|
628
|
+
def _send_input(self, request_type: EngineCoreRequestType, request: Any):
|
|
629
|
+
self.ensure_alive()
|
|
630
|
+
self.free_pending_messages()
|
|
631
|
+
# (Identity, RequestType, SerializedRequest)
|
|
632
|
+
msg = (self.core_engine.identity, request_type.value,
|
|
633
|
+
*self.encoder.encode(request))
|
|
634
|
+
|
|
635
|
+
if len(msg) <= 3:
|
|
636
|
+
# No auxiliary buffers => no tensor backing buffers in request.
|
|
637
|
+
self.input_socket.send_multipart(msg, copy=False)
|
|
638
|
+
return
|
|
639
|
+
|
|
640
|
+
tracker = self.input_socket.send_multipart(msg, copy=False, track=True)
|
|
641
|
+
self.add_pending_message(tracker, request)
|
|
642
|
+
|
|
643
|
+
def call_utility(self, method: str, *args) -> Any:
|
|
644
|
+
call_id = uuid.uuid1().int >> 64
|
|
645
|
+
future: Future[Any] = Future()
|
|
646
|
+
self.utility_results[call_id] = future
|
|
647
|
+
self._send_input(EngineCoreRequestType.UTILITY,
|
|
648
|
+
(0, call_id, method, args))
|
|
649
|
+
|
|
650
|
+
return future.result()
|
|
651
|
+
|
|
652
|
+
def add_request(self, request: EngineCoreRequest) -> None:
|
|
653
|
+
self._send_input(EngineCoreRequestType.ADD, request)
|
|
654
|
+
|
|
655
|
+
def abort_requests(self, request_ids: list[str]) -> None:
|
|
656
|
+
if request_ids and not self.resources.engine_dead:
|
|
657
|
+
self._send_input(EngineCoreRequestType.ABORT, request_ids)
|
|
658
|
+
|
|
659
|
+
def profile(self, is_start: bool = True) -> None:
|
|
660
|
+
self.call_utility("profile", is_start)
|
|
661
|
+
|
|
662
|
+
def reset_mm_cache(self) -> None:
|
|
663
|
+
self.call_utility("reset_mm_cache")
|
|
664
|
+
|
|
665
|
+
def reset_prefix_cache(self) -> None:
|
|
666
|
+
self.call_utility("reset_prefix_cache")
|
|
667
|
+
|
|
668
|
+
def add_lora(self, lora_request: LoRARequest) -> bool:
|
|
669
|
+
return self.call_utility("add_lora", lora_request)
|
|
670
|
+
|
|
671
|
+
def remove_lora(self, lora_id: int) -> bool:
|
|
672
|
+
return self.call_utility("remove_lora", lora_id)
|
|
673
|
+
|
|
674
|
+
def list_loras(self) -> set[int]:
|
|
675
|
+
return self.call_utility("list_loras")
|
|
676
|
+
|
|
677
|
+
def pin_lora(self, lora_id: int) -> bool:
|
|
678
|
+
return self.call_utility("pin_lora", lora_id)
|
|
679
|
+
|
|
680
|
+
def sleep(self, level: int = 1) -> None:
|
|
681
|
+
self.call_utility("sleep", level)
|
|
682
|
+
|
|
683
|
+
def wake_up(self, tags: Optional[list[str]] = None) -> None:
|
|
684
|
+
self.call_utility("wake_up", tags)
|
|
685
|
+
|
|
686
|
+
def is_sleeping(self) -> bool:
|
|
687
|
+
return self.call_utility("is_sleeping")
|
|
688
|
+
|
|
689
|
+
def execute_dummy_batch(self) -> None:
|
|
690
|
+
self.call_utility("execute_dummy_batch")
|
|
691
|
+
|
|
692
|
+
def collective_rpc(self,
|
|
693
|
+
method: Union[str, Callable[..., _R]],
|
|
694
|
+
timeout: Optional[float] = None,
|
|
695
|
+
args: tuple = (),
|
|
696
|
+
kwargs: Optional[dict[str, Any]] = None) -> list[_R]:
|
|
697
|
+
return self.call_utility("collective_rpc", method, timeout, args,
|
|
698
|
+
kwargs)
|
|
699
|
+
|
|
700
|
+
def save_sharded_state(self,
|
|
701
|
+
path: str,
|
|
702
|
+
pattern: Optional[str] = None,
|
|
703
|
+
max_size: Optional[int] = None) -> None:
|
|
704
|
+
self.call_utility("save_sharded_state", path, pattern, max_size)
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
class AsyncMPClient(MPClient):
|
|
708
|
+
"""Asyncio-compatible client for multi-proc EngineCore."""
|
|
709
|
+
|
|
710
|
+
def __init__(self,
|
|
711
|
+
vllm_config: VllmConfig,
|
|
712
|
+
executor_class: type[Executor],
|
|
713
|
+
log_stats: bool,
|
|
714
|
+
client_addresses: Optional[dict[str, str]] = None,
|
|
715
|
+
client_index: int = 0):
|
|
716
|
+
super().__init__(
|
|
717
|
+
asyncio_mode=True,
|
|
718
|
+
vllm_config=vllm_config,
|
|
719
|
+
executor_class=executor_class,
|
|
720
|
+
log_stats=log_stats,
|
|
721
|
+
client_addresses=client_addresses,
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
self.client_index = client_index
|
|
725
|
+
self.outputs_queue = asyncio.Queue[Union[EngineCoreOutputs,
|
|
726
|
+
Exception]]()
|
|
727
|
+
try:
|
|
728
|
+
# If we are running in an asyncio event loop, start the queue task.
|
|
729
|
+
# Otherwise, it will be started lazily. If it is not started here,
|
|
730
|
+
# we could miss EXECUTOR_FAILED messages from engine core if they
|
|
731
|
+
# occur prior to any requests being sent.
|
|
732
|
+
asyncio.get_running_loop()
|
|
733
|
+
self._ensure_output_queue_task()
|
|
734
|
+
except RuntimeError:
|
|
735
|
+
pass
|
|
736
|
+
|
|
737
|
+
def _ensure_output_queue_task(self):
|
|
738
|
+
resources = self.resources
|
|
739
|
+
if resources.output_queue_task is not None:
|
|
740
|
+
return
|
|
741
|
+
|
|
742
|
+
# Perform IO in separate task to parallelize as much as possible.
|
|
743
|
+
# Avoid task having direct reference back to the client.
|
|
744
|
+
decoder = self.decoder
|
|
745
|
+
utility_results = self.utility_results
|
|
746
|
+
outputs_queue = self.outputs_queue
|
|
747
|
+
output_handler: Optional[Callable[[AsyncMPClient, EngineCoreOutputs],
|
|
748
|
+
Awaitable[None]]] = getattr(
|
|
749
|
+
self.__class__,
|
|
750
|
+
"process_engine_outputs", None)
|
|
751
|
+
_self_ref = weakref.ref(self) if output_handler else None
|
|
752
|
+
output_socket = resources.output_socket
|
|
753
|
+
assert output_socket is not None
|
|
754
|
+
|
|
755
|
+
async def process_outputs_socket():
|
|
756
|
+
try:
|
|
757
|
+
while True:
|
|
758
|
+
frames = await output_socket.recv_multipart(copy=False)
|
|
759
|
+
resources.validate_alive(frames)
|
|
760
|
+
outputs: EngineCoreOutputs = decoder.decode(frames)
|
|
761
|
+
if outputs.utility_output:
|
|
762
|
+
_process_utility_output(outputs.utility_output,
|
|
763
|
+
utility_results)
|
|
764
|
+
continue
|
|
765
|
+
|
|
766
|
+
if output_handler is not None:
|
|
767
|
+
assert _self_ref is not None
|
|
768
|
+
_self = _self_ref()
|
|
769
|
+
if not _self:
|
|
770
|
+
# Client has been garbage collected, abort.
|
|
771
|
+
return
|
|
772
|
+
await output_handler(_self, outputs)
|
|
773
|
+
|
|
774
|
+
if outputs.outputs or outputs.scheduler_stats:
|
|
775
|
+
outputs_queue.put_nowait(outputs)
|
|
776
|
+
except Exception as e:
|
|
777
|
+
outputs_queue.put_nowait(e)
|
|
778
|
+
|
|
779
|
+
resources.output_queue_task = asyncio.create_task(
|
|
780
|
+
process_outputs_socket(), name="EngineCoreOutputQueueTask")
|
|
781
|
+
|
|
782
|
+
async def get_output_async(self) -> EngineCoreOutputs:
|
|
783
|
+
self._ensure_output_queue_task()
|
|
784
|
+
# If an exception arises in process_outputs_socket task,
|
|
785
|
+
# it is forwarded to the outputs_queue so we can raise it
|
|
786
|
+
# from this (run_output_handler) task to shut down the server.
|
|
787
|
+
assert self.outputs_queue is not None
|
|
788
|
+
outputs = await self.outputs_queue.get()
|
|
789
|
+
if isinstance(outputs, Exception):
|
|
790
|
+
raise self._format_exception(outputs) from None
|
|
791
|
+
return outputs
|
|
792
|
+
|
|
793
|
+
def _send_input(self,
|
|
794
|
+
request_type: EngineCoreRequestType,
|
|
795
|
+
request: Any,
|
|
796
|
+
engine: Optional[CoreEngine] = None) -> Awaitable[Any]:
|
|
797
|
+
self.ensure_alive()
|
|
798
|
+
if engine is None:
|
|
799
|
+
engine = self.core_engine
|
|
800
|
+
|
|
801
|
+
message = (request_type.value, *self.encoder.encode(request))
|
|
802
|
+
return self._send_input_message(message, engine, request)
|
|
803
|
+
|
|
804
|
+
def _send_input_message(self, message: tuple[bytestr,
|
|
805
|
+
...], engine: CoreEngine,
|
|
806
|
+
objects: Any) -> Awaitable[Any]:
|
|
807
|
+
"""
|
|
808
|
+
objects is a reference to retain until zmq is finished with the
|
|
809
|
+
buffers, in case they were extracted from tensors in the request.
|
|
810
|
+
"""
|
|
811
|
+
self.ensure_alive()
|
|
812
|
+
self.free_pending_messages()
|
|
813
|
+
|
|
814
|
+
msg = (engine.identity, ) + message
|
|
815
|
+
if not objects or len(msg) <= 3:
|
|
816
|
+
# No auxiliary buffers => no tensor backing buffers in request.
|
|
817
|
+
return self.input_socket.send_multipart(msg, copy=False)
|
|
818
|
+
|
|
819
|
+
future: asyncio.Future[zmq.MessageTracker]
|
|
820
|
+
future = self.input_socket.send_multipart(msg, copy=False, track=True)
|
|
821
|
+
|
|
822
|
+
def add_pending(f: asyncio.Future[zmq.MessageTracker]):
|
|
823
|
+
with contextlib.suppress(BaseException):
|
|
824
|
+
self.add_pending_message(f.result(), objects)
|
|
825
|
+
|
|
826
|
+
future.add_done_callback(add_pending)
|
|
827
|
+
return future
|
|
828
|
+
|
|
829
|
+
async def call_utility_async(self, method: str, *args) -> Any:
|
|
830
|
+
return await self._call_utility_async(method,
|
|
831
|
+
*args,
|
|
832
|
+
engine=self.core_engine)
|
|
833
|
+
|
|
834
|
+
async def _call_utility_async(self, method: str, *args,
|
|
835
|
+
engine: CoreEngine) -> Any:
|
|
836
|
+
call_id = uuid.uuid1().int >> 64
|
|
837
|
+
future = asyncio.get_running_loop().create_future()
|
|
838
|
+
self.utility_results[call_id] = future
|
|
839
|
+
message = (EngineCoreRequestType.UTILITY.value, *self.encoder.encode(
|
|
840
|
+
(self.client_index, call_id, method, args)))
|
|
841
|
+
await self._send_input_message(message, engine, args)
|
|
842
|
+
self._ensure_output_queue_task()
|
|
843
|
+
return await future
|
|
844
|
+
|
|
845
|
+
async def add_request_async(self, request: EngineCoreRequest) -> None:
|
|
846
|
+
request.client_index = self.client_index
|
|
847
|
+
await self._send_input(EngineCoreRequestType.ADD, request)
|
|
848
|
+
self._ensure_output_queue_task()
|
|
849
|
+
|
|
850
|
+
async def abort_requests_async(self, request_ids: list[str]) -> None:
|
|
851
|
+
if request_ids and not self.resources.engine_dead:
|
|
852
|
+
await self._send_input(EngineCoreRequestType.ABORT, request_ids)
|
|
853
|
+
|
|
854
|
+
async def profile_async(self, is_start: bool = True) -> None:
|
|
855
|
+
await self.call_utility_async("profile", is_start)
|
|
856
|
+
|
|
857
|
+
async def reset_mm_cache_async(self) -> None:
|
|
858
|
+
await self.call_utility_async("reset_mm_cache")
|
|
859
|
+
|
|
860
|
+
async def reset_prefix_cache_async(self) -> None:
|
|
861
|
+
await self.call_utility_async("reset_prefix_cache")
|
|
862
|
+
|
|
863
|
+
async def sleep_async(self, level: int = 1) -> None:
|
|
864
|
+
await self.call_utility_async("sleep", level)
|
|
865
|
+
|
|
866
|
+
async def wake_up_async(self, tags: Optional[list[str]] = None) -> None:
|
|
867
|
+
await self.call_utility_async("wake_up", tags)
|
|
868
|
+
|
|
869
|
+
async def is_sleeping_async(self) -> bool:
|
|
870
|
+
return await self.call_utility_async("is_sleeping")
|
|
871
|
+
|
|
872
|
+
async def execute_dummy_batch_async(self) -> None:
|
|
873
|
+
await self.call_utility_async("execute_dummy_batch")
|
|
874
|
+
|
|
875
|
+
async def add_lora_async(self, lora_request: LoRARequest) -> bool:
|
|
876
|
+
return await self.call_utility_async("add_lora", lora_request)
|
|
877
|
+
|
|
878
|
+
async def remove_lora_async(self, lora_id: int) -> bool:
|
|
879
|
+
return await self.call_utility_async("remove_lora", lora_id)
|
|
880
|
+
|
|
881
|
+
async def list_loras_async(self) -> set[int]:
|
|
882
|
+
return await self.call_utility_async("list_loras")
|
|
883
|
+
|
|
884
|
+
async def pin_lora_async(self, lora_id: int) -> bool:
|
|
885
|
+
return await self.call_utility_async("pin_lora", lora_id)
|
|
886
|
+
|
|
887
|
+
async def save_sharded_state_async(self,
|
|
888
|
+
path: str,
|
|
889
|
+
pattern: Optional[str] = None,
|
|
890
|
+
max_size: Optional[int] = None) -> None:
|
|
891
|
+
await self.call_utility_async("save_sharded_state", path, pattern,
|
|
892
|
+
max_size)
|
|
893
|
+
|
|
894
|
+
async def collective_rpc_async(
|
|
895
|
+
self,
|
|
896
|
+
method: Union[str, Callable[..., _R]],
|
|
897
|
+
timeout: Optional[float] = None,
|
|
898
|
+
args: tuple = (),
|
|
899
|
+
kwargs: Optional[dict[str, Any]] = None) -> list[_R]:
|
|
900
|
+
return await self.call_utility_async("collective_rpc", method, timeout,
|
|
901
|
+
args, kwargs)
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
class DPAsyncMPClient(AsyncMPClient):
|
|
905
|
+
"""Asyncio-compatible client for multi-proc, multi-engine (data parallel)
|
|
906
|
+
EngineCore."""
|
|
907
|
+
|
|
908
|
+
def __init__(self,
|
|
909
|
+
vllm_config: VllmConfig,
|
|
910
|
+
executor_class: type[Executor],
|
|
911
|
+
log_stats: bool,
|
|
912
|
+
client_addresses: Optional[dict[str, str]] = None,
|
|
913
|
+
client_index: int = 0):
|
|
914
|
+
self.current_wave = 0
|
|
915
|
+
self.engines_running = False
|
|
916
|
+
# To route aborts to the correct engine.
|
|
917
|
+
self.reqs_in_flight: dict[str, CoreEngine] = {}
|
|
918
|
+
|
|
919
|
+
super().__init__(vllm_config, executor_class, log_stats,
|
|
920
|
+
client_addresses, client_index)
|
|
921
|
+
|
|
922
|
+
assert len(self.core_engines) > 1
|
|
923
|
+
|
|
924
|
+
# List of [waiting, running] pair per engine.
|
|
925
|
+
self.lb_engines: list[list[int]] = []
|
|
926
|
+
|
|
927
|
+
self.first_req_sock_addr = get_open_zmq_inproc_path()
|
|
928
|
+
self.first_req_send_socket = self.resources.first_req_send_socket = (
|
|
929
|
+
make_zmq_socket(self.ctx,
|
|
930
|
+
self.first_req_sock_addr,
|
|
931
|
+
zmq.PAIR,
|
|
932
|
+
bind=True))
|
|
933
|
+
try:
|
|
934
|
+
# If we are running in an asyncio event loop, start the stats task.
|
|
935
|
+
# Otherwise, it will be started lazily.
|
|
936
|
+
asyncio.get_running_loop()
|
|
937
|
+
self._ensure_stats_update_task()
|
|
938
|
+
except RuntimeError:
|
|
939
|
+
pass
|
|
940
|
+
|
|
941
|
+
def _ensure_stats_update_task(self):
|
|
942
|
+
resources = self.resources
|
|
943
|
+
if resources.stats_update_task is not None:
|
|
944
|
+
return
|
|
945
|
+
|
|
946
|
+
assert self.stats_update_address is not None
|
|
947
|
+
|
|
948
|
+
async def run_engine_stats_update_task():
|
|
949
|
+
with make_zmq_socket(self.ctx, self.stats_update_address,
|
|
950
|
+
zmq.XSUB) as socket, make_zmq_socket(
|
|
951
|
+
self.ctx,
|
|
952
|
+
self.first_req_sock_addr,
|
|
953
|
+
zmq.PAIR,
|
|
954
|
+
bind=False) as first_req_rcv_socket:
|
|
955
|
+
# Send subscription message.
|
|
956
|
+
await socket.send(b'\x01')
|
|
957
|
+
|
|
958
|
+
poller = zmq.asyncio.Poller()
|
|
959
|
+
poller.register(socket, zmq.POLLIN)
|
|
960
|
+
poller.register(first_req_rcv_socket, zmq.POLLIN)
|
|
961
|
+
|
|
962
|
+
while True:
|
|
963
|
+
events = await poller.poll()
|
|
964
|
+
if not self.engines_running and len(events) == 2 or (
|
|
965
|
+
events[0][0] == first_req_rcv_socket):
|
|
966
|
+
# Send a message to notify the coordinator that
|
|
967
|
+
# we're sending a request while the engines are
|
|
968
|
+
# paused, so that it can wake the others up
|
|
969
|
+
# (to run dummy EP loop).
|
|
970
|
+
self.engines_running = True
|
|
971
|
+
buf = first_req_rcv_socket.recv(
|
|
972
|
+
flags=zmq.NOBLOCK).result()
|
|
973
|
+
target_eng_index = int.from_bytes(buf, "little")
|
|
974
|
+
msg = msgspec.msgpack.encode(
|
|
975
|
+
(target_eng_index, self.current_wave))
|
|
976
|
+
await socket.send(msg)
|
|
977
|
+
|
|
978
|
+
buf = None
|
|
979
|
+
while True:
|
|
980
|
+
# Drain all stats events (we only care about latest).
|
|
981
|
+
future: asyncio.Future[bytes] = socket.recv(
|
|
982
|
+
flags=zmq.NOBLOCK)
|
|
983
|
+
if isinstance(future.exception(), zmq.Again):
|
|
984
|
+
break
|
|
985
|
+
buf = future.result()
|
|
986
|
+
if buf is None:
|
|
987
|
+
continue
|
|
988
|
+
|
|
989
|
+
# Update local load-balancing state.
|
|
990
|
+
counts, wave, running = msgspec.msgpack.decode(buf)
|
|
991
|
+
self.current_wave = wave
|
|
992
|
+
self.engines_running = running
|
|
993
|
+
self.lb_engines = counts
|
|
994
|
+
|
|
995
|
+
resources.stats_update_task = asyncio.create_task(
|
|
996
|
+
run_engine_stats_update_task())
|
|
997
|
+
|
|
998
|
+
def get_core_engine_for_request(self,
|
|
999
|
+
dp_rank: Optional[int] = None
|
|
1000
|
+
) -> CoreEngine:
|
|
1001
|
+
if dp_rank is not None:
|
|
1002
|
+
# engines are already in rank order
|
|
1003
|
+
return self.core_engines[dp_rank]
|
|
1004
|
+
|
|
1005
|
+
if not self.lb_engines:
|
|
1006
|
+
return self.core_engines[0]
|
|
1007
|
+
# TODO use P2C alg for larger DP sizes
|
|
1008
|
+
num_engines = len(self.lb_engines)
|
|
1009
|
+
min_counts = [sys.maxsize, sys.maxsize]
|
|
1010
|
+
eng_index = 0
|
|
1011
|
+
for i in range(num_engines):
|
|
1012
|
+
# Start from client_index to help with balancing when engines
|
|
1013
|
+
# are empty.
|
|
1014
|
+
idx = (self.client_index + i) % num_engines
|
|
1015
|
+
counts = self.lb_engines[idx]
|
|
1016
|
+
if counts < min_counts:
|
|
1017
|
+
min_counts = counts
|
|
1018
|
+
eng_index = idx
|
|
1019
|
+
# Adjust local counts for better balancing between stats updates
|
|
1020
|
+
# from the coordinator (which happen every 100ms).
|
|
1021
|
+
if min_counts[0]:
|
|
1022
|
+
min_counts[0] += 1
|
|
1023
|
+
else:
|
|
1024
|
+
min_counts[1] += 1
|
|
1025
|
+
return self.core_engines[eng_index]
|
|
1026
|
+
|
|
1027
|
+
async def call_utility_async(self, method: str, *args) -> Any:
|
|
1028
|
+
# Only the result from the first engine is returned.
|
|
1029
|
+
return (await asyncio.gather(*[
|
|
1030
|
+
self._call_utility_async(method, *args, engine=engine)
|
|
1031
|
+
for engine in self.core_engines
|
|
1032
|
+
]))[0]
|
|
1033
|
+
|
|
1034
|
+
async def add_request_async(self, request: EngineCoreRequest) -> None:
|
|
1035
|
+
self._ensure_stats_update_task()
|
|
1036
|
+
|
|
1037
|
+
request.current_wave = self.current_wave
|
|
1038
|
+
request.client_index = self.client_index
|
|
1039
|
+
|
|
1040
|
+
chosen_engine = self.get_core_engine_for_request(
|
|
1041
|
+
request.data_parallel_rank)
|
|
1042
|
+
self.reqs_in_flight[request.request_id] = chosen_engine
|
|
1043
|
+
|
|
1044
|
+
to_await = self._send_input(EngineCoreRequestType.ADD, request,
|
|
1045
|
+
chosen_engine)
|
|
1046
|
+
if not self.engines_running:
|
|
1047
|
+
# Notify coordinator that we're sending a request
|
|
1048
|
+
await self.first_req_send_socket.send(chosen_engine.identity)
|
|
1049
|
+
|
|
1050
|
+
await to_await
|
|
1051
|
+
|
|
1052
|
+
self._ensure_output_queue_task()
|
|
1053
|
+
|
|
1054
|
+
@staticmethod
|
|
1055
|
+
async def process_engine_outputs(self: "DPAsyncMPClient",
|
|
1056
|
+
outputs: EngineCoreOutputs):
|
|
1057
|
+
if outputs.finished_requests and self.reqs_in_flight:
|
|
1058
|
+
for req_id in outputs.finished_requests:
|
|
1059
|
+
self.reqs_in_flight.pop(req_id, None)
|
|
1060
|
+
|
|
1061
|
+
async def abort_requests_async(self, request_ids: list[str]) -> None:
|
|
1062
|
+
if not request_ids:
|
|
1063
|
+
return
|
|
1064
|
+
|
|
1065
|
+
if len(request_ids) == 1:
|
|
1066
|
+
# Fast-path common case.
|
|
1067
|
+
if engine := self.reqs_in_flight.get(request_ids[0]):
|
|
1068
|
+
await self._abort_requests(request_ids, engine)
|
|
1069
|
+
return
|
|
1070
|
+
|
|
1071
|
+
by_engine: dict[CoreEngine, list[str]] = {}
|
|
1072
|
+
for req_id in request_ids:
|
|
1073
|
+
if engine := self.reqs_in_flight.get(req_id):
|
|
1074
|
+
by_engine.setdefault(engine, []).append(req_id)
|
|
1075
|
+
for engine, req_ids in by_engine.items():
|
|
1076
|
+
await self._abort_requests(req_ids, engine)
|
|
1077
|
+
|
|
1078
|
+
async def _abort_requests(self, request_ids: list[str],
|
|
1079
|
+
engine: CoreEngine) -> None:
|
|
1080
|
+
if not self.resources.engine_dead:
|
|
1081
|
+
await self._send_input(EngineCoreRequestType.ABORT, request_ids,
|
|
1082
|
+
engine)
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
class RayDPClient(DPAsyncMPClient):
|
|
1086
|
+
"""
|
|
1087
|
+
Ray-based client for multi-proc, multi-engine (data parallel)
|
|
1088
|
+
EngineCore.
|
|
1089
|
+
"""
|
|
1090
|
+
|
|
1091
|
+
def __init__(
|
|
1092
|
+
self,
|
|
1093
|
+
vllm_config: VllmConfig,
|
|
1094
|
+
executor_class: type[Executor],
|
|
1095
|
+
log_stats: bool,
|
|
1096
|
+
client_addresses: Optional[dict[str, str]] = None,
|
|
1097
|
+
client_index: int = 0,
|
|
1098
|
+
):
|
|
1099
|
+
super().__init__(vllm_config, executor_class, log_stats,
|
|
1100
|
+
client_addresses, client_index)
|
|
1101
|
+
|
|
1102
|
+
def _init_engines_direct(self, vllm_config: VllmConfig, local_only: bool,
|
|
1103
|
+
local_start_index: int, input_address: str,
|
|
1104
|
+
output_address: str,
|
|
1105
|
+
executor_class: type[Executor], log_stats: bool):
|
|
1106
|
+
"""Self-contained client mode, launch engine and coordinator process
|
|
1107
|
+
as needed."""
|
|
1108
|
+
|
|
1109
|
+
parallel_config = vllm_config.parallel_config
|
|
1110
|
+
assert parallel_config.data_parallel_rank == 0
|
|
1111
|
+
assert local_start_index == 0
|
|
1112
|
+
|
|
1113
|
+
addresses = EngineZmqAddresses(
|
|
1114
|
+
inputs=[input_address],
|
|
1115
|
+
outputs=[output_address],
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
if len(self.core_engines) > 1:
|
|
1119
|
+
coordinator = DPCoordinator(parallel_config)
|
|
1120
|
+
self.resources.coordinator = coordinator
|
|
1121
|
+
addresses.coordinator_input, addresses.coordinator_output = (
|
|
1122
|
+
coordinator.get_engine_socket_addresses())
|
|
1123
|
+
|
|
1124
|
+
# Start all engines.
|
|
1125
|
+
self.resources.engine_manager = CoreEngineActorManager(
|
|
1126
|
+
vllm_config=vllm_config,
|
|
1127
|
+
addresses=addresses,
|
|
1128
|
+
executor_class=executor_class,
|
|
1129
|
+
log_stats=log_stats)
|