vllm-cpu-amxbf16 0.11.2.post2__cp310-cp310-manylinux_2_17_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +225 -0
- vllm/_aiter_ops.py +983 -0
- vllm/_bc_linter.py +54 -0
- vllm/_custom_ops.py +2863 -0
- vllm/_ipex_ops.py +457 -0
- vllm/_version.py +34 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +43 -0
- vllm/assets/base.py +40 -0
- vllm/assets/image.py +59 -0
- vllm/assets/video.py +149 -0
- vllm/attention/__init__.py +18 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +391 -0
- vllm/attention/backends/registry.py +195 -0
- vllm/attention/backends/utils.py +33 -0
- vllm/attention/layer.py +1052 -0
- vllm/attention/layers/__init__.py +0 -0
- vllm/attention/layers/chunked_local_attention.py +121 -0
- vllm/attention/layers/cross_attention.py +178 -0
- vllm/attention/layers/encoder_only_attention.py +103 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +401 -0
- vllm/attention/ops/common.py +414 -0
- vllm/attention/ops/flashmla.py +251 -0
- vllm/attention/ops/merge_attn_states.py +47 -0
- vllm/attention/ops/paged_attn.py +262 -0
- vllm/attention/ops/pallas_kv_cache_update.py +130 -0
- vllm/attention/ops/prefix_prefill.py +814 -0
- vllm/attention/ops/rocm_aiter_paged_attn.py +123 -0
- vllm/attention/ops/triton_decode_attention.py +712 -0
- vllm/attention/ops/triton_merge_attn_states.py +105 -0
- vllm/attention/ops/triton_reshape_and_cache_flash.py +184 -0
- vllm/attention/ops/triton_unified_attention.py +941 -0
- vllm/attention/ops/vit_attn_wrappers.py +178 -0
- vllm/attention/selector.py +231 -0
- vllm/attention/utils/__init__.py +0 -0
- vllm/attention/utils/fa_utils.py +109 -0
- vllm/attention/utils/kv_sharing_utils.py +33 -0
- vllm/attention/utils/kv_transfer_utils.py +60 -0
- vllm/beam_search.py +88 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +3222 -0
- vllm/benchmarks/latency.py +172 -0
- vllm/benchmarks/lib/__init__.py +3 -0
- vllm/benchmarks/lib/endpoint_request_func.py +777 -0
- vllm/benchmarks/lib/ready_checker.py +72 -0
- vllm/benchmarks/lib/utils.py +79 -0
- vllm/benchmarks/serve.py +1531 -0
- vllm/benchmarks/sweep/__init__.py +0 -0
- vllm/benchmarks/sweep/cli.py +38 -0
- vllm/benchmarks/sweep/param_sweep.py +91 -0
- vllm/benchmarks/sweep/plot.py +580 -0
- vllm/benchmarks/sweep/serve.py +416 -0
- vllm/benchmarks/sweep/serve_sla.py +492 -0
- vllm/benchmarks/sweep/server.py +114 -0
- vllm/benchmarks/sweep/sla_sweep.py +132 -0
- vllm/benchmarks/sweep/utils.py +4 -0
- vllm/benchmarks/throughput.py +799 -0
- vllm/collect_env.py +857 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +209 -0
- vllm/compilation/backends.py +759 -0
- vllm/compilation/base_static_graph.py +57 -0
- vllm/compilation/caching.py +178 -0
- vllm/compilation/collective_fusion.py +1234 -0
- vllm/compilation/compiler_interface.py +639 -0
- vllm/compilation/counter.py +48 -0
- vllm/compilation/cuda_graph.py +208 -0
- vllm/compilation/decorators.py +571 -0
- vllm/compilation/fix_functionalization.py +253 -0
- vllm/compilation/fusion.py +374 -0
- vllm/compilation/fusion_attn.py +359 -0
- vllm/compilation/fx_utils.py +91 -0
- vllm/compilation/inductor_pass.py +133 -0
- vllm/compilation/matcher_utils.py +317 -0
- vllm/compilation/monitor.py +62 -0
- vllm/compilation/noop_elimination.py +134 -0
- vllm/compilation/partition_rules.py +72 -0
- vllm/compilation/pass_manager.py +135 -0
- vllm/compilation/piecewise_backend.py +121 -0
- vllm/compilation/post_cleanup.py +21 -0
- vllm/compilation/qk_norm_rope_fusion.py +238 -0
- vllm/compilation/sequence_parallelism.py +363 -0
- vllm/compilation/torch25_custom_graph_pass.py +44 -0
- vllm/compilation/vllm_inductor_pass.py +173 -0
- vllm/compilation/wrapper.py +238 -0
- vllm/config/__init__.py +102 -0
- vllm/config/cache.py +207 -0
- vllm/config/compilation.py +975 -0
- vllm/config/device.py +75 -0
- vllm/config/ec_transfer.py +110 -0
- vllm/config/kv_events.py +56 -0
- vllm/config/kv_transfer.py +114 -0
- vllm/config/load.py +124 -0
- vllm/config/lora.py +112 -0
- vllm/config/model.py +2162 -0
- vllm/config/multimodal.py +248 -0
- vllm/config/observability.py +123 -0
- vllm/config/parallel.py +655 -0
- vllm/config/pooler.py +122 -0
- vllm/config/scheduler.py +298 -0
- vllm/config/speculative.py +654 -0
- vllm/config/speech_to_text.py +38 -0
- vllm/config/structured_outputs.py +92 -0
- vllm/config/utils.py +178 -0
- vllm/config/vllm.py +1166 -0
- vllm/connections.py +189 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +327 -0
- vllm/distributed/__init__.py +6 -0
- vllm/distributed/communication_op.py +43 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/all2all.py +490 -0
- vllm/distributed/device_communicators/all_reduce_utils.py +344 -0
- vllm/distributed/device_communicators/base_device_communicator.py +297 -0
- vllm/distributed/device_communicators/cpu_communicator.py +209 -0
- vllm/distributed/device_communicators/cuda_communicator.py +340 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +216 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +326 -0
- vllm/distributed/device_communicators/mnnvl_compat.py +27 -0
- vllm/distributed/device_communicators/pynccl.py +386 -0
- vllm/distributed/device_communicators/pynccl_allocator.py +191 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +564 -0
- vllm/distributed/device_communicators/quick_all_reduce.py +290 -0
- vllm/distributed/device_communicators/ray_communicator.py +259 -0
- vllm/distributed/device_communicators/shm_broadcast.py +733 -0
- vllm/distributed/device_communicators/shm_object_storage.py +660 -0
- vllm/distributed/device_communicators/symm_mem.py +156 -0
- vllm/distributed/device_communicators/tpu_communicator.py +107 -0
- vllm/distributed/device_communicators/xpu_communicator.py +95 -0
- vllm/distributed/ec_transfer/__init__.py +14 -0
- vllm/distributed/ec_transfer/ec_connector/__init__.py +0 -0
- vllm/distributed/ec_transfer/ec_connector/base.py +247 -0
- vllm/distributed/ec_transfer/ec_connector/factory.py +88 -0
- vllm/distributed/ec_transfer/ec_connector/shared_storage_connector.py +201 -0
- vllm/distributed/ec_transfer/ec_transfer_state.py +42 -0
- vllm/distributed/eplb/__init__.py +8 -0
- vllm/distributed/eplb/eplb_state.py +837 -0
- vllm/distributed/eplb/rebalance_algo.py +260 -0
- vllm/distributed/eplb/rebalance_execute.py +431 -0
- vllm/distributed/kv_events.py +371 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +20 -0
- vllm/distributed/kv_transfer/disagg_prefill_workflow.jpg +0 -0
- vllm/distributed/kv_transfer/kv_connector/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/base.py +10 -0
- vllm/distributed/kv_transfer/kv_connector/factory.py +192 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +268 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +19 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +546 -0
- vllm/distributed/kv_transfer/kv_connector/v1/decode_bench_connector.py +419 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +216 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/__init__.py +18 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/multi_process_adapter.py +379 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py +221 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/vllm_v1_adapter.py +1411 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py +867 -0
- vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +189 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +454 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +2440 -0
- vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +504 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py +531 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +632 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +273 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +450 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +179 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +164 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +242 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +66 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +295 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +285 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +78 -0
- vllm/distributed/parallel_state.py +1759 -0
- vllm/distributed/tpu_distributed_utils.py +188 -0
- vllm/distributed/utils.py +543 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +2144 -0
- vllm/engine/async_llm_engine.py +6 -0
- vllm/engine/llm_engine.py +6 -0
- vllm/engine/protocol.py +170 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/anthropic/__init__.py +0 -0
- vllm/entrypoints/anthropic/protocol.py +162 -0
- vllm/entrypoints/anthropic/serving_messages.py +460 -0
- vllm/entrypoints/api_server.py +184 -0
- vllm/entrypoints/chat_utils.py +1690 -0
- vllm/entrypoints/cli/__init__.py +13 -0
- vllm/entrypoints/cli/benchmark/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/base.py +25 -0
- vllm/entrypoints/cli/benchmark/latency.py +21 -0
- vllm/entrypoints/cli/benchmark/main.py +56 -0
- vllm/entrypoints/cli/benchmark/serve.py +21 -0
- vllm/entrypoints/cli/benchmark/sweep.py +21 -0
- vllm/entrypoints/cli/benchmark/throughput.py +21 -0
- vllm/entrypoints/cli/collect_env.py +38 -0
- vllm/entrypoints/cli/main.py +79 -0
- vllm/entrypoints/cli/openai.py +256 -0
- vllm/entrypoints/cli/run_batch.py +68 -0
- vllm/entrypoints/cli/serve.py +249 -0
- vllm/entrypoints/cli/types.py +29 -0
- vllm/entrypoints/constants.py +10 -0
- vllm/entrypoints/context.py +572 -0
- vllm/entrypoints/dynamic_lora.py +57 -0
- vllm/entrypoints/harmony_utils.py +535 -0
- vllm/entrypoints/launcher.py +175 -0
- vllm/entrypoints/llm.py +1768 -0
- vllm/entrypoints/logger.py +84 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +2096 -0
- vllm/entrypoints/openai/cli_args.py +302 -0
- vllm/entrypoints/openai/orca_metrics.py +120 -0
- vllm/entrypoints/openai/protocol.py +3299 -0
- vllm/entrypoints/openai/run_batch.py +547 -0
- vllm/entrypoints/openai/serving_chat.py +1772 -0
- vllm/entrypoints/openai/serving_classification.py +235 -0
- vllm/entrypoints/openai/serving_completion.py +715 -0
- vllm/entrypoints/openai/serving_embedding.py +695 -0
- vllm/entrypoints/openai/serving_engine.py +1433 -0
- vllm/entrypoints/openai/serving_models.py +304 -0
- vllm/entrypoints/openai/serving_pooling.py +346 -0
- vllm/entrypoints/openai/serving_responses.py +2021 -0
- vllm/entrypoints/openai/serving_score.py +503 -0
- vllm/entrypoints/openai/serving_tokenization.py +203 -0
- vllm/entrypoints/openai/serving_tokens.py +269 -0
- vllm/entrypoints/openai/serving_transcription.py +148 -0
- vllm/entrypoints/openai/speech_to_text.py +405 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +142 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/ernie45_tool_parser.py +210 -0
- vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +200 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +253 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +494 -0
- vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +420 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +227 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +323 -0
- vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +590 -0
- vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +341 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +290 -0
- vllm/entrypoints/openai/tool_parsers/longcat_tool_parser.py +37 -0
- vllm/entrypoints/openai/tool_parsers/minimax_m2_tool_parser.py +643 -0
- vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +849 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/olmo3_tool_parser.py +366 -0
- vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +97 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +120 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +332 -0
- vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +781 -0
- vllm/entrypoints/openai/tool_parsers/qwen3xml_tool_parser.py +1316 -0
- vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +744 -0
- vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +303 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +229 -0
- vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +556 -0
- vllm/entrypoints/renderer.py +409 -0
- vllm/entrypoints/responses_utils.py +77 -0
- vllm/entrypoints/sagemaker/__init__.py +4 -0
- vllm/entrypoints/sagemaker/routes.py +72 -0
- vllm/entrypoints/score_utils.py +242 -0
- vllm/entrypoints/ssl.py +78 -0
- vllm/entrypoints/tool.py +143 -0
- vllm/entrypoints/tool_server.py +209 -0
- vllm/entrypoints/utils.py +319 -0
- vllm/env_override.py +378 -0
- vllm/envs.py +1659 -0
- vllm/forward_context.py +356 -0
- vllm/inputs/__init__.py +44 -0
- vllm/inputs/data.py +359 -0
- vllm/inputs/parse.py +137 -0
- vllm/inputs/preprocess.py +727 -0
- vllm/logger.py +267 -0
- vllm/logging_utils/__init__.py +10 -0
- vllm/logging_utils/dump_input.py +83 -0
- vllm/logging_utils/formatter.py +77 -0
- vllm/logging_utils/log_time.py +34 -0
- vllm/logits_process.py +121 -0
- vllm/logprobs.py +208 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/layers/__init__.py +41 -0
- vllm/lora/layers/base.py +67 -0
- vllm/lora/layers/base_linear.py +164 -0
- vllm/lora/layers/column_parallel_linear.py +578 -0
- vllm/lora/layers/fused_moe.py +472 -0
- vllm/lora/layers/logits_processor.py +252 -0
- vllm/lora/layers/replicated_linear.py +70 -0
- vllm/lora/layers/row_parallel_linear.py +181 -0
- vllm/lora/layers/utils.py +65 -0
- vllm/lora/layers/vocal_parallel_embedding.py +166 -0
- vllm/lora/lora_weights.py +198 -0
- vllm/lora/models.py +890 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/ipex_ops/__init__.py +6 -0
- vllm/lora/ops/ipex_ops/lora_ops.py +57 -0
- vllm/lora/ops/torch_ops/__init__.py +20 -0
- vllm/lora/ops/torch_ops/lora_ops.py +128 -0
- vllm/lora/ops/triton_ops/README_TUNING.md +60 -0
- vllm/lora/ops/triton_ops/__init__.py +21 -0
- vllm/lora/ops/triton_ops/fused_moe_lora_op.py +641 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +340 -0
- vllm/lora/ops/triton_ops/lora_expand_op.py +310 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +154 -0
- vllm/lora/ops/triton_ops/lora_shrink_op.py +287 -0
- vllm/lora/ops/triton_ops/utils.py +295 -0
- vllm/lora/ops/xla_ops/__init__.py +6 -0
- vllm/lora/ops/xla_ops/lora_ops.py +141 -0
- vllm/lora/peft_helper.py +128 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +492 -0
- vllm/lora/punica_wrapper/punica_cpu.py +351 -0
- vllm/lora/punica_wrapper/punica_gpu.py +411 -0
- vllm/lora/punica_wrapper/punica_selector.py +21 -0
- vllm/lora/punica_wrapper/punica_tpu.py +359 -0
- vllm/lora/punica_wrapper/punica_xpu.py +279 -0
- vllm/lora/punica_wrapper/utils.py +150 -0
- vllm/lora/request.py +100 -0
- vllm/lora/resolver.py +88 -0
- vllm/lora/utils.py +293 -0
- vllm/lora/worker_manager.py +279 -0
- vllm/model_executor/__init__.py +11 -0
- vllm/model_executor/custom_op.py +194 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +569 -0
- vllm/model_executor/layers/attention_layer_base.py +35 -0
- vllm/model_executor/layers/batch_invariant.py +854 -0
- vllm/model_executor/layers/conv.py +236 -0
- vllm/model_executor/layers/fla/__init__.py +8 -0
- vllm/model_executor/layers/fla/ops/__init__.py +17 -0
- vllm/model_executor/layers/fla/ops/chunk.py +240 -0
- vllm/model_executor/layers/fla/ops/chunk_delta_h.py +344 -0
- vllm/model_executor/layers/fla/ops/chunk_o.py +183 -0
- vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +154 -0
- vllm/model_executor/layers/fla/ops/cumsum.py +280 -0
- vllm/model_executor/layers/fla/ops/fused_recurrent.py +390 -0
- vllm/model_executor/layers/fla/ops/index.py +41 -0
- vllm/model_executor/layers/fla/ops/kda.py +1351 -0
- vllm/model_executor/layers/fla/ops/l2norm.py +146 -0
- vllm/model_executor/layers/fla/ops/layernorm_guard.py +396 -0
- vllm/model_executor/layers/fla/ops/op.py +60 -0
- vllm/model_executor/layers/fla/ops/solve_tril.py +556 -0
- vllm/model_executor/layers/fla/ops/utils.py +194 -0
- vllm/model_executor/layers/fla/ops/wy_fast.py +158 -0
- vllm/model_executor/layers/fused_moe/__init__.py +106 -0
- vllm/model_executor/layers/fused_moe/all2all_utils.py +160 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +406 -0
- vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +180 -0
- vllm/model_executor/layers/fused_moe/config.py +916 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H100,dtype=fp8_w8a8.json +123 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=352,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +122 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +114 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI308X.json +213 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI300X.json +201 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=320,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI355_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=128,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H100_PCIe,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +154 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/README +12 -0
- vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +354 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +1052 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +387 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +416 -0
- vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +420 -0
- vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +367 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +307 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +192 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +1012 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +792 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +2175 -0
- vllm/model_executor/layers/fused_moe/fused_moe_method_base.py +112 -0
- vllm/model_executor/layers/fused_moe/fused_moe_modular_method.py +164 -0
- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +316 -0
- vllm/model_executor/layers/fused_moe/layer.py +1944 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +1222 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +174 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +83 -0
- vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +229 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +77 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +265 -0
- vllm/model_executor/layers/fused_moe/routing_simulator.py +310 -0
- vllm/model_executor/layers/fused_moe/shared_fused_moe.py +97 -0
- vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +171 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +163 -0
- vllm/model_executor/layers/fused_moe/trtllm_moe.py +143 -0
- vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py +578 -0
- vllm/model_executor/layers/fused_moe/utils.py +332 -0
- vllm/model_executor/layers/kda.py +448 -0
- vllm/model_executor/layers/layernorm.py +442 -0
- vllm/model_executor/layers/lightning_attn.py +729 -0
- vllm/model_executor/layers/linear.py +1424 -0
- vllm/model_executor/layers/logits_processor.py +106 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/abstract.py +71 -0
- vllm/model_executor/layers/mamba/linear_attn.py +402 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +535 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +928 -0
- vllm/model_executor/layers/mamba/mamba_utils.py +225 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +1240 -0
- vllm/model_executor/layers/mamba/ops/layernorm_gated.py +172 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +478 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +211 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +456 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +700 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +230 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +157 -0
- vllm/model_executor/layers/mamba/short_conv.py +264 -0
- vllm/model_executor/layers/mla.py +168 -0
- vllm/model_executor/layers/pooler.py +817 -0
- vllm/model_executor/layers/quantization/__init__.py +174 -0
- vllm/model_executor/layers/quantization/auto_round.py +454 -0
- vllm/model_executor/layers/quantization/awq.py +277 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +659 -0
- vllm/model_executor/layers/quantization/awq_triton.py +337 -0
- vllm/model_executor/layers/quantization/base_config.py +170 -0
- vllm/model_executor/layers/quantization/bitblas.py +502 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +658 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +3 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +914 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2284 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +35 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +392 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +176 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +124 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +218 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +183 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +153 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +138 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +200 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +125 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +219 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +260 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +173 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/linear_qutlass_nvfp4.py +64 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +224 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +218 -0
- vllm/model_executor/layers/quantization/experts_int8.py +240 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +195 -0
- vllm/model_executor/layers/quantization/fp8.py +1333 -0
- vllm/model_executor/layers/quantization/fp_quant.py +420 -0
- vllm/model_executor/layers/quantization/gguf.py +643 -0
- vllm/model_executor/layers/quantization/gptq.py +393 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +482 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +789 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +320 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +371 -0
- vllm/model_executor/layers/quantization/inc.py +65 -0
- vllm/model_executor/layers/quantization/input_quant_fp8.py +171 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +467 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +94 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +105 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +115 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +323 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +98 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +119 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +111 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +161 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +159 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +166 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +73 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +97 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +120 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +219 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +140 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +42 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +105 -0
- vllm/model_executor/layers/quantization/kv_cache.py +146 -0
- vllm/model_executor/layers/quantization/modelopt.py +1788 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +541 -0
- vllm/model_executor/layers/quantization/mxfp4.py +1162 -0
- vllm/model_executor/layers/quantization/petit.py +320 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +137 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +528 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +683 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py +306 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +179 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +139 -0
- vllm/model_executor/layers/quantization/quark/utils.py +105 -0
- vllm/model_executor/layers/quantization/qutlass_utils.py +185 -0
- vllm/model_executor/layers/quantization/rtn.py +652 -0
- vllm/model_executor/layers/quantization/schema.py +90 -0
- vllm/model_executor/layers/quantization/torchao.py +380 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +139 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +67 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +229 -0
- vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +18 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/README.md +3 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +89 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +298 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +1203 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +158 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +489 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +41 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +56 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +575 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +397 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +351 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +161 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +467 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +181 -0
- vllm/model_executor/layers/quantization/utils/mxfp6_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +24 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +63 -0
- vllm/model_executor/layers/quantization/utils/ocp_mx_utils.py +51 -0
- vllm/model_executor/layers/quantization/utils/petit_utils.py +124 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +687 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +516 -0
- vllm/model_executor/layers/resampler.py +283 -0
- vllm/model_executor/layers/rotary_embedding/__init__.py +278 -0
- vllm/model_executor/layers/rotary_embedding/base.py +235 -0
- vllm/model_executor/layers/rotary_embedding/common.py +188 -0
- vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +165 -0
- vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +215 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +43 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +68 -0
- vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +75 -0
- vllm/model_executor/layers/rotary_embedding/linear_scaling_rope.py +115 -0
- vllm/model_executor/layers/rotary_embedding/llama3_rope.py +54 -0
- vllm/model_executor/layers/rotary_embedding/llama4_vision_rope.py +80 -0
- vllm/model_executor/layers/rotary_embedding/mrope.py +397 -0
- vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +47 -0
- vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +159 -0
- vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +81 -0
- vllm/model_executor/layers/utils.py +251 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +558 -0
- vllm/model_executor/model_loader/__init__.py +148 -0
- vllm/model_executor/model_loader/base_loader.py +57 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +822 -0
- vllm/model_executor/model_loader/default_loader.py +327 -0
- vllm/model_executor/model_loader/dummy_loader.py +28 -0
- vllm/model_executor/model_loader/gguf_loader.py +176 -0
- vllm/model_executor/model_loader/online_quantization.py +224 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +116 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +206 -0
- vllm/model_executor/model_loader/tensorizer.py +790 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +151 -0
- vllm/model_executor/model_loader/tpu.py +118 -0
- vllm/model_executor/model_loader/utils.py +288 -0
- vllm/model_executor/model_loader/weight_utils.py +1084 -0
- vllm/model_executor/models/__init__.py +44 -0
- vllm/model_executor/models/adapters.py +543 -0
- vllm/model_executor/models/afmoe.py +711 -0
- vllm/model_executor/models/aimv2.py +247 -0
- vllm/model_executor/models/apertus.py +587 -0
- vllm/model_executor/models/arcee.py +439 -0
- vllm/model_executor/models/arctic.py +635 -0
- vllm/model_executor/models/aria.py +655 -0
- vllm/model_executor/models/aya_vision.py +450 -0
- vllm/model_executor/models/baichuan.py +496 -0
- vllm/model_executor/models/bailing_moe.py +646 -0
- vllm/model_executor/models/bamba.py +522 -0
- vllm/model_executor/models/bee.py +157 -0
- vllm/model_executor/models/bert.py +925 -0
- vllm/model_executor/models/bert_with_rope.py +732 -0
- vllm/model_executor/models/blip.py +349 -0
- vllm/model_executor/models/blip2.py +695 -0
- vllm/model_executor/models/bloom.py +390 -0
- vllm/model_executor/models/chameleon.py +1120 -0
- vllm/model_executor/models/chatglm.py +498 -0
- vllm/model_executor/models/clip.py +965 -0
- vllm/model_executor/models/cohere2_vision.py +472 -0
- vllm/model_executor/models/commandr.py +473 -0
- vllm/model_executor/models/config.py +503 -0
- vllm/model_executor/models/dbrx.py +482 -0
- vllm/model_executor/models/deepencoder.py +673 -0
- vllm/model_executor/models/deepseek_eagle.py +260 -0
- vllm/model_executor/models/deepseek_mtp.py +360 -0
- vllm/model_executor/models/deepseek_ocr.py +593 -0
- vllm/model_executor/models/deepseek_v2.py +1649 -0
- vllm/model_executor/models/deepseek_vl2.py +655 -0
- vllm/model_executor/models/dots1.py +574 -0
- vllm/model_executor/models/dots_ocr.py +900 -0
- vllm/model_executor/models/ernie45.py +53 -0
- vllm/model_executor/models/ernie45_moe.py +759 -0
- vllm/model_executor/models/ernie45_vl.py +1742 -0
- vllm/model_executor/models/ernie45_vl_moe.py +803 -0
- vllm/model_executor/models/ernie_mtp.py +279 -0
- vllm/model_executor/models/exaone.py +545 -0
- vllm/model_executor/models/exaone4.py +531 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +545 -0
- vllm/model_executor/models/falcon_h1.py +685 -0
- vllm/model_executor/models/flex_olmo.py +155 -0
- vllm/model_executor/models/fuyu.py +373 -0
- vllm/model_executor/models/gemma.py +426 -0
- vllm/model_executor/models/gemma2.py +439 -0
- vllm/model_executor/models/gemma3.py +571 -0
- vllm/model_executor/models/gemma3_mm.py +741 -0
- vllm/model_executor/models/gemma3n.py +1165 -0
- vllm/model_executor/models/gemma3n_mm.py +811 -0
- vllm/model_executor/models/glm.py +23 -0
- vllm/model_executor/models/glm4.py +305 -0
- vllm/model_executor/models/glm4_1v.py +1821 -0
- vllm/model_executor/models/glm4_moe.py +747 -0
- vllm/model_executor/models/glm4_moe_mtp.py +359 -0
- vllm/model_executor/models/glm4v.py +784 -0
- vllm/model_executor/models/gpt2.py +397 -0
- vllm/model_executor/models/gpt_bigcode.py +339 -0
- vllm/model_executor/models/gpt_j.py +346 -0
- vllm/model_executor/models/gpt_neox.py +344 -0
- vllm/model_executor/models/gpt_oss.py +738 -0
- vllm/model_executor/models/granite.py +516 -0
- vllm/model_executor/models/granite_speech.py +913 -0
- vllm/model_executor/models/granitemoe.py +569 -0
- vllm/model_executor/models/granitemoehybrid.py +709 -0
- vllm/model_executor/models/granitemoeshared.py +333 -0
- vllm/model_executor/models/gritlm.py +245 -0
- vllm/model_executor/models/grok1.py +558 -0
- vllm/model_executor/models/h2ovl.py +554 -0
- vllm/model_executor/models/hunyuan_v1.py +1053 -0
- vllm/model_executor/models/hyperclovax_vision.py +1166 -0
- vllm/model_executor/models/idefics2_vision_model.py +426 -0
- vllm/model_executor/models/idefics3.py +717 -0
- vllm/model_executor/models/interfaces.py +1092 -0
- vllm/model_executor/models/interfaces_base.py +214 -0
- vllm/model_executor/models/intern_vit.py +453 -0
- vllm/model_executor/models/internlm2.py +460 -0
- vllm/model_executor/models/internlm2_ve.py +142 -0
- vllm/model_executor/models/interns1.py +830 -0
- vllm/model_executor/models/interns1_vit.py +432 -0
- vllm/model_executor/models/internvl.py +1452 -0
- vllm/model_executor/models/jais.py +397 -0
- vllm/model_executor/models/jamba.py +610 -0
- vllm/model_executor/models/jina_vl.py +147 -0
- vllm/model_executor/models/keye.py +1761 -0
- vllm/model_executor/models/keye_vl1_5.py +726 -0
- vllm/model_executor/models/kimi_linear.py +663 -0
- vllm/model_executor/models/kimi_vl.py +578 -0
- vllm/model_executor/models/lfm2.py +532 -0
- vllm/model_executor/models/lfm2_moe.py +762 -0
- vllm/model_executor/models/lightonocr.py +195 -0
- vllm/model_executor/models/llama.py +732 -0
- vllm/model_executor/models/llama4.py +859 -0
- vllm/model_executor/models/llama4_eagle.py +223 -0
- vllm/model_executor/models/llama_eagle.py +218 -0
- vllm/model_executor/models/llama_eagle3.py +367 -0
- vllm/model_executor/models/llava.py +842 -0
- vllm/model_executor/models/llava_next.py +583 -0
- vllm/model_executor/models/llava_next_video.py +467 -0
- vllm/model_executor/models/llava_onevision.py +923 -0
- vllm/model_executor/models/longcat_flash.py +749 -0
- vllm/model_executor/models/longcat_flash_mtp.py +349 -0
- vllm/model_executor/models/mamba.py +276 -0
- vllm/model_executor/models/mamba2.py +289 -0
- vllm/model_executor/models/medusa.py +179 -0
- vllm/model_executor/models/midashenglm.py +827 -0
- vllm/model_executor/models/mimo.py +188 -0
- vllm/model_executor/models/mimo_mtp.py +294 -0
- vllm/model_executor/models/minicpm.py +664 -0
- vllm/model_executor/models/minicpm3.py +242 -0
- vllm/model_executor/models/minicpm_eagle.py +389 -0
- vllm/model_executor/models/minicpmo.py +768 -0
- vllm/model_executor/models/minicpmv.py +1745 -0
- vllm/model_executor/models/minimax_m2.py +552 -0
- vllm/model_executor/models/minimax_text_01.py +1012 -0
- vllm/model_executor/models/minimax_vl_01.py +396 -0
- vllm/model_executor/models/mistral3.py +637 -0
- vllm/model_executor/models/mixtral.py +621 -0
- vllm/model_executor/models/mllama4.py +1147 -0
- vllm/model_executor/models/mlp_speculator.py +235 -0
- vllm/model_executor/models/modernbert.py +450 -0
- vllm/model_executor/models/module_mapping.py +74 -0
- vllm/model_executor/models/molmo.py +1555 -0
- vllm/model_executor/models/moonvit.py +677 -0
- vllm/model_executor/models/mpt.py +335 -0
- vllm/model_executor/models/nano_nemotron_vl.py +1740 -0
- vllm/model_executor/models/nemotron.py +518 -0
- vllm/model_executor/models/nemotron_h.py +852 -0
- vllm/model_executor/models/nemotron_nas.py +491 -0
- vllm/model_executor/models/nemotron_vl.py +653 -0
- vllm/model_executor/models/nvlm_d.py +216 -0
- vllm/model_executor/models/olmo.py +414 -0
- vllm/model_executor/models/olmo2.py +454 -0
- vllm/model_executor/models/olmoe.py +498 -0
- vllm/model_executor/models/openpangu.py +1062 -0
- vllm/model_executor/models/openpangu_mtp.py +265 -0
- vllm/model_executor/models/opt.py +426 -0
- vllm/model_executor/models/orion.py +372 -0
- vllm/model_executor/models/ouro.py +516 -0
- vllm/model_executor/models/ovis.py +559 -0
- vllm/model_executor/models/ovis2_5.py +673 -0
- vllm/model_executor/models/paddleocr_vl.py +1407 -0
- vllm/model_executor/models/paligemma.py +412 -0
- vllm/model_executor/models/persimmon.py +377 -0
- vllm/model_executor/models/phi.py +374 -0
- vllm/model_executor/models/phi3.py +18 -0
- vllm/model_executor/models/phi3v.py +737 -0
- vllm/model_executor/models/phi4_multimodal.py +1447 -0
- vllm/model_executor/models/phi4mm.py +1253 -0
- vllm/model_executor/models/phi4mm_audio.py +1296 -0
- vllm/model_executor/models/phi4mm_utils.py +1907 -0
- vllm/model_executor/models/phimoe.py +675 -0
- vllm/model_executor/models/pixtral.py +1352 -0
- vllm/model_executor/models/plamo2.py +981 -0
- vllm/model_executor/models/qwen.py +368 -0
- vllm/model_executor/models/qwen2.py +541 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +1246 -0
- vllm/model_executor/models/qwen2_5_vl.py +1613 -0
- vllm/model_executor/models/qwen2_audio.py +473 -0
- vllm/model_executor/models/qwen2_moe.py +596 -0
- vllm/model_executor/models/qwen2_rm.py +123 -0
- vllm/model_executor/models/qwen2_vl.py +1670 -0
- vllm/model_executor/models/qwen3.py +336 -0
- vllm/model_executor/models/qwen3_moe.py +744 -0
- vllm/model_executor/models/qwen3_next.py +1395 -0
- vllm/model_executor/models/qwen3_next_mtp.py +296 -0
- vllm/model_executor/models/qwen3_omni_moe_thinker.py +1721 -0
- vllm/model_executor/models/qwen3_vl.py +1673 -0
- vllm/model_executor/models/qwen3_vl_moe.py +415 -0
- vllm/model_executor/models/qwen_vl.py +802 -0
- vllm/model_executor/models/radio.py +555 -0
- vllm/model_executor/models/registry.py +1155 -0
- vllm/model_executor/models/roberta.py +259 -0
- vllm/model_executor/models/rvl.py +107 -0
- vllm/model_executor/models/seed_oss.py +497 -0
- vllm/model_executor/models/siglip.py +1174 -0
- vllm/model_executor/models/siglip2navit.py +724 -0
- vllm/model_executor/models/skyworkr1v.py +953 -0
- vllm/model_executor/models/smolvlm.py +38 -0
- vllm/model_executor/models/solar.py +502 -0
- vllm/model_executor/models/stablelm.py +359 -0
- vllm/model_executor/models/starcoder2.py +367 -0
- vllm/model_executor/models/step3_text.py +559 -0
- vllm/model_executor/models/step3_vl.py +1148 -0
- vllm/model_executor/models/swin.py +514 -0
- vllm/model_executor/models/tarsier.py +619 -0
- vllm/model_executor/models/telechat2.py +153 -0
- vllm/model_executor/models/teleflm.py +78 -0
- vllm/model_executor/models/terratorch.py +319 -0
- vllm/model_executor/models/transformers/__init__.py +127 -0
- vllm/model_executor/models/transformers/base.py +464 -0
- vllm/model_executor/models/transformers/causal.py +65 -0
- vllm/model_executor/models/transformers/legacy.py +90 -0
- vllm/model_executor/models/transformers/moe.py +318 -0
- vllm/model_executor/models/transformers/multimodal.py +411 -0
- vllm/model_executor/models/transformers/pooling.py +119 -0
- vllm/model_executor/models/transformers/utils.py +207 -0
- vllm/model_executor/models/ultravox.py +681 -0
- vllm/model_executor/models/utils.py +877 -0
- vllm/model_executor/models/vision.py +552 -0
- vllm/model_executor/models/voxtral.py +845 -0
- vllm/model_executor/models/whisper.py +959 -0
- vllm/model_executor/models/zamba2.py +986 -0
- vllm/model_executor/parameter.py +642 -0
- vllm/model_executor/utils.py +94 -0
- vllm/model_executor/warmup/__init__.py +0 -0
- vllm/model_executor/warmup/deep_gemm_warmup.py +314 -0
- vllm/model_executor/warmup/kernel_warmup.py +98 -0
- vllm/multimodal/__init__.py +40 -0
- vllm/multimodal/audio.py +118 -0
- vllm/multimodal/base.py +26 -0
- vllm/multimodal/cache.py +755 -0
- vllm/multimodal/evs.py +294 -0
- vllm/multimodal/hasher.py +106 -0
- vllm/multimodal/image.py +130 -0
- vllm/multimodal/inputs.py +1036 -0
- vllm/multimodal/parse.py +544 -0
- vllm/multimodal/processing.py +2186 -0
- vllm/multimodal/profiling.py +369 -0
- vllm/multimodal/registry.py +360 -0
- vllm/multimodal/utils.py +512 -0
- vllm/multimodal/video.py +306 -0
- vllm/outputs.py +345 -0
- vllm/platforms/__init__.py +277 -0
- vllm/platforms/cpu.py +414 -0
- vllm/platforms/cuda.py +657 -0
- vllm/platforms/interface.py +639 -0
- vllm/platforms/rocm.py +466 -0
- vllm/platforms/tpu.py +276 -0
- vllm/platforms/xpu.py +274 -0
- vllm/plugins/__init__.py +78 -0
- vllm/plugins/io_processors/__init__.py +68 -0
- vllm/plugins/io_processors/interface.py +77 -0
- vllm/plugins/lora_resolvers/__init__.py +0 -0
- vllm/plugins/lora_resolvers/filesystem_resolver.py +52 -0
- vllm/pooling_params.py +228 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/gpu_profiler.py +37 -0
- vllm/profiler/layerwise_profile.py +392 -0
- vllm/profiler/utils.py +151 -0
- vllm/py.typed +2 -0
- vllm/ray/__init__.py +0 -0
- vllm/ray/lazy_utils.py +26 -0
- vllm/ray/ray_env.py +79 -0
- vllm/reasoning/__init__.py +92 -0
- vllm/reasoning/abs_reasoning_parsers.py +290 -0
- vllm/reasoning/basic_parsers.py +162 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
- vllm/reasoning/deepseek_v3_reasoning_parser.py +62 -0
- vllm/reasoning/ernie45_reasoning_parser.py +165 -0
- vllm/reasoning/glm4_moe_reasoning_parser.py +171 -0
- vllm/reasoning/gptoss_reasoning_parser.py +173 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/hunyuan_a13b_reasoning_parser.py +237 -0
- vllm/reasoning/identity_reasoning_parser.py +58 -0
- vllm/reasoning/minimax_m2_reasoning_parser.py +67 -0
- vllm/reasoning/mistral_reasoning_parser.py +55 -0
- vllm/reasoning/olmo3_reasoning_parser.py +302 -0
- vllm/reasoning/qwen3_reasoning_parser.py +67 -0
- vllm/reasoning/seedoss_reasoning_parser.py +27 -0
- vllm/reasoning/step3_reasoning_parser.py +107 -0
- vllm/sampling_params.py +669 -0
- vllm/scalar_type.py +355 -0
- vllm/scripts.py +17 -0
- vllm/sequence.py +98 -0
- vllm/tasks.py +13 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tracing.py +135 -0
- vllm/transformers_utils/__init__.py +26 -0
- vllm/transformers_utils/chat_templates/__init__.py +5 -0
- vllm/transformers_utils/chat_templates/registry.py +73 -0
- vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
- vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
- vllm/transformers_utils/chat_templates/template_deepseek_ocr.jinja +14 -0
- vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
- vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
- vllm/transformers_utils/config.py +1203 -0
- vllm/transformers_utils/config_parser_base.py +20 -0
- vllm/transformers_utils/configs/__init__.py +70 -0
- vllm/transformers_utils/configs/afmoe.py +84 -0
- vllm/transformers_utils/configs/arctic.py +206 -0
- vllm/transformers_utils/configs/chatglm.py +75 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +126 -0
- vllm/transformers_utils/configs/dotsocr.py +71 -0
- vllm/transformers_utils/configs/eagle.py +84 -0
- vllm/transformers_utils/configs/falcon.py +89 -0
- vllm/transformers_utils/configs/flex_olmo.py +77 -0
- vllm/transformers_utils/configs/jais.py +243 -0
- vllm/transformers_utils/configs/kimi_linear.py +144 -0
- vllm/transformers_utils/configs/kimi_vl.py +38 -0
- vllm/transformers_utils/configs/lfm2_moe.py +159 -0
- vllm/transformers_utils/configs/medusa.py +65 -0
- vllm/transformers_utils/configs/midashenglm.py +103 -0
- vllm/transformers_utils/configs/mistral.py +174 -0
- vllm/transformers_utils/configs/mlp_speculator.py +69 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/nemotron.py +212 -0
- vllm/transformers_utils/configs/nemotron_h.py +282 -0
- vllm/transformers_utils/configs/olmo3.py +79 -0
- vllm/transformers_utils/configs/ovis.py +182 -0
- vllm/transformers_utils/configs/qwen3_next.py +274 -0
- vllm/transformers_utils/configs/radio.py +89 -0
- vllm/transformers_utils/configs/speculators/__init__.py +2 -0
- vllm/transformers_utils/configs/speculators/algos.py +38 -0
- vllm/transformers_utils/configs/speculators/base.py +114 -0
- vllm/transformers_utils/configs/step3_vl.py +174 -0
- vllm/transformers_utils/configs/ultravox.py +118 -0
- vllm/transformers_utils/detokenizer_utils.py +198 -0
- vllm/transformers_utils/dynamic_module.py +59 -0
- vllm/transformers_utils/processor.py +402 -0
- vllm/transformers_utils/processors/__init__.py +15 -0
- vllm/transformers_utils/processors/deepseek_ocr.py +438 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +406 -0
- vllm/transformers_utils/processors/ovis.py +453 -0
- vllm/transformers_utils/processors/ovis2_5.py +468 -0
- vllm/transformers_utils/runai_utils.py +104 -0
- vllm/transformers_utils/s3_utils.py +95 -0
- vllm/transformers_utils/tokenizer.py +293 -0
- vllm/transformers_utils/tokenizer_base.py +155 -0
- vllm/transformers_utils/tokenizers/__init__.py +16 -0
- vllm/transformers_utils/tokenizers/mistral.py +502 -0
- vllm/transformers_utils/utils.py +130 -0
- vllm/triton_utils/__init__.py +19 -0
- vllm/triton_utils/importing.py +103 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +294 -0
- vllm/utils/__init__.py +82 -0
- vllm/utils/argparse_utils.py +487 -0
- vllm/utils/async_utils.py +303 -0
- vllm/utils/cache.py +214 -0
- vllm/utils/collection_utils.py +139 -0
- vllm/utils/counter.py +45 -0
- vllm/utils/deep_gemm.py +391 -0
- vllm/utils/flashinfer.py +490 -0
- vllm/utils/func_utils.py +236 -0
- vllm/utils/gc_utils.py +147 -0
- vllm/utils/hashing.py +63 -0
- vllm/utils/import_utils.py +411 -0
- vllm/utils/jsontree.py +165 -0
- vllm/utils/math_utils.py +32 -0
- vllm/utils/mem_constants.py +13 -0
- vllm/utils/mem_utils.py +232 -0
- vllm/utils/nccl.py +64 -0
- vllm/utils/network_utils.py +331 -0
- vllm/utils/platform_utils.py +59 -0
- vllm/utils/profiling.py +56 -0
- vllm/utils/registry.py +49 -0
- vllm/utils/serial_utils.py +169 -0
- vllm/utils/system_utils.py +229 -0
- vllm/utils/tensor_schema.py +255 -0
- vllm/utils/torch_utils.py +657 -0
- vllm/v1/__init__.py +0 -0
- vllm/v1/attention/__init__.py +0 -0
- vllm/v1/attention/backends/__init__.py +0 -0
- vllm/v1/attention/backends/cpu_attn.py +496 -0
- vllm/v1/attention/backends/flash_attn.py +1028 -0
- vllm/v1/attention/backends/flashinfer.py +1572 -0
- vllm/v1/attention/backends/flex_attention.py +926 -0
- vllm/v1/attention/backends/gdn_attn.py +387 -0
- vllm/v1/attention/backends/linear_attn.py +74 -0
- vllm/v1/attention/backends/mamba1_attn.py +165 -0
- vllm/v1/attention/backends/mamba2_attn.py +354 -0
- vllm/v1/attention/backends/mamba_attn.py +115 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/common.py +2031 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +275 -0
- vllm/v1/attention/backends/mla/flashattn_mla.py +337 -0
- vllm/v1/attention/backends/mla/flashinfer_mla.py +171 -0
- vllm/v1/attention/backends/mla/flashmla.py +314 -0
- vllm/v1/attention/backends/mla/flashmla_sparse.py +548 -0
- vllm/v1/attention/backends/mla/indexer.py +362 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +294 -0
- vllm/v1/attention/backends/mla/triton_mla.py +171 -0
- vllm/v1/attention/backends/pallas.py +436 -0
- vllm/v1/attention/backends/rocm_aiter_fa.py +816 -0
- vllm/v1/attention/backends/rocm_aiter_unified_attn.py +196 -0
- vllm/v1/attention/backends/rocm_attn.py +362 -0
- vllm/v1/attention/backends/short_conv_attn.py +105 -0
- vllm/v1/attention/backends/tree_attn.py +425 -0
- vllm/v1/attention/backends/triton_attn.py +373 -0
- vllm/v1/attention/backends/utils.py +1116 -0
- vllm/v1/attention/backends/xformers.py +417 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +428 -0
- vllm/v1/core/encoder_cache_manager.py +343 -0
- vllm/v1/core/kv_cache_coordinator.py +480 -0
- vllm/v1/core/kv_cache_manager.py +420 -0
- vllm/v1/core/kv_cache_utils.py +1340 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/async_scheduler.py +62 -0
- vllm/v1/core/sched/interface.py +181 -0
- vllm/v1/core/sched/output.py +202 -0
- vllm/v1/core/sched/request_queue.py +221 -0
- vllm/v1/core/sched/scheduler.py +1617 -0
- vllm/v1/core/sched/utils.py +72 -0
- vllm/v1/core/single_type_kv_cache_manager.py +736 -0
- vllm/v1/cudagraph_dispatcher.py +148 -0
- vllm/v1/engine/__init__.py +206 -0
- vllm/v1/engine/async_llm.py +797 -0
- vllm/v1/engine/coordinator.py +377 -0
- vllm/v1/engine/core.py +1420 -0
- vllm/v1/engine/core_client.py +1400 -0
- vllm/v1/engine/detokenizer.py +351 -0
- vllm/v1/engine/exceptions.py +18 -0
- vllm/v1/engine/llm_engine.py +408 -0
- vllm/v1/engine/logprobs.py +182 -0
- vllm/v1/engine/output_processor.py +642 -0
- vllm/v1/engine/parallel_sampling.py +145 -0
- vllm/v1/engine/processor.py +621 -0
- vllm/v1/engine/utils.py +1072 -0
- vllm/v1/executor/__init__.py +6 -0
- vllm/v1/executor/abstract.py +352 -0
- vllm/v1/executor/multiproc_executor.py +877 -0
- vllm/v1/executor/ray_distributed_executor.py +8 -0
- vllm/v1/executor/ray_executor.py +626 -0
- vllm/v1/executor/ray_utils.py +465 -0
- vllm/v1/executor/uniproc_executor.py +183 -0
- vllm/v1/kv_cache_interface.py +403 -0
- vllm/v1/kv_offload/__init__.py +0 -0
- vllm/v1/kv_offload/abstract.py +161 -0
- vllm/v1/kv_offload/arc_manager.py +237 -0
- vllm/v1/kv_offload/backend.py +97 -0
- vllm/v1/kv_offload/backends/__init__.py +0 -0
- vllm/v1/kv_offload/backends/cpu.py +62 -0
- vllm/v1/kv_offload/cpu.py +93 -0
- vllm/v1/kv_offload/factory.py +56 -0
- vllm/v1/kv_offload/lru_manager.py +139 -0
- vllm/v1/kv_offload/mediums.py +39 -0
- vllm/v1/kv_offload/spec.py +62 -0
- vllm/v1/kv_offload/worker/__init__.py +0 -0
- vllm/v1/kv_offload/worker/cpu_gpu.py +185 -0
- vllm/v1/kv_offload/worker/worker.py +144 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +1238 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +169 -0
- vllm/v1/metrics/reader.py +257 -0
- vllm/v1/metrics/stats.py +420 -0
- vllm/v1/outputs.py +249 -0
- vllm/v1/pool/__init__.py +0 -0
- vllm/v1/pool/metadata.py +82 -0
- vllm/v1/request.py +259 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/logits_processor/__init__.py +352 -0
- vllm/v1/sample/logits_processor/builtin.py +274 -0
- vllm/v1/sample/logits_processor/interface.py +106 -0
- vllm/v1/sample/logits_processor/state.py +165 -0
- vllm/v1/sample/metadata.py +44 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +52 -0
- vllm/v1/sample/ops/logprobs.py +25 -0
- vllm/v1/sample/ops/penalties.py +57 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +290 -0
- vllm/v1/sample/rejection_sampler.py +793 -0
- vllm/v1/sample/sampler.py +316 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +120 -0
- vllm/v1/sample/tpu/sampler.py +215 -0
- vllm/v1/serial_utils.py +532 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +1225 -0
- vllm/v1/spec_decode/medusa.py +73 -0
- vllm/v1/spec_decode/metadata.py +66 -0
- vllm/v1/spec_decode/metrics.py +224 -0
- vllm/v1/spec_decode/ngram_proposer.py +291 -0
- vllm/v1/spec_decode/suffix_decoding.py +103 -0
- vllm/v1/spec_decode/utils.py +16 -0
- vllm/v1/structured_output/__init__.py +338 -0
- vllm/v1/structured_output/backend_guidance.py +265 -0
- vllm/v1/structured_output/backend_lm_format_enforcer.py +177 -0
- vllm/v1/structured_output/backend_outlines.py +324 -0
- vllm/v1/structured_output/backend_types.py +136 -0
- vllm/v1/structured_output/backend_xgrammar.py +362 -0
- vllm/v1/structured_output/request.py +94 -0
- vllm/v1/structured_output/utils.py +469 -0
- vllm/v1/utils.py +414 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +327 -0
- vllm/v1/worker/cpu_model_runner.py +122 -0
- vllm/v1/worker/cpu_worker.py +206 -0
- vllm/v1/worker/dp_utils.py +230 -0
- vllm/v1/worker/ec_connector_model_runner_mixin.py +87 -0
- vllm/v1/worker/gpu_input_batch.py +975 -0
- vllm/v1/worker/gpu_model_runner.py +5102 -0
- vllm/v1/worker/gpu_ubatch_wrapper.py +466 -0
- vllm/v1/worker/gpu_worker.py +894 -0
- vllm/v1/worker/kv_connector_model_runner_mixin.py +144 -0
- vllm/v1/worker/lora_model_runner_mixin.py +213 -0
- vllm/v1/worker/tpu_input_batch.py +593 -0
- vllm/v1/worker/tpu_model_runner.py +2173 -0
- vllm/v1/worker/tpu_worker.py +355 -0
- vllm/v1/worker/ubatch_utils.py +73 -0
- vllm/v1/worker/ubatching.py +231 -0
- vllm/v1/worker/utils.py +366 -0
- vllm/v1/worker/worker_base.py +375 -0
- vllm/v1/worker/xpu_model_runner.py +55 -0
- vllm/v1/worker/xpu_worker.py +189 -0
- vllm/version.py +39 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/METADATA +345 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/RECORD +1536 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/WHEEL +5 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/entry_points.txt +5 -0
- vllm_cpu_amxbf16-0.11.2.post2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1411 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
# Standard
|
|
4
|
+
import os
|
|
5
|
+
import uuid
|
|
6
|
+
from collections.abc import Generator
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
9
|
+
|
|
10
|
+
import torch
|
|
11
|
+
from lmcache import utils
|
|
12
|
+
from lmcache.config import LMCacheEngineMetadata
|
|
13
|
+
from lmcache.logging import init_logger
|
|
14
|
+
from lmcache.observability import LMCStatsMonitor
|
|
15
|
+
from lmcache.utils import _lmcache_nvtx_annotate
|
|
16
|
+
from lmcache.v1.cache_engine import LMCacheEngine, LMCacheEngineBuilder
|
|
17
|
+
from lmcache.v1.compute.blend import LMCBlenderBuilder
|
|
18
|
+
from lmcache.v1.config import LMCacheEngineConfig, _validate_and_set_config_value
|
|
19
|
+
from lmcache.v1.gpu_connector import (
|
|
20
|
+
VLLMBufferLayerwiseGPUConnector,
|
|
21
|
+
VLLMPagedMemGPUConnectorV2,
|
|
22
|
+
VLLMPagedMemLayerwiseGPUConnector,
|
|
23
|
+
)
|
|
24
|
+
from lmcache.v1.internal_api_server.api_server import InternalAPIServer
|
|
25
|
+
from lmcache.v1.lookup_client import LookupClientFactory
|
|
26
|
+
from lmcache.v1.lookup_client.lmcache_async_lookup_client import (
|
|
27
|
+
LMCacheAsyncLookupServer,
|
|
28
|
+
)
|
|
29
|
+
from lmcache.v1.offload_server.zmq_server import ZMQOffloadServer
|
|
30
|
+
from lmcache.v1.plugin.plugin_launcher import PluginLauncher
|
|
31
|
+
|
|
32
|
+
from vllm.config import VllmConfig
|
|
33
|
+
from vllm.distributed.kv_transfer.kv_connector.v1.base import (
|
|
34
|
+
KVConnectorBase_V1,
|
|
35
|
+
KVConnectorMetadata,
|
|
36
|
+
KVConnectorRole,
|
|
37
|
+
)
|
|
38
|
+
from vllm.distributed.kv_transfer.kv_connector.v1.lmcache_integration.utils import (
|
|
39
|
+
ENGINE_NAME,
|
|
40
|
+
apply_mm_hashes_to_token_ids,
|
|
41
|
+
extract_mm_features,
|
|
42
|
+
lmcache_get_or_create_config,
|
|
43
|
+
mla_enabled,
|
|
44
|
+
)
|
|
45
|
+
from vllm.distributed.parallel_state import get_tensor_model_parallel_rank, get_tp_group
|
|
46
|
+
from vllm.sampling_params import SamplingParams
|
|
47
|
+
from vllm.utils.math_utils import cdiv
|
|
48
|
+
from vllm.utils.torch_utils import get_kv_cache_torch_dtype
|
|
49
|
+
from vllm.v1.core.sched.output import SchedulerOutput
|
|
50
|
+
from vllm.version import __version__ as VLLM_VERSION
|
|
51
|
+
|
|
52
|
+
if TYPE_CHECKING:
|
|
53
|
+
from vllm.attention.backends.abstract import AttentionMetadata
|
|
54
|
+
from vllm.forward_context import ForwardContext
|
|
55
|
+
from vllm.multimodal.inputs import PlaceholderRange
|
|
56
|
+
from vllm.v1.core.kv_cache_manager import KVCacheManager
|
|
57
|
+
from vllm.v1.core.sched.output import NewRequestData
|
|
58
|
+
from vllm.v1.request import Request
|
|
59
|
+
|
|
60
|
+
logger = init_logger(__name__)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass
|
|
64
|
+
class LoadSpec:
|
|
65
|
+
# Number of tokens cached in vLLM
|
|
66
|
+
vllm_cached_tokens: int
|
|
67
|
+
# Number of tokens that are cached in LMCache
|
|
68
|
+
lmcache_cached_tokens: int
|
|
69
|
+
# Whether the scheduler allow us to load the tokens
|
|
70
|
+
can_load: bool
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@dataclass
|
|
74
|
+
class SaveSpec:
|
|
75
|
+
# Skip already saved tokens
|
|
76
|
+
skip_leading_tokens: int
|
|
77
|
+
# Whether the scheduler allow us to save the tokens
|
|
78
|
+
can_save: bool
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@dataclass
|
|
82
|
+
class DisaggSpec:
|
|
83
|
+
req_id: str
|
|
84
|
+
receiver_id: str
|
|
85
|
+
receiver_host: str
|
|
86
|
+
receiver_init_port: int
|
|
87
|
+
receiver_alloc_port: int
|
|
88
|
+
is_last_prefill: bool = False
|
|
89
|
+
num_transferred_tokens: int = 0
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
tmp_disagg_tracker: dict[str, DisaggSpec] = {}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def extract_request_configs(sampling_params: SamplingParams) -> dict | None:
|
|
96
|
+
request_configs = None
|
|
97
|
+
if (
|
|
98
|
+
sampling_params.extra_args is not None
|
|
99
|
+
and "kv_transfer_params" in sampling_params.extra_args
|
|
100
|
+
):
|
|
101
|
+
kv_transfer_params = sampling_params.extra_args.get("kv_transfer_params")
|
|
102
|
+
if kv_transfer_params is None:
|
|
103
|
+
return None
|
|
104
|
+
assert isinstance(kv_transfer_params, dict)
|
|
105
|
+
for k, v in kv_transfer_params.items():
|
|
106
|
+
if k.startswith("lmcache."):
|
|
107
|
+
if request_configs is None:
|
|
108
|
+
request_configs = {}
|
|
109
|
+
request_configs[k] = v
|
|
110
|
+
return request_configs
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@dataclass
|
|
114
|
+
class RequestTracker:
|
|
115
|
+
# Request id
|
|
116
|
+
req_id: str
|
|
117
|
+
|
|
118
|
+
# Total prompt token length
|
|
119
|
+
prompt_len: int
|
|
120
|
+
|
|
121
|
+
# The token ids that has been scheduled so far
|
|
122
|
+
token_ids: list[int]
|
|
123
|
+
|
|
124
|
+
# The block ids that has been allocated so far
|
|
125
|
+
# NOTE: allocated blocks could be more than the number of tokens
|
|
126
|
+
allocated_block_ids: list[int]
|
|
127
|
+
|
|
128
|
+
# The number of tokens that has been saved
|
|
129
|
+
num_saved_tokens: int = 0
|
|
130
|
+
|
|
131
|
+
# Disagg spec for the request
|
|
132
|
+
disagg_spec: DisaggSpec | None = None
|
|
133
|
+
|
|
134
|
+
# Multimodal hashes and positions
|
|
135
|
+
mm_hashes: list[str] | None = None
|
|
136
|
+
mm_positions: list["PlaceholderRange"] | None = None
|
|
137
|
+
|
|
138
|
+
# The configs of the request, includes tags and other configs
|
|
139
|
+
request_configs: dict | None = None
|
|
140
|
+
|
|
141
|
+
# Whether the request is in decode phase
|
|
142
|
+
is_decode_phase = False
|
|
143
|
+
|
|
144
|
+
# Whether the request cache should be saved
|
|
145
|
+
skip_save: bool = False
|
|
146
|
+
|
|
147
|
+
@_lmcache_nvtx_annotate
|
|
148
|
+
@staticmethod
|
|
149
|
+
def from_new_request(
|
|
150
|
+
lmcache_config: LMCacheEngineConfig,
|
|
151
|
+
new_request: "NewRequestData",
|
|
152
|
+
num_tokens_to_compute: int,
|
|
153
|
+
lmcache_cached_tokens: int,
|
|
154
|
+
skip_save: bool,
|
|
155
|
+
) -> "RequestTracker":
|
|
156
|
+
"""Create the request tracker from a new request.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
lmcache_config (LMCacheEngineConfig): the LMCache engine config.
|
|
160
|
+
new_request (NewRequestData): the new request data.
|
|
161
|
+
num_tokens_to_compute (int): the number of tokens that will
|
|
162
|
+
be 'computed', including the `num_computed_tokens` (vLLM's
|
|
163
|
+
local cache hit) and new tokens that will be scheduled.
|
|
164
|
+
lmcache_cached_tokens (int): the number of tokens that are
|
|
165
|
+
cached in LMCache.
|
|
166
|
+
skip_save (bool): whether the request cache should be saved
|
|
167
|
+
"""
|
|
168
|
+
# vLLM 0.9.0 update: request.block_ids changed from list[int] to
|
|
169
|
+
# list[list[int]]
|
|
170
|
+
# Need to check the type of request.block_ids
|
|
171
|
+
|
|
172
|
+
unfolded_block_ids = []
|
|
173
|
+
|
|
174
|
+
if not isinstance(new_request.block_ids[0], list):
|
|
175
|
+
unfolded_block_ids = new_request.block_ids.copy()
|
|
176
|
+
else:
|
|
177
|
+
# According to the vLLM code
|
|
178
|
+
# (https://github.com/vllm-project/vllm/blob/main/vllm/v1/core/
|
|
179
|
+
# sched/scheduler.py#L943),
|
|
180
|
+
# only one KVCacheGroup is supported in connector for now.
|
|
181
|
+
unfolded_block_ids = new_request.block_ids[0].copy()
|
|
182
|
+
|
|
183
|
+
# NOTE: Initialized in `update_state_after_alloc`
|
|
184
|
+
disagg_spec = tmp_disagg_tracker.pop(new_request.req_id, None)
|
|
185
|
+
|
|
186
|
+
if new_request.sampling_params:
|
|
187
|
+
request_configs = extract_request_configs(new_request.sampling_params)
|
|
188
|
+
else:
|
|
189
|
+
request_configs = None
|
|
190
|
+
|
|
191
|
+
mm_hashes, mm_positions = extract_mm_features(new_request, modify=True)
|
|
192
|
+
|
|
193
|
+
assert new_request.prompt_token_ids is not None
|
|
194
|
+
return RequestTracker(
|
|
195
|
+
req_id=new_request.req_id,
|
|
196
|
+
prompt_len=len(new_request.prompt_token_ids),
|
|
197
|
+
token_ids=new_request.prompt_token_ids[:num_tokens_to_compute].copy(),
|
|
198
|
+
allocated_block_ids=unfolded_block_ids,
|
|
199
|
+
num_saved_tokens=lmcache_cached_tokens,
|
|
200
|
+
disagg_spec=disagg_spec,
|
|
201
|
+
mm_hashes=mm_hashes,
|
|
202
|
+
mm_positions=mm_positions,
|
|
203
|
+
skip_save=skip_save,
|
|
204
|
+
request_configs=request_configs,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
def update(
|
|
208
|
+
self,
|
|
209
|
+
new_token_ids: list[int],
|
|
210
|
+
new_block_ids: tuple[list[int], ...] | None | list[int],
|
|
211
|
+
) -> None:
|
|
212
|
+
"""Update the request tracker when a running request is
|
|
213
|
+
scheduled again
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
self.token_ids.extend(new_token_ids)
|
|
217
|
+
|
|
218
|
+
if new_block_ids is None:
|
|
219
|
+
# https://github.com/vllm-project/vllm/commit/
|
|
220
|
+
# b029de9902aa3ac58806c8c17776c7074175b6db
|
|
221
|
+
new_block_ids = []
|
|
222
|
+
elif len(new_block_ids) == 0:
|
|
223
|
+
new_block_ids = []
|
|
224
|
+
elif isinstance(new_block_ids, tuple):
|
|
225
|
+
new_block_ids = new_block_ids[0]
|
|
226
|
+
elif isinstance(new_block_ids, list):
|
|
227
|
+
pass
|
|
228
|
+
else:
|
|
229
|
+
raise ValueError(f"Unsupported new_block_ids type {type(new_block_ids)}")
|
|
230
|
+
self.allocated_block_ids.extend(new_block_ids)
|
|
231
|
+
|
|
232
|
+
# When a request is scheduled again, and the number of new tokens
|
|
233
|
+
# is 1 (excluding chunked prefill), the request is in decode phase.
|
|
234
|
+
if len(new_token_ids) == 1:
|
|
235
|
+
self.is_decode_phase = True
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
@dataclass
|
|
239
|
+
class ReqMeta:
|
|
240
|
+
# Request id
|
|
241
|
+
req_id: str
|
|
242
|
+
# Request tokens
|
|
243
|
+
token_ids: list[int] # torch.Tensor
|
|
244
|
+
# Slot mapping
|
|
245
|
+
slot_mapping: torch.Tensor
|
|
246
|
+
|
|
247
|
+
# Whether is last prefill or not
|
|
248
|
+
is_last_prefill: bool = False
|
|
249
|
+
|
|
250
|
+
# Skip save or not
|
|
251
|
+
save_spec: SaveSpec | None = None
|
|
252
|
+
# load_spec
|
|
253
|
+
load_spec: LoadSpec | None = None
|
|
254
|
+
# disagg spec
|
|
255
|
+
disagg_spec: DisaggSpec | None = None
|
|
256
|
+
# the configs of the request
|
|
257
|
+
request_configs: dict | None = None
|
|
258
|
+
|
|
259
|
+
@staticmethod
|
|
260
|
+
def from_request_tracker(
|
|
261
|
+
tracker: RequestTracker,
|
|
262
|
+
block_size: int,
|
|
263
|
+
lmcache_chunk_size: int = 256,
|
|
264
|
+
load_spec: LoadSpec | None = None,
|
|
265
|
+
discard_partial_chunks: bool = True,
|
|
266
|
+
save_decode_cache: bool = False,
|
|
267
|
+
) -> Optional["ReqMeta"]:
|
|
268
|
+
"""Create the request metadata from a request tracker.
|
|
269
|
+
|
|
270
|
+
Args:
|
|
271
|
+
tracker (RequestTracker): the request tracker.
|
|
272
|
+
block_size (int): the block size in vLLM.
|
|
273
|
+
lmcache_chunk_size (int): the chunk size for LMCache.
|
|
274
|
+
load_spec (Optional[LoadSpec]): the load spec for KV cache loading.
|
|
275
|
+
discard_partial_chunks (bool): whether to discard partial chunks.
|
|
276
|
+
save_decode_cache (bool): whether to save the cache in decode phase.
|
|
277
|
+
|
|
278
|
+
Returns:
|
|
279
|
+
the request metadata if we need to perform load/save
|
|
280
|
+
operations, None otherwise.
|
|
281
|
+
"""
|
|
282
|
+
input_token_ids = tracker.token_ids
|
|
283
|
+
input_token_len = len(input_token_ids)
|
|
284
|
+
|
|
285
|
+
is_last_prefill = False
|
|
286
|
+
if input_token_len == tracker.prompt_len:
|
|
287
|
+
is_last_prefill = True
|
|
288
|
+
|
|
289
|
+
# For save operation: do not save if the following condition is met
|
|
290
|
+
# 1. has already been saved before (num_saved_tokens > 0)
|
|
291
|
+
# 2. number of unsaved tokens is not reached the chunk boundary
|
|
292
|
+
# 3. if save_decode_cache is False and it is in decode phase
|
|
293
|
+
|
|
294
|
+
skip_leading_tokens = tracker.num_saved_tokens
|
|
295
|
+
chunk_boundary = (
|
|
296
|
+
cdiv(tracker.num_saved_tokens + 1, lmcache_chunk_size) * lmcache_chunk_size
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
# NOTE(vladnosiv): for disagg, you cannot skip saving, as saving is a
|
|
300
|
+
# trqansfer. Check if request_configs has lmcache.skip_save set to True
|
|
301
|
+
request_skip = (tracker.request_configs or {}).get("lmcache.skip_save", False)
|
|
302
|
+
|
|
303
|
+
skip_save = tracker.disagg_spec is None and (
|
|
304
|
+
tracker.skip_save
|
|
305
|
+
or (tracker.num_saved_tokens > 0 and input_token_len < chunk_boundary)
|
|
306
|
+
or (tracker.is_decode_phase and not save_decode_cache)
|
|
307
|
+
or request_skip
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
if skip_save and load_spec is None:
|
|
311
|
+
return None
|
|
312
|
+
|
|
313
|
+
# Calculate number of tokens to save based on discard_partial_chunks
|
|
314
|
+
# setting
|
|
315
|
+
|
|
316
|
+
# NOTE(vladnosiv): for the input_token_len chunk prefill,
|
|
317
|
+
# we are required to discard partial chunks,
|
|
318
|
+
# as new tokens will be added in the next iteration.
|
|
319
|
+
num_tokens_to_save = (
|
|
320
|
+
(input_token_len // lmcache_chunk_size * lmcache_chunk_size)
|
|
321
|
+
if not is_last_prefill or discard_partial_chunks
|
|
322
|
+
else input_token_len
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
# If we need to save, update the number of saved tokens
|
|
326
|
+
if not skip_save:
|
|
327
|
+
tracker.num_saved_tokens = num_tokens_to_save
|
|
328
|
+
save_spec = SaveSpec(skip_leading_tokens, not skip_save)
|
|
329
|
+
|
|
330
|
+
# Calculate the token ids and slot mappings for load and save
|
|
331
|
+
token_ids = input_token_ids[:num_tokens_to_save]
|
|
332
|
+
|
|
333
|
+
# If the request has multimodal hashes, apply them to the token ids
|
|
334
|
+
if tracker.mm_hashes:
|
|
335
|
+
token_ids_tensor = torch.tensor(token_ids)
|
|
336
|
+
assert tracker.mm_positions is not None, (
|
|
337
|
+
"tracker got mm_hashes but no mm_positions"
|
|
338
|
+
)
|
|
339
|
+
apply_mm_hashes_to_token_ids(
|
|
340
|
+
token_ids_tensor, tracker.mm_hashes, tracker.mm_positions
|
|
341
|
+
)
|
|
342
|
+
token_ids = token_ids_tensor.tolist()
|
|
343
|
+
|
|
344
|
+
num_blocks = len(tracker.allocated_block_ids)
|
|
345
|
+
|
|
346
|
+
if len(token_ids) > num_blocks * block_size:
|
|
347
|
+
logger.error(
|
|
348
|
+
"The number of tokens is more than the number of blocks."
|
|
349
|
+
"Something might be wrong in scheduling logic!"
|
|
350
|
+
)
|
|
351
|
+
logger.error(
|
|
352
|
+
"Num tokens: %d, num blocks: %d, block size: %d",
|
|
353
|
+
len(token_ids),
|
|
354
|
+
num_blocks,
|
|
355
|
+
block_size,
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
block_ids = torch.tensor(tracker.allocated_block_ids, dtype=torch.long)
|
|
359
|
+
block_offsets = torch.arange(0, block_size, dtype=torch.long)
|
|
360
|
+
slot_mapping = (
|
|
361
|
+
block_offsets.reshape((1, block_size))
|
|
362
|
+
+ block_ids.reshape((num_blocks, 1)) * block_size
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
slot_mapping = slot_mapping.flatten()[: len(token_ids)]
|
|
366
|
+
assert slot_mapping.dtype == torch.long
|
|
367
|
+
|
|
368
|
+
# For load operation: check whether the request is scheduled to load
|
|
369
|
+
if load_spec is not None and load_spec.can_load:
|
|
370
|
+
logger.debug(
|
|
371
|
+
"Scheduled to load %d tokens for request %s",
|
|
372
|
+
load_spec.lmcache_cached_tokens,
|
|
373
|
+
tracker.req_id,
|
|
374
|
+
)
|
|
375
|
+
else:
|
|
376
|
+
# Do not load if not in `can_load` state
|
|
377
|
+
load_spec = None
|
|
378
|
+
|
|
379
|
+
return ReqMeta(
|
|
380
|
+
req_id=tracker.req_id,
|
|
381
|
+
token_ids=token_ids,
|
|
382
|
+
slot_mapping=slot_mapping,
|
|
383
|
+
is_last_prefill=is_last_prefill,
|
|
384
|
+
save_spec=save_spec,
|
|
385
|
+
load_spec=load_spec,
|
|
386
|
+
disagg_spec=tracker.disagg_spec,
|
|
387
|
+
request_configs=tracker.request_configs,
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
def need_gpu_interm_buffer(lmcache_config: LMCacheEngineConfig):
|
|
392
|
+
return not lmcache_config.enable_pd
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
def _calculate_mtp_layers(vllm_config, model_config):
|
|
396
|
+
num_mtp_layers = 0
|
|
397
|
+
if vllm_config is not None and vllm_config.speculative_config is not None:
|
|
398
|
+
logger.info(
|
|
399
|
+
"vllm_config.speculative_config: %s", vllm_config.speculative_config
|
|
400
|
+
)
|
|
401
|
+
# TODO(baoloongmao): Support other MTP methods
|
|
402
|
+
if vllm_config.speculative_config.method == "deepseek_mtp":
|
|
403
|
+
num_mtp_layers = getattr(
|
|
404
|
+
model_config.hf_config, "num_nextn_predict_layers", 0
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
elif vllm_config.speculative_config.use_eagle():
|
|
408
|
+
try:
|
|
409
|
+
draft_model_config = vllm_config.speculative_config.draft_model_config
|
|
410
|
+
num_mtp_layers = draft_model_config.get_num_layers(
|
|
411
|
+
vllm_config.parallel_config
|
|
412
|
+
)
|
|
413
|
+
logger.info("EAGLE detected %d extra layer(s)", num_mtp_layers)
|
|
414
|
+
except Exception:
|
|
415
|
+
logger.info(
|
|
416
|
+
"EAGLE detected, but failed to get the number of extra layers"
|
|
417
|
+
"falling back to 1"
|
|
418
|
+
)
|
|
419
|
+
num_mtp_layers = 1
|
|
420
|
+
return num_mtp_layers
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
def _init_lmcache_engine(
|
|
424
|
+
lmcache_config: LMCacheEngineConfig,
|
|
425
|
+
vllm_config: "VllmConfig",
|
|
426
|
+
) -> LMCacheEngine:
|
|
427
|
+
"""Initialize the LMCache engine by the given model config and parallel
|
|
428
|
+
config. This function will check the environment variable
|
|
429
|
+
`LMCACHE_CONFIG_FILE` to load the configuration file. If that environment
|
|
430
|
+
variable is not set, this function will return None.
|
|
431
|
+
|
|
432
|
+
:param lmcache_config: The LMCache configuration.
|
|
433
|
+
:type lmcache_config: LMCacheEngineConfig
|
|
434
|
+
:param vllm_config: The vLLM configuration.
|
|
435
|
+
:type vllm_config: VllmConfig
|
|
436
|
+
|
|
437
|
+
:return: The initialized LMCache engine
|
|
438
|
+
:rtype: LMCacheEngine
|
|
439
|
+
"""
|
|
440
|
+
if curr_engine := LMCacheEngineBuilder.get(ENGINE_NAME):
|
|
441
|
+
return curr_engine
|
|
442
|
+
|
|
443
|
+
model_config = vllm_config.model_config
|
|
444
|
+
parallel_config = vllm_config.parallel_config
|
|
445
|
+
cache_config = vllm_config.cache_config
|
|
446
|
+
|
|
447
|
+
assert isinstance(lmcache_config, LMCacheEngineConfig), (
|
|
448
|
+
"LMCache v1 configuration is should be passed."
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
kv_dtype = get_kv_cache_torch_dtype(cache_config.cache_dtype, model_config.dtype)
|
|
452
|
+
|
|
453
|
+
use_mla = mla_enabled(model_config)
|
|
454
|
+
if use_mla and (
|
|
455
|
+
lmcache_config.remote_serde != "naive"
|
|
456
|
+
and lmcache_config.remote_serde is not None
|
|
457
|
+
):
|
|
458
|
+
raise ValueError("MLA only works with naive serde mode..")
|
|
459
|
+
|
|
460
|
+
# construct kv shape (for mem pool)
|
|
461
|
+
num_layer = model_config.get_num_layers(parallel_config)
|
|
462
|
+
num_mtp_layers = _calculate_mtp_layers(vllm_config, model_config)
|
|
463
|
+
num_layer += num_mtp_layers
|
|
464
|
+
chunk_size = lmcache_config.chunk_size
|
|
465
|
+
num_kv_head = model_config.get_num_kv_heads(parallel_config)
|
|
466
|
+
head_size = model_config.get_head_size()
|
|
467
|
+
kv_shape = (num_layer, 1 if use_mla else 2, chunk_size, num_kv_head, head_size)
|
|
468
|
+
logger.info(
|
|
469
|
+
"use mla: %s, kv shape: %s, num_mtp_layers: %s",
|
|
470
|
+
use_mla,
|
|
471
|
+
kv_shape,
|
|
472
|
+
num_mtp_layers,
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
# Change current device.
|
|
476
|
+
num_gpus = torch.cuda.device_count()
|
|
477
|
+
local_rank = parallel_config.rank % num_gpus
|
|
478
|
+
torch.cuda.set_device(local_rank)
|
|
479
|
+
device = torch.device(f"cuda:{local_rank}")
|
|
480
|
+
metadata = LMCacheEngineMetadata(
|
|
481
|
+
model_config.model,
|
|
482
|
+
parallel_config.world_size,
|
|
483
|
+
parallel_config.rank,
|
|
484
|
+
"vllm",
|
|
485
|
+
kv_dtype,
|
|
486
|
+
kv_shape,
|
|
487
|
+
use_mla,
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
use_gpu = need_gpu_interm_buffer(lmcache_config)
|
|
491
|
+
vllm_gpu_connector: (
|
|
492
|
+
VLLMBufferLayerwiseGPUConnector
|
|
493
|
+
| VLLMPagedMemGPUConnectorV2
|
|
494
|
+
| VLLMPagedMemLayerwiseGPUConnector
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
if use_mla and lmcache_config.use_layerwise:
|
|
498
|
+
raise ValueError("layerwise MLA connector is not supported yet")
|
|
499
|
+
|
|
500
|
+
# When use_mla is True, num_kv_head is 1
|
|
501
|
+
hidden_dim_size = num_kv_head * head_size
|
|
502
|
+
if lmcache_config.use_layerwise:
|
|
503
|
+
if lmcache_config.enable_blending:
|
|
504
|
+
# Use layerwise connector for blending
|
|
505
|
+
vllm_gpu_connector = VLLMBufferLayerwiseGPUConnector(
|
|
506
|
+
hidden_dim_size,
|
|
507
|
+
num_layer,
|
|
508
|
+
use_gpu=use_gpu,
|
|
509
|
+
chunk_size=chunk_size,
|
|
510
|
+
dtype=kv_dtype,
|
|
511
|
+
device=device,
|
|
512
|
+
)
|
|
513
|
+
else:
|
|
514
|
+
vllm_gpu_connector = VLLMPagedMemLayerwiseGPUConnector(
|
|
515
|
+
hidden_dim_size,
|
|
516
|
+
num_layer,
|
|
517
|
+
use_gpu=use_gpu,
|
|
518
|
+
chunk_size=chunk_size,
|
|
519
|
+
dtype=kv_dtype,
|
|
520
|
+
device=device,
|
|
521
|
+
)
|
|
522
|
+
else:
|
|
523
|
+
vllm_gpu_connector = VLLMPagedMemGPUConnectorV2(
|
|
524
|
+
hidden_dim_size,
|
|
525
|
+
num_layer,
|
|
526
|
+
use_gpu=use_gpu,
|
|
527
|
+
chunk_size=chunk_size,
|
|
528
|
+
dtype=kv_dtype,
|
|
529
|
+
device=device,
|
|
530
|
+
use_mla=use_mla,
|
|
531
|
+
)
|
|
532
|
+
tpg = get_tp_group()
|
|
533
|
+
engine = LMCacheEngineBuilder.get_or_create(
|
|
534
|
+
ENGINE_NAME,
|
|
535
|
+
lmcache_config,
|
|
536
|
+
metadata,
|
|
537
|
+
vllm_gpu_connector,
|
|
538
|
+
tpg.broadcast,
|
|
539
|
+
tpg.broadcast_object,
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
return engine
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
@dataclass
|
|
546
|
+
class LMCacheConnectorMetadata(KVConnectorMetadata):
|
|
547
|
+
requests: list[ReqMeta] = field(default_factory=list)
|
|
548
|
+
lookup_requests_in_step: list[str] = field(default_factory=list)
|
|
549
|
+
|
|
550
|
+
@_lmcache_nvtx_annotate
|
|
551
|
+
def add_request(self, req_meta: ReqMeta) -> None:
|
|
552
|
+
"""Add a request to the metadata.
|
|
553
|
+
|
|
554
|
+
Args:
|
|
555
|
+
req_meta (ReqMeta): the request metadata.
|
|
556
|
+
"""
|
|
557
|
+
self.requests.append(req_meta)
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class LMCacheConnectorV1Impl:
|
|
561
|
+
def __init__(
|
|
562
|
+
self,
|
|
563
|
+
vllm_config: "VllmConfig",
|
|
564
|
+
role: KVConnectorRole,
|
|
565
|
+
parent: KVConnectorBase_V1,
|
|
566
|
+
):
|
|
567
|
+
assert vllm_config.kv_transfer_config is not None
|
|
568
|
+
self._parent = parent
|
|
569
|
+
self._vllm_config = vllm_config
|
|
570
|
+
self.kv_role = vllm_config.kv_transfer_config.kv_role
|
|
571
|
+
self.worker_count = vllm_config.parallel_config.tensor_parallel_size
|
|
572
|
+
config = lmcache_get_or_create_config()
|
|
573
|
+
assert isinstance(config, LMCacheEngineConfig), (
|
|
574
|
+
"LMCache v1 configuration is should be passed for vLLM v1."
|
|
575
|
+
)
|
|
576
|
+
# Put the leading with "lmcache." and matched configs from
|
|
577
|
+
# vllm extra_config to the config
|
|
578
|
+
kv_connector_extra_config = (
|
|
579
|
+
vllm_config.kv_transfer_config.kv_connector_extra_config
|
|
580
|
+
)
|
|
581
|
+
if kv_connector_extra_config:
|
|
582
|
+
for key, value in kv_connector_extra_config.items():
|
|
583
|
+
if key.startswith("lmcache."):
|
|
584
|
+
config_key = key[8:] # Remove "lmcache." prefix
|
|
585
|
+
if _validate_and_set_config_value(config, config_key, value):
|
|
586
|
+
logger.info(
|
|
587
|
+
"Updated config %s from vLLM extra config: %s",
|
|
588
|
+
config_key,
|
|
589
|
+
value,
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
self.config = config
|
|
593
|
+
|
|
594
|
+
self.async_loading = config.enable_async_loading
|
|
595
|
+
self.layerwise_retrievers: list[Generator[torch.Tensor | None, None, None]] = []
|
|
596
|
+
self._stats_monitor = LMCStatsMonitor.GetOrCreate()
|
|
597
|
+
if role == KVConnectorRole.SCHEDULER:
|
|
598
|
+
# Create lookup client using factory
|
|
599
|
+
self.lookup_client = LookupClientFactory.create_lookup_client(
|
|
600
|
+
vllm_config, config
|
|
601
|
+
)
|
|
602
|
+
self._unfinished_requests: dict[str, Request] = {}
|
|
603
|
+
self._lookup_requests_in_step: list[str] = []
|
|
604
|
+
self.lmcache_engine = None
|
|
605
|
+
else:
|
|
606
|
+
self.lmcache_engine = _init_lmcache_engine(
|
|
607
|
+
config,
|
|
608
|
+
vllm_config,
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
self.use_layerwise = config.use_layerwise
|
|
612
|
+
self.enable_blending = config.enable_blending
|
|
613
|
+
|
|
614
|
+
if self.enable_blending:
|
|
615
|
+
self.blender = LMCBlenderBuilder.get_or_create(
|
|
616
|
+
ENGINE_NAME,
|
|
617
|
+
self.lmcache_engine,
|
|
618
|
+
self.lmcache_engine.gpu_connector,
|
|
619
|
+
config,
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
# Create lookup server using factory
|
|
623
|
+
assert self.lmcache_engine is not None
|
|
624
|
+
self.lookup_server = LookupClientFactory.create_lookup_server(
|
|
625
|
+
self.lmcache_engine, vllm_config
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
self.offload_server = ZMQOffloadServer(
|
|
629
|
+
self.lmcache_engine,
|
|
630
|
+
vllm_config,
|
|
631
|
+
get_tensor_model_parallel_rank(),
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
# In case of MLA, the lookup server is only created on worker 0
|
|
635
|
+
if self.async_loading and self.lookup_server is not None:
|
|
636
|
+
assert isinstance(self.lookup_server, LMCacheAsyncLookupServer)
|
|
637
|
+
self.lmcache_engine.post_init(async_lookup_server=self.lookup_server)
|
|
638
|
+
|
|
639
|
+
self.kv_caches: dict[str, torch.Tensor] = {}
|
|
640
|
+
|
|
641
|
+
self._block_size = vllm_config.cache_config.block_size
|
|
642
|
+
|
|
643
|
+
# request_id -> (vllm cached tokens, lmcache cached tokens)
|
|
644
|
+
self.load_specs: dict[str, LoadSpec] = {}
|
|
645
|
+
|
|
646
|
+
self.kv_cache_manager: KVCacheManager | None = None
|
|
647
|
+
|
|
648
|
+
# request_id -> full_token_ids
|
|
649
|
+
self._request_trackers: dict[str, RequestTracker] = {}
|
|
650
|
+
|
|
651
|
+
# Whether to discard partial chunks
|
|
652
|
+
self._discard_partial_chunks = (
|
|
653
|
+
vllm_config.kv_transfer_config.get_from_extra_config(
|
|
654
|
+
"discard_partial_chunks", False
|
|
655
|
+
)
|
|
656
|
+
or not config.save_unfull_chunk
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
self._lmcache_chunk_size = config.chunk_size
|
|
660
|
+
self._save_decode_cache = config.save_decode_cache
|
|
661
|
+
|
|
662
|
+
self.skip_last_n_tokens = vllm_config.kv_transfer_config.get_from_extra_config(
|
|
663
|
+
"skip_last_n_tokens", 0
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
self.num_layers = vllm_config.model_config.get_num_layers(
|
|
667
|
+
vllm_config.parallel_config
|
|
668
|
+
)
|
|
669
|
+
self.current_layer = 0
|
|
670
|
+
|
|
671
|
+
self.force_skip_save = bool(os.environ.get("LMCACHE_FORCE_SKIP_SAVE", False))
|
|
672
|
+
|
|
673
|
+
self._requests_priority: dict[str, int] = {}
|
|
674
|
+
|
|
675
|
+
# TODO(baoloongmao): Internal api server & plugin framework support
|
|
676
|
+
# dp > 1
|
|
677
|
+
if (
|
|
678
|
+
vllm_config.parallel_config.data_parallel_size_local == 1
|
|
679
|
+
or vllm_config.parallel_config.data_parallel_rank_local == 0
|
|
680
|
+
):
|
|
681
|
+
# Start internal API server if enabled
|
|
682
|
+
# The enabled check is in the InternalAPIServer constructor
|
|
683
|
+
self.api_server = InternalAPIServer(self)
|
|
684
|
+
self.api_server.start()
|
|
685
|
+
# Launch plugins
|
|
686
|
+
self.plugin_launcher = PluginLauncher(
|
|
687
|
+
self.config,
|
|
688
|
+
role,
|
|
689
|
+
self.worker_count,
|
|
690
|
+
-1
|
|
691
|
+
if self.lmcache_engine is None # scheduler side
|
|
692
|
+
else self.lmcache_engine.metadata.worker_id,
|
|
693
|
+
)
|
|
694
|
+
self.plugin_launcher.launch_plugins()
|
|
695
|
+
else:
|
|
696
|
+
self.api_server = None # type: ignore[assignment]
|
|
697
|
+
self.plugin_launcher = None # type: ignore[assignment]
|
|
698
|
+
logger.info(
|
|
699
|
+
"LMCache initialized for role %s with version %s, "
|
|
700
|
+
"vllm version %s, lmcache cache_engine metadata: %s",
|
|
701
|
+
role,
|
|
702
|
+
utils.get_version(),
|
|
703
|
+
VLLM_VERSION,
|
|
704
|
+
getattr(self.lmcache_engine, "metadata", None),
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
def get_inference_info(self) -> dict:
|
|
708
|
+
"""Get inference information including vLLM config and related details.
|
|
709
|
+
|
|
710
|
+
Returns:
|
|
711
|
+
dict: Dictionary containing inference information
|
|
712
|
+
"""
|
|
713
|
+
# Get vLLM config information
|
|
714
|
+
vllm_config = self._vllm_config
|
|
715
|
+
|
|
716
|
+
# Use vLLM config's string representation and add specific configs
|
|
717
|
+
inference_info = {
|
|
718
|
+
"vllm_version": VLLM_VERSION,
|
|
719
|
+
"lmcache_version": utils.get_version(),
|
|
720
|
+
"vllm_config": str(vllm_config),
|
|
721
|
+
"model_config": {
|
|
722
|
+
"model": getattr(vllm_config.model_config, "model", None),
|
|
723
|
+
"dtype": str(getattr(vllm_config.model_config, "dtype", None)),
|
|
724
|
+
"max_model_len": getattr(
|
|
725
|
+
vllm_config.model_config, "max_model_len", None
|
|
726
|
+
),
|
|
727
|
+
"vocab_size": vllm_config.model_config.get_vocab_size(),
|
|
728
|
+
"num_layers": getattr(
|
|
729
|
+
vllm_config.model_config, "get_num_layers", lambda _: None
|
|
730
|
+
)(vllm_config.parallel_config),
|
|
731
|
+
"num_attention_heads": getattr(
|
|
732
|
+
vllm_config.model_config, "get_num_attention_heads", lambda _: None
|
|
733
|
+
)(vllm_config.parallel_config),
|
|
734
|
+
"num_kv_heads": getattr(
|
|
735
|
+
vllm_config.model_config, "get_num_kv_heads", lambda _: None
|
|
736
|
+
)(vllm_config.parallel_config),
|
|
737
|
+
"head_size": getattr(
|
|
738
|
+
vllm_config.model_config, "get_head_size", lambda: None
|
|
739
|
+
)(),
|
|
740
|
+
},
|
|
741
|
+
"cache_config": {
|
|
742
|
+
"block_size": getattr(vllm_config.cache_config, "block_size", None),
|
|
743
|
+
"cache_dtype": str(
|
|
744
|
+
getattr(vllm_config.cache_config, "cache_dtype", None)
|
|
745
|
+
),
|
|
746
|
+
"gpu_memory_utilization": getattr(
|
|
747
|
+
vllm_config.cache_config, "gpu_memory_utilization", None
|
|
748
|
+
),
|
|
749
|
+
},
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return inference_info
|
|
753
|
+
|
|
754
|
+
def get_inference_version(self) -> str:
|
|
755
|
+
"""Get vLLM version information.
|
|
756
|
+
|
|
757
|
+
Returns:
|
|
758
|
+
str: vLLM version string
|
|
759
|
+
"""
|
|
760
|
+
return VLLM_VERSION
|
|
761
|
+
|
|
762
|
+
@_lmcache_nvtx_annotate
|
|
763
|
+
def _init_kv_caches_from_forward_context(self, forward_context: "ForwardContext"):
|
|
764
|
+
for layer_name in forward_context.no_compile_layers:
|
|
765
|
+
attn_layer = forward_context.no_compile_layers[layer_name]
|
|
766
|
+
if not hasattr(attn_layer, "kv_cache"):
|
|
767
|
+
logger.debug("The layer %s does not have kv_cache, skip it", layer_name)
|
|
768
|
+
continue
|
|
769
|
+
|
|
770
|
+
if layer_name not in self.kv_caches:
|
|
771
|
+
self.kv_caches[layer_name] = attn_layer.kv_cache[
|
|
772
|
+
forward_context.virtual_engine
|
|
773
|
+
]
|
|
774
|
+
|
|
775
|
+
####################
|
|
776
|
+
# Worker side APIs
|
|
777
|
+
####################
|
|
778
|
+
|
|
779
|
+
@_lmcache_nvtx_annotate
|
|
780
|
+
def start_load_kv(self, forward_context: "ForwardContext", **kwargs) -> None:
|
|
781
|
+
"""Start loading the KV cache from the connector buffer to vLLM's
|
|
782
|
+
paged KV buffer.
|
|
783
|
+
|
|
784
|
+
Args:
|
|
785
|
+
forward_context (ForwardContext): the forward context.
|
|
786
|
+
|
|
787
|
+
Note:
|
|
788
|
+
The number of elements in kv_caches and layer_names should be
|
|
789
|
+
the same.
|
|
790
|
+
"""
|
|
791
|
+
self.current_layer = 0
|
|
792
|
+
|
|
793
|
+
if len(self.kv_caches) == 0:
|
|
794
|
+
self._init_kv_caches_from_forward_context(forward_context)
|
|
795
|
+
|
|
796
|
+
metadata = self._parent._get_connector_metadata()
|
|
797
|
+
assert isinstance(metadata, LMCacheConnectorMetadata)
|
|
798
|
+
|
|
799
|
+
assert len(self.kv_caches) > 0
|
|
800
|
+
kvcaches = list(self.kv_caches.values())
|
|
801
|
+
|
|
802
|
+
attn_metadata = forward_context.attn_metadata
|
|
803
|
+
if attn_metadata is None:
|
|
804
|
+
logger.debug("In connector.start_load_kv, but the attn_metadata is None")
|
|
805
|
+
return
|
|
806
|
+
|
|
807
|
+
assert self.lmcache_engine is not None
|
|
808
|
+
|
|
809
|
+
self.lmcache_engine.post_init(kvcaches=kvcaches)
|
|
810
|
+
|
|
811
|
+
self.layerwise_retrievers = []
|
|
812
|
+
|
|
813
|
+
for idx, request in enumerate(metadata.requests):
|
|
814
|
+
if request.load_spec is None:
|
|
815
|
+
continue
|
|
816
|
+
last_idx = idx
|
|
817
|
+
|
|
818
|
+
for idx, request in enumerate(metadata.requests):
|
|
819
|
+
if request.load_spec is None:
|
|
820
|
+
continue
|
|
821
|
+
|
|
822
|
+
tokens = request.token_ids
|
|
823
|
+
# TODO: have a pre-allocated buffer to hold the slot_mappings
|
|
824
|
+
slot_mapping = request.slot_mapping.cuda()
|
|
825
|
+
assert len(tokens) == len(slot_mapping)
|
|
826
|
+
|
|
827
|
+
self._stats_monitor.update_interval_vllm_hit_tokens(
|
|
828
|
+
request.load_spec.vllm_cached_tokens
|
|
829
|
+
)
|
|
830
|
+
token_mask = torch.ones(len(tokens), dtype=torch.bool)
|
|
831
|
+
masked_token_count = (
|
|
832
|
+
request.load_spec.vllm_cached_tokens
|
|
833
|
+
// self._lmcache_chunk_size
|
|
834
|
+
* self._lmcache_chunk_size
|
|
835
|
+
)
|
|
836
|
+
token_mask[:masked_token_count] = False
|
|
837
|
+
|
|
838
|
+
lmcache_cached_tokens = request.load_spec.lmcache_cached_tokens
|
|
839
|
+
if self.use_layerwise:
|
|
840
|
+
sync = idx == last_idx
|
|
841
|
+
# NOTE(Jiayi): Perform blending before layerwise prefix caching
|
|
842
|
+
if self.enable_blending:
|
|
843
|
+
# TODO(Jiayi): Need to make prefix caching and blending
|
|
844
|
+
# compatible
|
|
845
|
+
self.blender.blend(
|
|
846
|
+
tokens[:lmcache_cached_tokens],
|
|
847
|
+
token_mask[:lmcache_cached_tokens],
|
|
848
|
+
kvcaches=kvcaches,
|
|
849
|
+
slot_mapping=slot_mapping[:lmcache_cached_tokens],
|
|
850
|
+
)
|
|
851
|
+
else:
|
|
852
|
+
layerwise_retriever = self.lmcache_engine.retrieve_layer(
|
|
853
|
+
tokens[:lmcache_cached_tokens],
|
|
854
|
+
token_mask[:lmcache_cached_tokens],
|
|
855
|
+
kvcaches=kvcaches,
|
|
856
|
+
slot_mapping=slot_mapping[:lmcache_cached_tokens],
|
|
857
|
+
sync=sync,
|
|
858
|
+
)
|
|
859
|
+
# NOTE: retrieve for two layers at the first layer
|
|
860
|
+
next(layerwise_retriever)
|
|
861
|
+
next(layerwise_retriever)
|
|
862
|
+
self.layerwise_retrievers.append(layerwise_retriever)
|
|
863
|
+
else:
|
|
864
|
+
ret_token_mask = self.lmcache_engine.retrieve(
|
|
865
|
+
tokens[:lmcache_cached_tokens],
|
|
866
|
+
token_mask[:lmcache_cached_tokens],
|
|
867
|
+
kvcaches=kvcaches,
|
|
868
|
+
slot_mapping=slot_mapping[:lmcache_cached_tokens],
|
|
869
|
+
request_configs=request.request_configs,
|
|
870
|
+
req_id=request.req_id,
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
# Check the result
|
|
874
|
+
num_retrieved_tokens = ret_token_mask.sum().item()
|
|
875
|
+
num_expected_tokens = (
|
|
876
|
+
lmcache_cached_tokens - request.load_spec.vllm_cached_tokens
|
|
877
|
+
)
|
|
878
|
+
if num_retrieved_tokens < num_expected_tokens:
|
|
879
|
+
logger.error(
|
|
880
|
+
"The number of retrieved tokens is less than the "
|
|
881
|
+
"expected number of tokens! This should not happen!"
|
|
882
|
+
)
|
|
883
|
+
logger.error(
|
|
884
|
+
"Num retrieved tokens: %d, num expected tokens: %d",
|
|
885
|
+
num_retrieved_tokens,
|
|
886
|
+
num_expected_tokens,
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
@_lmcache_nvtx_annotate
|
|
890
|
+
def wait_for_layer_load(self, layer_name: str) -> None:
|
|
891
|
+
"""Blocking until the KV for a specific layer is loaded into vLLM's
|
|
892
|
+
paged buffer.
|
|
893
|
+
|
|
894
|
+
This interface will be useful for layer-by-layer pipelining.
|
|
895
|
+
|
|
896
|
+
Args:
|
|
897
|
+
layer_name: the name of that layer
|
|
898
|
+
"""
|
|
899
|
+
if self.layerwise_retrievers:
|
|
900
|
+
logger.debug("Waiting for layer %s to be loaded", self.current_layer)
|
|
901
|
+
|
|
902
|
+
# Wait for the layer to be loaded
|
|
903
|
+
for layerwise_retriever in self.layerwise_retrievers:
|
|
904
|
+
ret_token_mask = next(layerwise_retriever)
|
|
905
|
+
|
|
906
|
+
if self.current_layer == self.num_layers - 1:
|
|
907
|
+
assert ret_token_mask is not None
|
|
908
|
+
num_retrieved_tokens = ret_token_mask.sum().item()
|
|
909
|
+
logger.info("Retrieved %s tokens", num_retrieved_tokens)
|
|
910
|
+
|
|
911
|
+
return
|
|
912
|
+
|
|
913
|
+
@_lmcache_nvtx_annotate
|
|
914
|
+
def save_kv_layer(
|
|
915
|
+
self,
|
|
916
|
+
layer_name: str,
|
|
917
|
+
kv_layer: torch.Tensor,
|
|
918
|
+
attn_metadata: "AttentionMetadata",
|
|
919
|
+
**kwargs,
|
|
920
|
+
) -> None:
|
|
921
|
+
"""Start saving the a layer of KV cache from vLLM's paged buffer
|
|
922
|
+
to the connector.
|
|
923
|
+
|
|
924
|
+
Args:
|
|
925
|
+
layer_name (str): the name of the layer.
|
|
926
|
+
kv_layer (torch.Tensor): the paged KV buffer of the current
|
|
927
|
+
layer in vLLM.
|
|
928
|
+
attn_metadata (AttentionMetadata): the attention metadata.
|
|
929
|
+
"""
|
|
930
|
+
assert self.lmcache_engine is not None
|
|
931
|
+
|
|
932
|
+
if not self.use_layerwise:
|
|
933
|
+
return
|
|
934
|
+
|
|
935
|
+
if self.kv_role == "kv_consumer":
|
|
936
|
+
# Don't do save if the role is kv_consumer
|
|
937
|
+
return
|
|
938
|
+
if self._parent._connector_metadata is None:
|
|
939
|
+
logger.warning(
|
|
940
|
+
"In connector.save_kv_layer, but the connector metadata is None"
|
|
941
|
+
)
|
|
942
|
+
return
|
|
943
|
+
connector_metadata = self._parent._get_connector_metadata()
|
|
944
|
+
assert isinstance(connector_metadata, LMCacheConnectorMetadata)
|
|
945
|
+
|
|
946
|
+
assert len(self.kv_caches) > 0
|
|
947
|
+
|
|
948
|
+
kvcaches = list(self.kv_caches.values())
|
|
949
|
+
if self.current_layer == 0:
|
|
950
|
+
self.layerwise_storers = []
|
|
951
|
+
|
|
952
|
+
is_first = True
|
|
953
|
+
|
|
954
|
+
for idx, request in enumerate(connector_metadata.requests):
|
|
955
|
+
save_spec = request.save_spec
|
|
956
|
+
if save_spec is None or not save_spec.can_save:
|
|
957
|
+
continue
|
|
958
|
+
|
|
959
|
+
token_ids = request.token_ids
|
|
960
|
+
assert isinstance(token_ids, list)
|
|
961
|
+
|
|
962
|
+
slot_mapping = request.slot_mapping
|
|
963
|
+
assert isinstance(slot_mapping, torch.Tensor)
|
|
964
|
+
assert len(slot_mapping) == len(token_ids)
|
|
965
|
+
|
|
966
|
+
# TODO: have a pre-allocated buffer to hold the slot_mappings
|
|
967
|
+
slot_mapping = slot_mapping.cuda()
|
|
968
|
+
|
|
969
|
+
if self.kv_role == "kv_producer":
|
|
970
|
+
skip_leading_tokens = 0
|
|
971
|
+
else:
|
|
972
|
+
skip_leading_tokens = save_spec.skip_leading_tokens
|
|
973
|
+
|
|
974
|
+
if skip_leading_tokens == len(token_ids):
|
|
975
|
+
continue # skip this request
|
|
976
|
+
# Align to lmcache chunk size
|
|
977
|
+
skip_leading_tokens = (
|
|
978
|
+
skip_leading_tokens
|
|
979
|
+
// self._lmcache_chunk_size
|
|
980
|
+
* self._lmcache_chunk_size
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
store_mask = torch.ones(len(token_ids), dtype=torch.bool)
|
|
984
|
+
store_mask[:skip_leading_tokens] = False
|
|
985
|
+
|
|
986
|
+
logger.info(
|
|
987
|
+
"Storing KV cache for %d out of %d tokens "
|
|
988
|
+
"(skip_leading_tokens=%d) for request %s",
|
|
989
|
+
len(token_ids) - skip_leading_tokens,
|
|
990
|
+
len(token_ids),
|
|
991
|
+
skip_leading_tokens,
|
|
992
|
+
request.req_id,
|
|
993
|
+
)
|
|
994
|
+
|
|
995
|
+
# TODO (Jiayi): need to make layerwise storing
|
|
996
|
+
# compatible with disagg spec
|
|
997
|
+
layerwise_storer = self.lmcache_engine.store_layer(
|
|
998
|
+
token_ids,
|
|
999
|
+
mask=store_mask,
|
|
1000
|
+
kvcaches=kvcaches,
|
|
1001
|
+
slot_mapping=slot_mapping,
|
|
1002
|
+
offset=skip_leading_tokens,
|
|
1003
|
+
sync=is_first,
|
|
1004
|
+
)
|
|
1005
|
+
self.layerwise_storers.append(layerwise_storer)
|
|
1006
|
+
if is_first:
|
|
1007
|
+
is_first = False
|
|
1008
|
+
|
|
1009
|
+
for layerwise_storer in self.layerwise_storers:
|
|
1010
|
+
next(layerwise_storer)
|
|
1011
|
+
|
|
1012
|
+
self.current_layer += 1
|
|
1013
|
+
|
|
1014
|
+
@_lmcache_nvtx_annotate
|
|
1015
|
+
def wait_for_save(self):
|
|
1016
|
+
"""Blocking until the KV cache is saved to the connector buffer."""
|
|
1017
|
+
|
|
1018
|
+
connector_metadata = self._parent._get_connector_metadata()
|
|
1019
|
+
assert isinstance(connector_metadata, LMCacheConnectorMetadata)
|
|
1020
|
+
|
|
1021
|
+
self.lmcache_engine.lookup_unpin( # type: ignore
|
|
1022
|
+
connector_metadata.lookup_requests_in_step
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
if self.kv_role == "kv_consumer":
|
|
1026
|
+
# Don't do save if the role is kv_consumer
|
|
1027
|
+
return
|
|
1028
|
+
|
|
1029
|
+
if self.use_layerwise:
|
|
1030
|
+
for layerwise_storer in self.layerwise_storers:
|
|
1031
|
+
next(layerwise_storer)
|
|
1032
|
+
return
|
|
1033
|
+
|
|
1034
|
+
assert len(self.kv_caches) > 0
|
|
1035
|
+
kvcaches = list(self.kv_caches.values())
|
|
1036
|
+
|
|
1037
|
+
assert self.lmcache_engine is not None
|
|
1038
|
+
|
|
1039
|
+
for request in connector_metadata.requests:
|
|
1040
|
+
save_spec = request.save_spec
|
|
1041
|
+
if (
|
|
1042
|
+
save_spec is None or not save_spec.can_save
|
|
1043
|
+
) and self.kv_role != "kv_producer":
|
|
1044
|
+
continue
|
|
1045
|
+
|
|
1046
|
+
token_ids = request.token_ids
|
|
1047
|
+
|
|
1048
|
+
slot_mapping = request.slot_mapping
|
|
1049
|
+
assert isinstance(slot_mapping, torch.Tensor)
|
|
1050
|
+
assert len(slot_mapping) == len(token_ids)
|
|
1051
|
+
assert save_spec is not None
|
|
1052
|
+
|
|
1053
|
+
# TODO: have a pre-allocated buffer to hold the slot_mappings
|
|
1054
|
+
slot_mapping = slot_mapping.cuda()
|
|
1055
|
+
|
|
1056
|
+
skip_leading_tokens = save_spec.skip_leading_tokens
|
|
1057
|
+
if self.kv_role == "kv_producer":
|
|
1058
|
+
assert request.disagg_spec is not None
|
|
1059
|
+
skip_leading_tokens = min(
|
|
1060
|
+
skip_leading_tokens, request.disagg_spec.num_transferred_tokens
|
|
1061
|
+
)
|
|
1062
|
+
|
|
1063
|
+
if skip_leading_tokens == len(token_ids):
|
|
1064
|
+
continue # skip this request
|
|
1065
|
+
# Align to lmcache chunk size
|
|
1066
|
+
skip_leading_tokens = (
|
|
1067
|
+
skip_leading_tokens
|
|
1068
|
+
// self._lmcache_chunk_size
|
|
1069
|
+
* self._lmcache_chunk_size
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
store_mask = torch.ones(len(token_ids), dtype=torch.bool)
|
|
1073
|
+
store_mask[:skip_leading_tokens] = False
|
|
1074
|
+
|
|
1075
|
+
logger.info(
|
|
1076
|
+
"Storing KV cache for %d out of %d tokens "
|
|
1077
|
+
"(skip_leading_tokens=%d) for request %s",
|
|
1078
|
+
len(token_ids) - skip_leading_tokens,
|
|
1079
|
+
len(token_ids),
|
|
1080
|
+
skip_leading_tokens,
|
|
1081
|
+
request.req_id,
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
is_last_prefill = request.is_last_prefill
|
|
1085
|
+
if is_last_prefill:
|
|
1086
|
+
if request.disagg_spec:
|
|
1087
|
+
request.disagg_spec.is_last_prefill = True
|
|
1088
|
+
else:
|
|
1089
|
+
token_len = len(token_ids)
|
|
1090
|
+
aligned_token_len = (
|
|
1091
|
+
token_len // self._lmcache_chunk_size * self._lmcache_chunk_size
|
|
1092
|
+
)
|
|
1093
|
+
token_ids = token_ids[:aligned_token_len]
|
|
1094
|
+
store_mask = store_mask[:aligned_token_len]
|
|
1095
|
+
slot_mapping = slot_mapping[:aligned_token_len]
|
|
1096
|
+
|
|
1097
|
+
self.lmcache_engine.store(
|
|
1098
|
+
token_ids,
|
|
1099
|
+
mask=store_mask,
|
|
1100
|
+
kvcaches=kvcaches,
|
|
1101
|
+
slot_mapping=slot_mapping,
|
|
1102
|
+
offset=skip_leading_tokens,
|
|
1103
|
+
transfer_spec=request.disagg_spec,
|
|
1104
|
+
request_configs=request.request_configs,
|
|
1105
|
+
)
|
|
1106
|
+
|
|
1107
|
+
# NOTE(Jiayi): We assume all tokens are saved
|
|
1108
|
+
save_spec.skip_leading_tokens = len(token_ids)
|
|
1109
|
+
if request.disagg_spec:
|
|
1110
|
+
request.disagg_spec.num_transferred_tokens = len(token_ids)
|
|
1111
|
+
|
|
1112
|
+
@_lmcache_nvtx_annotate
|
|
1113
|
+
def get_finished(
|
|
1114
|
+
self, finished_req_ids: set[str]
|
|
1115
|
+
) -> tuple[set[str] | None, set[str] | None]:
|
|
1116
|
+
return None, None
|
|
1117
|
+
|
|
1118
|
+
###################
|
|
1119
|
+
# Scheduler side APIs
|
|
1120
|
+
####################
|
|
1121
|
+
|
|
1122
|
+
@_lmcache_nvtx_annotate
|
|
1123
|
+
def get_num_new_matched_tokens(
|
|
1124
|
+
self,
|
|
1125
|
+
request: "Request",
|
|
1126
|
+
num_computed_tokens: int,
|
|
1127
|
+
) -> int | None:
|
|
1128
|
+
"""
|
|
1129
|
+
Check for external KV cache hit.
|
|
1130
|
+
|
|
1131
|
+
Args:
|
|
1132
|
+
request (Request): the request object.
|
|
1133
|
+
num_computed_tokens (int): the number of locally
|
|
1134
|
+
computed tokens for this request
|
|
1135
|
+
|
|
1136
|
+
Returns:
|
|
1137
|
+
the number of tokens that can be loaded from the
|
|
1138
|
+
external KV cache beyond what is already computed.
|
|
1139
|
+
"""
|
|
1140
|
+
if self.kv_role == "kv_producer" and not hasattr(
|
|
1141
|
+
self.lookup_client, "supports_producer_reuse"
|
|
1142
|
+
):
|
|
1143
|
+
return 0
|
|
1144
|
+
|
|
1145
|
+
self._requests_priority[request.request_id] = request.priority
|
|
1146
|
+
|
|
1147
|
+
token_ids = request.prompt_token_ids
|
|
1148
|
+
|
|
1149
|
+
# If the request has multimodal hashes, apply them to the token ids
|
|
1150
|
+
mm_hashes, mm_positions = extract_mm_features(request)
|
|
1151
|
+
if mm_hashes and mm_positions:
|
|
1152
|
+
# TODO(Jiayi): Optimize this
|
|
1153
|
+
token_ids_tensor = torch.tensor(request.prompt_token_ids)
|
|
1154
|
+
apply_mm_hashes_to_token_ids(token_ids_tensor, mm_hashes, mm_positions)
|
|
1155
|
+
token_ids = token_ids_tensor.tolist()
|
|
1156
|
+
|
|
1157
|
+
if request.sampling_params:
|
|
1158
|
+
request_configs = extract_request_configs(request.sampling_params)
|
|
1159
|
+
else:
|
|
1160
|
+
request_configs = None
|
|
1161
|
+
|
|
1162
|
+
if self.skip_last_n_tokens > 0:
|
|
1163
|
+
assert token_ids is not None
|
|
1164
|
+
token_ids = token_ids[: -self.skip_last_n_tokens]
|
|
1165
|
+
lookup_id = request.request_id if self.async_loading else str(uuid.uuid4())
|
|
1166
|
+
|
|
1167
|
+
self._lookup_requests_in_step.append(lookup_id)
|
|
1168
|
+
|
|
1169
|
+
num_external_hit_tokens = self.lookup_client.lookup(
|
|
1170
|
+
token_ids,
|
|
1171
|
+
lookup_id=lookup_id,
|
|
1172
|
+
request_configs=request_configs,
|
|
1173
|
+
)
|
|
1174
|
+
|
|
1175
|
+
if num_external_hit_tokens is None:
|
|
1176
|
+
logger.info(
|
|
1177
|
+
"Reqid: %s, Total tokens %d, LMCache hit tokens: None.",
|
|
1178
|
+
request.request_id,
|
|
1179
|
+
request.num_tokens,
|
|
1180
|
+
)
|
|
1181
|
+
return None
|
|
1182
|
+
|
|
1183
|
+
# When prompt length is divisible by the block size and all
|
|
1184
|
+
# blocks are cached, we need to recompute the last token.
|
|
1185
|
+
# This will be removed in the future if vLLM's scheduler provides
|
|
1186
|
+
# a better support for this case.
|
|
1187
|
+
need_to_allocate = num_external_hit_tokens - num_computed_tokens
|
|
1188
|
+
|
|
1189
|
+
# In, full-prompt-hit case, we need to recompute the last token
|
|
1190
|
+
if num_external_hit_tokens == request.num_tokens:
|
|
1191
|
+
need_to_allocate -= 1
|
|
1192
|
+
|
|
1193
|
+
logger.info(
|
|
1194
|
+
"Reqid: %s, Total tokens %d, LMCache hit tokens: %d, need to load: %d",
|
|
1195
|
+
request.request_id,
|
|
1196
|
+
request.num_tokens,
|
|
1197
|
+
num_external_hit_tokens,
|
|
1198
|
+
need_to_allocate,
|
|
1199
|
+
)
|
|
1200
|
+
|
|
1201
|
+
self.load_specs[request.request_id] = LoadSpec(
|
|
1202
|
+
vllm_cached_tokens=num_computed_tokens,
|
|
1203
|
+
lmcache_cached_tokens=num_external_hit_tokens,
|
|
1204
|
+
can_load=False,
|
|
1205
|
+
)
|
|
1206
|
+
|
|
1207
|
+
if need_to_allocate <= 0:
|
|
1208
|
+
return 0
|
|
1209
|
+
|
|
1210
|
+
return need_to_allocate
|
|
1211
|
+
|
|
1212
|
+
@_lmcache_nvtx_annotate
|
|
1213
|
+
def update_state_after_alloc(self, request: "Request", num_external_tokens: int):
|
|
1214
|
+
"""
|
|
1215
|
+
Update KVConnector state after temporary buffer alloc.
|
|
1216
|
+
|
|
1217
|
+
For SharedStorageConnector, update _request_needs_load
|
|
1218
|
+
if the CacheManager this allocated blocks for us.
|
|
1219
|
+
"""
|
|
1220
|
+
|
|
1221
|
+
# Clear local status in lookup client when a new request is
|
|
1222
|
+
# successfully scheduled.
|
|
1223
|
+
self.lookup_client.clear_lookup_status(request.request_id)
|
|
1224
|
+
|
|
1225
|
+
kv_transfer_params = (
|
|
1226
|
+
request.kv_transfer_params
|
|
1227
|
+
if hasattr(request, "kv_transfer_params")
|
|
1228
|
+
else None
|
|
1229
|
+
)
|
|
1230
|
+
|
|
1231
|
+
if kv_transfer_params is not None and "disagg_spec" in kv_transfer_params:
|
|
1232
|
+
req_disagg_spec = kv_transfer_params["disagg_spec"]
|
|
1233
|
+
|
|
1234
|
+
receiver_id = req_disagg_spec["receiver_host"] + str(
|
|
1235
|
+
req_disagg_spec["receiver_init_port"]
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
disagg_spec = DisaggSpec(
|
|
1239
|
+
req_id=req_disagg_spec["req_id"],
|
|
1240
|
+
receiver_id=receiver_id,
|
|
1241
|
+
receiver_host=req_disagg_spec["receiver_host"],
|
|
1242
|
+
receiver_init_port=req_disagg_spec["receiver_init_port"],
|
|
1243
|
+
receiver_alloc_port=req_disagg_spec["receiver_alloc_port"],
|
|
1244
|
+
)
|
|
1245
|
+
|
|
1246
|
+
tmp_disagg_tracker[request.request_id] = disagg_spec
|
|
1247
|
+
self._unfinished_requests[request.request_id] = request
|
|
1248
|
+
|
|
1249
|
+
if request.request_id not in self.load_specs:
|
|
1250
|
+
# No KV tokens from external KV cache, return
|
|
1251
|
+
return
|
|
1252
|
+
|
|
1253
|
+
if num_external_tokens == 0:
|
|
1254
|
+
# No need to load anything
|
|
1255
|
+
self.load_specs[request.request_id].can_load = False
|
|
1256
|
+
return
|
|
1257
|
+
|
|
1258
|
+
# Only check for non-prompt-hit case
|
|
1259
|
+
if (
|
|
1260
|
+
self.load_specs[request.request_id].lmcache_cached_tokens
|
|
1261
|
+
!= request.num_tokens
|
|
1262
|
+
):
|
|
1263
|
+
assert (
|
|
1264
|
+
num_external_tokens > 0
|
|
1265
|
+
and num_external_tokens
|
|
1266
|
+
== self.load_specs[request.request_id].lmcache_cached_tokens
|
|
1267
|
+
- self.load_specs[request.request_id].vllm_cached_tokens
|
|
1268
|
+
), (
|
|
1269
|
+
f"Mismatch in number of tokens: {num_external_tokens} vs "
|
|
1270
|
+
f"{self.load_specs[request.request_id].lmcache_cached_tokens} -"
|
|
1271
|
+
f" {self.load_specs[request.request_id].vllm_cached_tokens}"
|
|
1272
|
+
f" for request {request.request_id}"
|
|
1273
|
+
)
|
|
1274
|
+
|
|
1275
|
+
self.load_specs[request.request_id].can_load = True
|
|
1276
|
+
|
|
1277
|
+
@_lmcache_nvtx_annotate
|
|
1278
|
+
def build_connector_meta(
|
|
1279
|
+
self, scheduler_output: SchedulerOutput
|
|
1280
|
+
) -> KVConnectorMetadata:
|
|
1281
|
+
"""Attach the connector metadata to the request object.
|
|
1282
|
+
|
|
1283
|
+
This function should NOT modify other fields in the scheduler_output
|
|
1284
|
+
except the `kv_connector_metadata` field.
|
|
1285
|
+
Also, calling this function will reset the state of the connector.
|
|
1286
|
+
|
|
1287
|
+
Args:
|
|
1288
|
+
scheduler_output (SchedulerOutput): the scheduler output object.
|
|
1289
|
+
"""
|
|
1290
|
+
|
|
1291
|
+
force_skip_save = self.kv_role == "kv_consumer" or self.force_skip_save
|
|
1292
|
+
|
|
1293
|
+
meta = LMCacheConnectorMetadata()
|
|
1294
|
+
|
|
1295
|
+
# set and update lookup requests for unpin
|
|
1296
|
+
meta.lookup_requests_in_step = self._lookup_requests_in_step
|
|
1297
|
+
self._lookup_requests_in_step = []
|
|
1298
|
+
|
|
1299
|
+
for finished_req_id in scheduler_output.finished_req_ids:
|
|
1300
|
+
self._request_trackers.pop(finished_req_id, None)
|
|
1301
|
+
self._unfinished_requests.pop(finished_req_id, None)
|
|
1302
|
+
|
|
1303
|
+
for request in scheduler_output.scheduled_new_reqs:
|
|
1304
|
+
# Right now, we only load KV for new requests
|
|
1305
|
+
load_spec = self.load_specs.pop(request.req_id, None)
|
|
1306
|
+
num_tokens_to_compute = (
|
|
1307
|
+
request.num_computed_tokens
|
|
1308
|
+
+ scheduler_output.num_scheduled_tokens[request.req_id]
|
|
1309
|
+
)
|
|
1310
|
+
lmcache_cached_tokens = 0
|
|
1311
|
+
if load_spec is not None:
|
|
1312
|
+
lmcache_cached_tokens = load_spec.lmcache_cached_tokens
|
|
1313
|
+
request_priority = self._requests_priority.pop(request.req_id, 0)
|
|
1314
|
+
|
|
1315
|
+
skip_save = force_skip_save or (
|
|
1316
|
+
self.config.priority_limit is not None
|
|
1317
|
+
and request_priority > self.config.priority_limit
|
|
1318
|
+
)
|
|
1319
|
+
|
|
1320
|
+
request_tracker = RequestTracker.from_new_request(
|
|
1321
|
+
self.config,
|
|
1322
|
+
request,
|
|
1323
|
+
num_tokens_to_compute,
|
|
1324
|
+
lmcache_cached_tokens,
|
|
1325
|
+
skip_save,
|
|
1326
|
+
)
|
|
1327
|
+
self._request_trackers[request.req_id] = request_tracker
|
|
1328
|
+
|
|
1329
|
+
req_meta = ReqMeta.from_request_tracker(
|
|
1330
|
+
request_tracker,
|
|
1331
|
+
self._block_size,
|
|
1332
|
+
self._lmcache_chunk_size,
|
|
1333
|
+
load_spec=load_spec,
|
|
1334
|
+
discard_partial_chunks=self._discard_partial_chunks,
|
|
1335
|
+
save_decode_cache=self._save_decode_cache,
|
|
1336
|
+
)
|
|
1337
|
+
if req_meta is not None:
|
|
1338
|
+
meta.add_request(req_meta)
|
|
1339
|
+
|
|
1340
|
+
cached_reqs = scheduler_output.scheduled_cached_reqs
|
|
1341
|
+
|
|
1342
|
+
# NOTE: For backward compatibility with vllm version < 0.9.2,
|
|
1343
|
+
# In the latest vllm version, the type of scheduled_cached_reqs has
|
|
1344
|
+
# changed from list to object `CachedRequestData`
|
|
1345
|
+
if isinstance(cached_reqs, list):
|
|
1346
|
+
for i, req in enumerate(cached_reqs):
|
|
1347
|
+
request_tracker = self._request_trackers[req.req_id]
|
|
1348
|
+
request_tracker.update(req.new_token_ids, req.new_block_ids)
|
|
1349
|
+
|
|
1350
|
+
req_meta = ReqMeta.from_request_tracker(
|
|
1351
|
+
request_tracker,
|
|
1352
|
+
self._block_size,
|
|
1353
|
+
self._lmcache_chunk_size,
|
|
1354
|
+
load_spec=None,
|
|
1355
|
+
discard_partial_chunks=self._discard_partial_chunks,
|
|
1356
|
+
)
|
|
1357
|
+
if req_meta is not None:
|
|
1358
|
+
meta.add_request(req_meta)
|
|
1359
|
+
return meta
|
|
1360
|
+
|
|
1361
|
+
for i, req_id in enumerate(cached_reqs.req_ids):
|
|
1362
|
+
request_tracker = self._request_trackers[req_id]
|
|
1363
|
+
num_new_tokens = scheduler_output.num_scheduled_tokens[req_id]
|
|
1364
|
+
if cached_request := self._unfinished_requests.get(req_id):
|
|
1365
|
+
num_current_tokens = len(request_tracker.token_ids)
|
|
1366
|
+
new_token_ids = cached_request.all_token_ids[
|
|
1367
|
+
num_current_tokens : num_current_tokens + num_new_tokens
|
|
1368
|
+
]
|
|
1369
|
+
else:
|
|
1370
|
+
raise ValueError(
|
|
1371
|
+
f"Request {req_id} is not in _unfinished_requests, "
|
|
1372
|
+
f"but it is scheduled to be cached"
|
|
1373
|
+
)
|
|
1374
|
+
new_block_ids = cached_reqs.new_block_ids[i]
|
|
1375
|
+
|
|
1376
|
+
request_tracker.update(new_token_ids, new_block_ids)
|
|
1377
|
+
|
|
1378
|
+
req_meta = ReqMeta.from_request_tracker(
|
|
1379
|
+
request_tracker,
|
|
1380
|
+
self._block_size,
|
|
1381
|
+
self._lmcache_chunk_size,
|
|
1382
|
+
load_spec=None,
|
|
1383
|
+
discard_partial_chunks=self._discard_partial_chunks,
|
|
1384
|
+
save_decode_cache=self._save_decode_cache,
|
|
1385
|
+
)
|
|
1386
|
+
if req_meta is not None:
|
|
1387
|
+
meta.add_request(req_meta)
|
|
1388
|
+
|
|
1389
|
+
return meta
|
|
1390
|
+
|
|
1391
|
+
@_lmcache_nvtx_annotate
|
|
1392
|
+
def request_finished(
|
|
1393
|
+
self,
|
|
1394
|
+
request: "Request",
|
|
1395
|
+
block_ids: list[int],
|
|
1396
|
+
) -> tuple[bool, dict[str, Any] | None]:
|
|
1397
|
+
params = (
|
|
1398
|
+
request.kv_transfer_params
|
|
1399
|
+
if hasattr(request, "kv_transfer_params")
|
|
1400
|
+
else None
|
|
1401
|
+
)
|
|
1402
|
+
return_params = None
|
|
1403
|
+
|
|
1404
|
+
# NOTE: Used to stream back the first token
|
|
1405
|
+
# for disagg prefill
|
|
1406
|
+
if params is not None and "ret_first_tok" in params:
|
|
1407
|
+
return_params = {
|
|
1408
|
+
"first_tok": request._output_token_ids[0],
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
return False, return_params
|