vllm-cpu 0.11.0.post2__cp312-cp312-manylinux_2_17_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +220 -0
- vllm/_bc_linter.py +59 -0
- vllm/_custom_ops.py +2044 -0
- vllm/_ipex_ops.py +393 -0
- vllm/_version.py +34 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +45 -0
- vllm/assets/base.py +41 -0
- vllm/assets/image.py +50 -0
- vllm/assets/video.py +145 -0
- vllm/attention/__init__.py +15 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +204 -0
- vllm/attention/backends/utils.py +33 -0
- vllm/attention/layer.py +645 -0
- vllm/attention/layers/__init__.py +0 -0
- vllm/attention/layers/chunked_local_attention.py +93 -0
- vllm/attention/layers/cross_attention.py +162 -0
- vllm/attention/layers/encoder_only_attention.py +86 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +405 -0
- vllm/attention/ops/common.py +345 -0
- vllm/attention/ops/flashmla.py +192 -0
- vllm/attention/ops/merge_attn_states.py +43 -0
- vllm/attention/ops/paged_attn.py +262 -0
- vllm/attention/ops/pallas_kv_cache_update.py +124 -0
- vllm/attention/ops/prefix_prefill.py +928 -0
- vllm/attention/ops/rocm_aiter_mla.py +104 -0
- vllm/attention/ops/rocm_aiter_paged_attn.py +102 -0
- vllm/attention/ops/triton_decode_attention.py +691 -0
- vllm/attention/ops/triton_flash_attention.py +984 -0
- vllm/attention/ops/triton_merge_attn_states.py +97 -0
- vllm/attention/ops/triton_reshape_and_cache_flash.py +175 -0
- vllm/attention/ops/triton_unified_attention.py +894 -0
- vllm/attention/selector.py +245 -0
- vllm/attention/utils/__init__.py +0 -0
- vllm/attention/utils/fa_utils.py +85 -0
- vllm/attention/utils/kv_sharing_utils.py +33 -0
- vllm/beam_search.py +87 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +2723 -0
- vllm/benchmarks/latency.py +170 -0
- vllm/benchmarks/lib/__init__.py +3 -0
- vllm/benchmarks/lib/endpoint_request_func.py +533 -0
- vllm/benchmarks/lib/ready_checker.py +73 -0
- vllm/benchmarks/lib/utils.py +80 -0
- vllm/benchmarks/serve.py +1358 -0
- vllm/benchmarks/throughput.py +696 -0
- vllm/collect_env.py +823 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +189 -0
- vllm/compilation/backends.py +650 -0
- vllm/compilation/base_static_graph.py +56 -0
- vllm/compilation/collective_fusion.py +1188 -0
- vllm/compilation/compiler_interface.py +573 -0
- vllm/compilation/counter.py +47 -0
- vllm/compilation/cuda_graph.py +199 -0
- vllm/compilation/cuda_piecewise_backend.py +117 -0
- vllm/compilation/decorators.py +400 -0
- vllm/compilation/fix_functionalization.py +205 -0
- vllm/compilation/fusion.py +383 -0
- vllm/compilation/fusion_attn.py +295 -0
- vllm/compilation/fx_utils.py +84 -0
- vllm/compilation/inductor_pass.py +136 -0
- vllm/compilation/monitor.py +57 -0
- vllm/compilation/noop_elimination.py +158 -0
- vllm/compilation/pass_manager.py +125 -0
- vllm/compilation/post_cleanup.py +20 -0
- vllm/compilation/sequence_parallelism.py +478 -0
- vllm/compilation/torch25_custom_graph_pass.py +42 -0
- vllm/compilation/vllm_inductor_pass.py +156 -0
- vllm/compilation/wrapper.py +136 -0
- vllm/config/__init__.py +814 -0
- vllm/config/cache.py +220 -0
- vllm/config/compilation.py +673 -0
- vllm/config/device.py +74 -0
- vllm/config/kv_events.py +50 -0
- vllm/config/kv_transfer.py +111 -0
- vllm/config/load.py +113 -0
- vllm/config/lora.py +132 -0
- vllm/config/model.py +1912 -0
- vllm/config/multimodal.py +129 -0
- vllm/config/observability.py +99 -0
- vllm/config/parallel.py +524 -0
- vllm/config/pooler.py +97 -0
- vllm/config/scheduler.py +287 -0
- vllm/config/speculative.py +568 -0
- vllm/config/speech_to_text.py +39 -0
- vllm/config/structured_outputs.py +64 -0
- vllm/config/utils.py +145 -0
- vllm/connections.py +186 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +311 -0
- vllm/distributed/__init__.py +6 -0
- vllm/distributed/communication_op.py +41 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/all2all.py +440 -0
- vllm/distributed/device_communicators/all_reduce_utils.py +317 -0
- vllm/distributed/device_communicators/base_device_communicator.py +295 -0
- vllm/distributed/device_communicators/cpu_communicator.py +201 -0
- vllm/distributed/device_communicators/cuda_communicator.py +323 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +180 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +311 -0
- vllm/distributed/device_communicators/mnnvl_compat.py +28 -0
- vllm/distributed/device_communicators/pynccl.py +340 -0
- vllm/distributed/device_communicators/pynccl_allocator.py +186 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +416 -0
- vllm/distributed/device_communicators/quick_all_reduce.py +278 -0
- vllm/distributed/device_communicators/ray_communicator.py +258 -0
- vllm/distributed/device_communicators/shm_broadcast.py +589 -0
- vllm/distributed/device_communicators/shm_object_storage.py +635 -0
- vllm/distributed/device_communicators/symm_mem.py +136 -0
- vllm/distributed/device_communicators/tpu_communicator.py +102 -0
- vllm/distributed/device_communicators/xpu_communicator.py +94 -0
- vllm/distributed/eplb/__init__.py +8 -0
- vllm/distributed/eplb/eplb_state.py +620 -0
- vllm/distributed/eplb/rebalance_algo.py +239 -0
- vllm/distributed/eplb/rebalance_execute.py +424 -0
- vllm/distributed/kv_events.py +362 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +13 -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 +113 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +261 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +6 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +388 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +168 -0
- vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +100 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +328 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +1473 -0
- vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +485 -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 +488 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +550 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +267 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +418 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +175 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +161 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +237 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +67 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +290 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +280 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +73 -0
- vllm/distributed/parallel_state.py +1532 -0
- vllm/distributed/tpu_distributed_utils.py +178 -0
- vllm/distributed/utils.py +536 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +1778 -0
- vllm/engine/async_llm_engine.py +6 -0
- vllm/engine/llm_engine.py +6 -0
- vllm/engine/metrics.py +577 -0
- vllm/engine/metrics_types.py +84 -0
- vllm/engine/protocol.py +333 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/api_server.py +178 -0
- vllm/entrypoints/chat_utils.py +1705 -0
- vllm/entrypoints/cli/__init__.py +12 -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 +55 -0
- vllm/entrypoints/cli/benchmark/serve.py +21 -0
- vllm/entrypoints/cli/benchmark/throughput.py +21 -0
- vllm/entrypoints/cli/collect_env.py +36 -0
- vllm/entrypoints/cli/main.py +60 -0
- vllm/entrypoints/cli/openai.py +233 -0
- vllm/entrypoints/cli/run_batch.py +67 -0
- vllm/entrypoints/cli/serve.py +232 -0
- vllm/entrypoints/cli/types.py +29 -0
- vllm/entrypoints/constants.py +10 -0
- vllm/entrypoints/context.py +481 -0
- vllm/entrypoints/harmony_utils.py +436 -0
- vllm/entrypoints/launcher.py +164 -0
- vllm/entrypoints/llm.py +1629 -0
- vllm/entrypoints/logger.py +79 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +1953 -0
- vllm/entrypoints/openai/cli_args.py +288 -0
- vllm/entrypoints/openai/logits_processors.py +90 -0
- vllm/entrypoints/openai/protocol.py +2757 -0
- vllm/entrypoints/openai/run_batch.py +491 -0
- vllm/entrypoints/openai/serving_chat.py +1597 -0
- vllm/entrypoints/openai/serving_classification.py +173 -0
- vllm/entrypoints/openai/serving_completion.py +692 -0
- vllm/entrypoints/openai/serving_embedding.py +631 -0
- vllm/entrypoints/openai/serving_engine.py +992 -0
- vllm/entrypoints/openai/serving_models.py +288 -0
- vllm/entrypoints/openai/serving_pooling.py +276 -0
- vllm/entrypoints/openai/serving_responses.py +1709 -0
- vllm/entrypoints/openai/serving_score.py +479 -0
- vllm/entrypoints/openai/serving_tokenization.py +196 -0
- vllm/entrypoints/openai/serving_transcription.py +136 -0
- vllm/entrypoints/openai/speech_to_text.py +388 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +55 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +164 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +367 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +370 -0
- vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +185 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +259 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +237 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +455 -0
- vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +372 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +216 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +308 -0
- vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +377 -0
- vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +316 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +269 -0
- vllm/entrypoints/openai/tool_parsers/longcat_tool_parser.py +39 -0
- vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +816 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +369 -0
- vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +93 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +112 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +308 -0
- vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +707 -0
- vllm/entrypoints/openai/tool_parsers/qwen3xml_tool_parser.py +1137 -0
- vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +679 -0
- vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +296 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +124 -0
- vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +524 -0
- vllm/entrypoints/renderer.py +395 -0
- vllm/entrypoints/score_utils.py +232 -0
- vllm/entrypoints/ssl.py +75 -0
- vllm/entrypoints/tool.py +139 -0
- vllm/entrypoints/tool_server.py +206 -0
- vllm/entrypoints/utils.py +233 -0
- vllm/env_override.py +23 -0
- vllm/envs.py +1590 -0
- vllm/executor/__init__.py +0 -0
- vllm/executor/executor_base.py +381 -0
- vllm/executor/msgspec_utils.py +35 -0
- vllm/executor/ray_distributed_executor.py +699 -0
- vllm/executor/ray_utils.py +410 -0
- vllm/executor/uniproc_executor.py +176 -0
- vllm/forward_context.py +402 -0
- vllm/inputs/__init__.py +30 -0
- vllm/inputs/data.py +356 -0
- vllm/inputs/parse.py +151 -0
- vllm/inputs/preprocess.py +664 -0
- vllm/logger.py +229 -0
- vllm/logging_utils/__init__.py +10 -0
- vllm/logging_utils/dump_input.py +81 -0
- vllm/logging_utils/formatter.py +79 -0
- vllm/logging_utils/log_time.py +32 -0
- vllm/logits_process.py +119 -0
- vllm/logprobs.py +28 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/layers/__init__.py +34 -0
- vllm/lora/layers/base.py +69 -0
- vllm/lora/layers/base_linear.py +185 -0
- vllm/lora/layers/column_parallel_linear.py +609 -0
- vllm/lora/layers/logits_processor.py +247 -0
- vllm/lora/layers/qkv_x_parallel_linear.py +8 -0
- vllm/lora/layers/replicated_linear.py +60 -0
- vllm/lora/layers/row_parallel_linear.py +196 -0
- vllm/lora/layers/utils.py +65 -0
- vllm/lora/layers/vocal_parallel_embedding.py +174 -0
- vllm/lora/lora_weights.py +199 -0
- vllm/lora/models.py +816 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/ipex_ops/__init__.py +7 -0
- vllm/lora/ops/ipex_ops/lora_ops.py +44 -0
- vllm/lora/ops/torch_ops/__init__.py +16 -0
- vllm/lora/ops/torch_ops/lora_ops.py +119 -0
- vllm/lora/ops/triton_ops/__init__.py +12 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +243 -0
- vllm/lora/ops/triton_ops/lora_expand_op.py +289 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +148 -0
- vllm/lora/ops/triton_ops/lora_shrink_op.py +243 -0
- vllm/lora/ops/triton_ops/utils.py +126 -0
- vllm/lora/ops/xla_ops/__init__.py +7 -0
- vllm/lora/ops/xla_ops/lora_ops.py +144 -0
- vllm/lora/peft_helper.py +127 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +458 -0
- vllm/lora/punica_wrapper/punica_cpu.py +349 -0
- vllm/lora/punica_wrapper/punica_gpu.py +272 -0
- vllm/lora/punica_wrapper/punica_selector.py +20 -0
- vllm/lora/punica_wrapper/punica_tpu.py +391 -0
- vllm/lora/punica_wrapper/punica_xpu.py +276 -0
- vllm/lora/punica_wrapper/utils.py +136 -0
- vllm/lora/request.py +97 -0
- vllm/lora/resolver.py +85 -0
- vllm/lora/utils.py +246 -0
- vllm/lora/worker_manager.py +267 -0
- vllm/model_executor/__init__.py +12 -0
- vllm/model_executor/custom_op.py +194 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +575 -0
- vllm/model_executor/layers/attention_layer_base.py +23 -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 +225 -0
- vllm/model_executor/layers/fla/ops/chunk_delta_h.py +290 -0
- vllm/model_executor/layers/fla/ops/chunk_o.py +177 -0
- vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +140 -0
- vllm/model_executor/layers/fla/ops/cumsum.py +226 -0
- vllm/model_executor/layers/fla/ops/fused_recurrent.py +366 -0
- vllm/model_executor/layers/fla/ops/index.py +39 -0
- vllm/model_executor/layers/fla/ops/l2norm.py +143 -0
- vllm/model_executor/layers/fla/ops/layernorm_guard.py +337 -0
- vllm/model_executor/layers/fla/ops/op.py +39 -0
- vllm/model_executor/layers/fla/ops/solve_tril.py +365 -0
- vllm/model_executor/layers/fla/ops/utils.py +180 -0
- vllm/model_executor/layers/fla/ops/wy_fast.py +114 -0
- vllm/model_executor/layers/fused_moe/__init__.py +89 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +322 -0
- vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +141 -0
- vllm/model_executor/layers/fused_moe/config.py +804 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H100,dtype=fp8_w8a8.json +123 -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=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=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=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=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=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=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=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=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_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.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_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=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_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=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 +300 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +957 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +362 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +413 -0
- vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +361 -0
- vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +274 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +268 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +300 -0
- vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +184 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +993 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +239 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +1890 -0
- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +307 -0
- vllm/model_executor/layers/fused_moe/layer.py +2195 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +1038 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +87 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +80 -0
- vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +205 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +341 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +70 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +424 -0
- vllm/model_executor/layers/fused_moe/routing_simulator.py +291 -0
- vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +146 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +143 -0
- vllm/model_executor/layers/fused_moe/trtllm_moe.py +191 -0
- vllm/model_executor/layers/fused_moe/utils.py +274 -0
- vllm/model_executor/layers/layernorm.py +395 -0
- vllm/model_executor/layers/lightning_attn.py +661 -0
- vllm/model_executor/layers/linear.py +1603 -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 +42 -0
- vllm/model_executor/layers/mamba/linear_attn.py +403 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +466 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +764 -0
- vllm/model_executor/layers/mamba/mamba_utils.py +186 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +1092 -0
- vllm/model_executor/layers/mamba/ops/layernorm_gated.py +168 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +414 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +242 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +527 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +724 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +238 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +200 -0
- vllm/model_executor/layers/mamba/short_conv.py +253 -0
- vllm/model_executor/layers/mla.py +173 -0
- vllm/model_executor/layers/pooler.py +719 -0
- vllm/model_executor/layers/quantization/__init__.py +157 -0
- vllm/model_executor/layers/quantization/auto_round.py +388 -0
- vllm/model_executor/layers/quantization/awq.py +228 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +554 -0
- vllm/model_executor/layers/quantization/awq_triton.py +320 -0
- vllm/model_executor/layers/quantization/base_config.py +170 -0
- vllm/model_executor/layers/quantization/bitblas.py +464 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +627 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +797 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2074 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +27 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +366 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +160 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +105 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +185 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +169 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +135 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +121 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +157 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +111 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +201 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +238 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +153 -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 +46 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +206 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +196 -0
- vllm/model_executor/layers/quantization/experts_int8.py +223 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +172 -0
- vllm/model_executor/layers/quantization/fp8.py +1098 -0
- vllm/model_executor/layers/quantization/gguf.py +599 -0
- vllm/model_executor/layers/quantization/gptq.py +340 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +448 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +751 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +297 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +333 -0
- vllm/model_executor/layers/quantization/inc.py +61 -0
- vllm/model_executor/layers/quantization/input_quant_fp8.py +156 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +415 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +91 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +93 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +116 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +302 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +92 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +117 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +92 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +143 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +144 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +139 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +67 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +89 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +161 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +206 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +137 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +41 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +104 -0
- vllm/model_executor/layers/quantization/kv_cache.py +143 -0
- vllm/model_executor/layers/quantization/modelopt.py +1596 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +484 -0
- vllm/model_executor/layers/quantization/mxfp4.py +988 -0
- vllm/model_executor/layers/quantization/petit.py +306 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +129 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +432 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +561 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w4a4_mxfp4.py +239 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +163 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +122 -0
- vllm/model_executor/layers/quantization/quark/utils.py +105 -0
- vllm/model_executor/layers/quantization/rtn.py +466 -0
- vllm/model_executor/layers/quantization/schema.py +86 -0
- vllm/model_executor/layers/quantization/torchao.py +214 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +125 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +52 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +210 -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 +79 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +248 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +949 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +146 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +492 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +40 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +50 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +479 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +396 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +345 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +165 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +464 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +141 -0
- vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +20 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +137 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +59 -0
- vllm/model_executor/layers/quantization/utils/petit_utils.py +122 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +641 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +458 -0
- vllm/model_executor/layers/resampler.py +270 -0
- vllm/model_executor/layers/rotary_embedding/__init__.py +204 -0
- vllm/model_executor/layers/rotary_embedding/base.py +177 -0
- vllm/model_executor/layers/rotary_embedding/common.py +150 -0
- vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +138 -0
- vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +197 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +41 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +67 -0
- vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +80 -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 +81 -0
- vllm/model_executor/layers/rotary_embedding/mrope.py +1321 -0
- vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +42 -0
- vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +129 -0
- vllm/model_executor/layers/rotary_embedding/rocm_aiter_rope_ops.py +86 -0
- vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +68 -0
- vllm/model_executor/layers/shared_fused_moe/__init__.py +6 -0
- vllm/model_executor/layers/shared_fused_moe/shared_fused_moe.py +56 -0
- vllm/model_executor/layers/utils.py +195 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +487 -0
- vllm/model_executor/model_loader/__init__.py +138 -0
- vllm/model_executor/model_loader/base_loader.py +52 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +788 -0
- vllm/model_executor/model_loader/default_loader.py +277 -0
- vllm/model_executor/model_loader/dummy_loader.py +28 -0
- vllm/model_executor/model_loader/gguf_loader.py +155 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +104 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +199 -0
- vllm/model_executor/model_loader/tensorizer.py +738 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +143 -0
- vllm/model_executor/model_loader/tpu.py +114 -0
- vllm/model_executor/model_loader/utils.py +292 -0
- vllm/model_executor/model_loader/weight_utils.py +990 -0
- vllm/model_executor/models/__init__.py +33 -0
- vllm/model_executor/models/adapters.py +542 -0
- vllm/model_executor/models/aimv2.py +246 -0
- vllm/model_executor/models/apertus.py +579 -0
- vllm/model_executor/models/arcee.py +422 -0
- vllm/model_executor/models/arctic.py +558 -0
- vllm/model_executor/models/aria.py +650 -0
- vllm/model_executor/models/aya_vision.py +468 -0
- vllm/model_executor/models/baichuan.py +474 -0
- vllm/model_executor/models/bailing_moe.py +642 -0
- vllm/model_executor/models/bamba.py +514 -0
- vllm/model_executor/models/bert.py +665 -0
- vllm/model_executor/models/bert_with_rope.py +687 -0
- vllm/model_executor/models/blip.py +339 -0
- vllm/model_executor/models/blip2.py +712 -0
- vllm/model_executor/models/bloom.py +374 -0
- vllm/model_executor/models/chameleon.py +1139 -0
- vllm/model_executor/models/chatglm.py +476 -0
- vllm/model_executor/models/clip.py +407 -0
- vllm/model_executor/models/cohere2_vision.py +481 -0
- vllm/model_executor/models/commandr.py +465 -0
- vllm/model_executor/models/config.py +445 -0
- vllm/model_executor/models/dbrx.py +471 -0
- vllm/model_executor/models/deepseek.py +497 -0
- vllm/model_executor/models/deepseek_eagle.py +240 -0
- vllm/model_executor/models/deepseek_mtp.py +289 -0
- vllm/model_executor/models/deepseek_v2.py +1444 -0
- vllm/model_executor/models/deepseek_vl2.py +658 -0
- vllm/model_executor/models/dots1.py +546 -0
- vllm/model_executor/models/dots_ocr.py +873 -0
- vllm/model_executor/models/ernie45.py +43 -0
- vllm/model_executor/models/ernie45_moe.py +607 -0
- vllm/model_executor/models/ernie45_vl.py +1527 -0
- vllm/model_executor/models/ernie45_vl_moe.py +727 -0
- vllm/model_executor/models/ernie_mtp.py +268 -0
- vllm/model_executor/models/exaone.py +550 -0
- vllm/model_executor/models/exaone4.py +533 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +509 -0
- vllm/model_executor/models/falcon_h1.py +674 -0
- vllm/model_executor/models/fuyu.py +399 -0
- vllm/model_executor/models/gemma.py +425 -0
- vllm/model_executor/models/gemma2.py +422 -0
- vllm/model_executor/models/gemma3.py +555 -0
- vllm/model_executor/models/gemma3_mm.py +721 -0
- vllm/model_executor/models/gemma3n.py +1113 -0
- vllm/model_executor/models/gemma3n_mm.py +761 -0
- vllm/model_executor/models/glm.py +23 -0
- vllm/model_executor/models/glm4.py +304 -0
- vllm/model_executor/models/glm4_1v.py +1690 -0
- vllm/model_executor/models/glm4_moe.py +727 -0
- vllm/model_executor/models/glm4_moe_mtp.py +301 -0
- vllm/model_executor/models/glm4v.py +654 -0
- vllm/model_executor/models/gpt2.py +380 -0
- vllm/model_executor/models/gpt_bigcode.py +344 -0
- vllm/model_executor/models/gpt_j.py +339 -0
- vllm/model_executor/models/gpt_neox.py +330 -0
- vllm/model_executor/models/gpt_oss.py +712 -0
- vllm/model_executor/models/granite.py +489 -0
- vllm/model_executor/models/granite_speech.py +794 -0
- vllm/model_executor/models/granitemoe.py +550 -0
- vllm/model_executor/models/granitemoehybrid.py +614 -0
- vllm/model_executor/models/granitemoeshared.py +332 -0
- vllm/model_executor/models/gritlm.py +262 -0
- vllm/model_executor/models/grok1.py +547 -0
- vllm/model_executor/models/h2ovl.py +536 -0
- vllm/model_executor/models/hunyuan_v1.py +1042 -0
- vllm/model_executor/models/hyperclovax_vision.py +1192 -0
- vllm/model_executor/models/idefics2_vision_model.py +417 -0
- vllm/model_executor/models/idefics3.py +756 -0
- vllm/model_executor/models/interfaces.py +959 -0
- vllm/model_executor/models/interfaces_base.py +192 -0
- vllm/model_executor/models/intern_vit.py +441 -0
- vllm/model_executor/models/internlm2.py +450 -0
- vllm/model_executor/models/internlm2_ve.py +148 -0
- vllm/model_executor/models/interns1.py +838 -0
- vllm/model_executor/models/interns1_vit.py +418 -0
- vllm/model_executor/models/internvl.py +1423 -0
- vllm/model_executor/models/jais.py +373 -0
- vllm/model_executor/models/jamba.py +591 -0
- vllm/model_executor/models/jina_vl.py +144 -0
- vllm/model_executor/models/keye.py +1680 -0
- vllm/model_executor/models/keye_vl1_5.py +602 -0
- vllm/model_executor/models/kimi_vl.py +618 -0
- vllm/model_executor/models/lfm2.py +548 -0
- vllm/model_executor/models/llama.py +669 -0
- vllm/model_executor/models/llama4.py +746 -0
- vllm/model_executor/models/llama4_eagle.py +239 -0
- vllm/model_executor/models/llama_eagle.py +179 -0
- vllm/model_executor/models/llama_eagle3.py +296 -0
- vllm/model_executor/models/llava.py +870 -0
- vllm/model_executor/models/llava_next.py +571 -0
- vllm/model_executor/models/llava_next_video.py +476 -0
- vllm/model_executor/models/llava_onevision.py +942 -0
- vllm/model_executor/models/longcat_flash.py +715 -0
- vllm/model_executor/models/longcat_flash_mtp.py +352 -0
- vllm/model_executor/models/mamba.py +275 -0
- vllm/model_executor/models/mamba2.py +291 -0
- vllm/model_executor/models/medusa.py +169 -0
- vllm/model_executor/models/midashenglm.py +792 -0
- vllm/model_executor/models/mimo.py +188 -0
- vllm/model_executor/models/mimo_mtp.py +280 -0
- vllm/model_executor/models/minicpm.py +631 -0
- vllm/model_executor/models/minicpm3.py +230 -0
- vllm/model_executor/models/minicpm_eagle.py +389 -0
- vllm/model_executor/models/minicpmo.py +770 -0
- vllm/model_executor/models/minicpmv.py +1784 -0
- vllm/model_executor/models/minimax_text_01.py +986 -0
- vllm/model_executor/models/minimax_vl_01.py +426 -0
- vllm/model_executor/models/mistral3.py +628 -0
- vllm/model_executor/models/mixtral.py +606 -0
- vllm/model_executor/models/mllama4.py +1076 -0
- vllm/model_executor/models/mlp_speculator.py +206 -0
- vllm/model_executor/models/modernbert.py +374 -0
- vllm/model_executor/models/module_mapping.py +72 -0
- vllm/model_executor/models/molmo.py +1567 -0
- vllm/model_executor/models/moonvit.py +673 -0
- vllm/model_executor/models/motif.py +345 -0
- vllm/model_executor/models/mpt.py +329 -0
- vllm/model_executor/models/nano_nemotron_vl.py +1394 -0
- vllm/model_executor/models/nemotron.py +507 -0
- vllm/model_executor/models/nemotron_h.py +565 -0
- vllm/model_executor/models/nemotron_nas.py +481 -0
- vllm/model_executor/models/nemotron_vl.py +652 -0
- vllm/model_executor/models/nvlm_d.py +203 -0
- vllm/model_executor/models/olmo.py +404 -0
- vllm/model_executor/models/olmo2.py +439 -0
- vllm/model_executor/models/olmoe.py +483 -0
- vllm/model_executor/models/opt.py +412 -0
- vllm/model_executor/models/orion.py +348 -0
- vllm/model_executor/models/ovis.py +559 -0
- vllm/model_executor/models/ovis2_5.py +642 -0
- vllm/model_executor/models/paligemma.py +411 -0
- vllm/model_executor/models/persimmon.py +343 -0
- vllm/model_executor/models/phi.py +356 -0
- vllm/model_executor/models/phi3.py +19 -0
- vllm/model_executor/models/phi3v.py +698 -0
- vllm/model_executor/models/phi4_multimodal.py +1475 -0
- vllm/model_executor/models/phi4mm.py +1279 -0
- vllm/model_executor/models/phi4mm_audio.py +1254 -0
- vllm/model_executor/models/phi4mm_utils.py +1875 -0
- vllm/model_executor/models/phimoe.py +679 -0
- vllm/model_executor/models/pixtral.py +1345 -0
- vllm/model_executor/models/plamo2.py +978 -0
- vllm/model_executor/models/qwen.py +361 -0
- vllm/model_executor/models/qwen2.py +523 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +984 -0
- vllm/model_executor/models/qwen2_5_vl.py +1481 -0
- vllm/model_executor/models/qwen2_audio.py +489 -0
- vllm/model_executor/models/qwen2_moe.py +558 -0
- vllm/model_executor/models/qwen2_rm.py +122 -0
- vllm/model_executor/models/qwen2_vl.py +1670 -0
- vllm/model_executor/models/qwen3.py +341 -0
- vllm/model_executor/models/qwen3_moe.py +692 -0
- vllm/model_executor/models/qwen3_next.py +1266 -0
- vllm/model_executor/models/qwen3_next_mtp.py +281 -0
- vllm/model_executor/models/qwen3_vl.py +1613 -0
- vllm/model_executor/models/qwen3_vl_moe.py +358 -0
- vllm/model_executor/models/qwen_vl.py +795 -0
- vllm/model_executor/models/radio.py +576 -0
- vllm/model_executor/models/registry.py +990 -0
- vllm/model_executor/models/roberta.py +252 -0
- vllm/model_executor/models/rvl.py +103 -0
- vllm/model_executor/models/seed_oss.py +485 -0
- vllm/model_executor/models/siglip.py +540 -0
- vllm/model_executor/models/siglip2navit.py +689 -0
- vllm/model_executor/models/skyworkr1v.py +911 -0
- vllm/model_executor/models/smolvlm.py +44 -0
- vllm/model_executor/models/solar.py +504 -0
- vllm/model_executor/models/stablelm.py +341 -0
- vllm/model_executor/models/starcoder2.py +354 -0
- vllm/model_executor/models/step3_text.py +510 -0
- vllm/model_executor/models/step3_vl.py +1072 -0
- vllm/model_executor/models/swin.py +475 -0
- vllm/model_executor/models/tarsier.py +639 -0
- vllm/model_executor/models/telechat2.py +151 -0
- vllm/model_executor/models/teleflm.py +79 -0
- vllm/model_executor/models/terratorch.py +294 -0
- vllm/model_executor/models/transformers.py +948 -0
- vllm/model_executor/models/ultravox.py +654 -0
- vllm/model_executor/models/utils.py +808 -0
- vllm/model_executor/models/vision.py +404 -0
- vllm/model_executor/models/voxtral.py +786 -0
- vllm/model_executor/models/whisper.py +963 -0
- vllm/model_executor/models/zamba2.py +960 -0
- vllm/model_executor/parameter.py +620 -0
- vllm/model_executor/utils.py +86 -0
- vllm/model_executor/warmup/__init__.py +0 -0
- vllm/model_executor/warmup/deep_gemm_warmup.py +230 -0
- vllm/model_executor/warmup/kernel_warmup.py +83 -0
- vllm/multimodal/__init__.py +33 -0
- vllm/multimodal/audio.py +116 -0
- vllm/multimodal/base.py +27 -0
- vllm/multimodal/cache.py +697 -0
- vllm/multimodal/evs.py +273 -0
- vllm/multimodal/hasher.py +102 -0
- vllm/multimodal/image.py +130 -0
- vllm/multimodal/inputs.py +987 -0
- vllm/multimodal/parse.py +511 -0
- vllm/multimodal/processing.py +2148 -0
- vllm/multimodal/profiling.py +284 -0
- vllm/multimodal/registry.py +345 -0
- vllm/multimodal/utils.py +503 -0
- vllm/multimodal/video.py +319 -0
- vllm/outputs.py +324 -0
- vllm/platforms/__init__.py +263 -0
- vllm/platforms/cpu.py +340 -0
- vllm/platforms/cuda.py +668 -0
- vllm/platforms/interface.py +620 -0
- vllm/platforms/rocm.py +497 -0
- vllm/platforms/tpu.py +233 -0
- vllm/platforms/xpu.py +243 -0
- vllm/plugins/__init__.py +72 -0
- vllm/plugins/io_processors/__init__.py +68 -0
- vllm/plugins/io_processors/interface.py +67 -0
- vllm/plugins/lora_resolvers/README.md +16 -0
- vllm/plugins/lora_resolvers/__init__.py +0 -0
- vllm/plugins/lora_resolvers/filesystem_resolver.py +50 -0
- vllm/pooling_params.py +191 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/layerwise_profile.py +375 -0
- vllm/profiler/utils.py +148 -0
- vllm/py.typed +2 -0
- vllm/ray/__init__.py +0 -0
- vllm/ray/lazy_utils.py +22 -0
- vllm/ray/ray_env.py +72 -0
- vllm/reasoning/__init__.py +29 -0
- vllm/reasoning/abs_reasoning_parsers.py +202 -0
- vllm/reasoning/basic_parsers.py +156 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
- vllm/reasoning/glm4_moe_reasoning_parser.py +151 -0
- vllm/reasoning/gptoss_reasoning_parser.py +87 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/hunyuan_a13b_reasoning_parser.py +245 -0
- vllm/reasoning/mistral_reasoning_parser.py +56 -0
- vllm/reasoning/qwen3_reasoning_parser.py +72 -0
- vllm/reasoning/seedoss_reasoning_parser.py +28 -0
- vllm/reasoning/step3_reasoning_parser.py +109 -0
- vllm/sampling_params.py +593 -0
- vllm/scalar_type.py +349 -0
- vllm/scripts.py +15 -0
- vllm/sequence.py +103 -0
- vllm/tasks.py +11 -0
- vllm/test_utils.py +129 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tracing.py +136 -0
- vllm/transformers_utils/__init__.py +24 -0
- vllm/transformers_utils/chat_templates/__init__.py +5 -0
- vllm/transformers_utils/chat_templates/registry.py +70 -0
- vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
- vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
- vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
- vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
- vllm/transformers_utils/config.py +1102 -0
- vllm/transformers_utils/config_parser_base.py +20 -0
- vllm/transformers_utils/configs/__init__.py +63 -0
- vllm/transformers_utils/configs/arctic.py +207 -0
- vllm/transformers_utils/configs/chatglm.py +72 -0
- vllm/transformers_utils/configs/deepseek_v3.py +101 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +216 -0
- vllm/transformers_utils/configs/dotsocr.py +69 -0
- vllm/transformers_utils/configs/eagle.py +84 -0
- vllm/transformers_utils/configs/falcon.py +90 -0
- vllm/transformers_utils/configs/jais.py +237 -0
- vllm/transformers_utils/configs/kimi_vl.py +37 -0
- vllm/transformers_utils/configs/medusa.py +63 -0
- vllm/transformers_utils/configs/midashenglm.py +101 -0
- vllm/transformers_utils/configs/mistral.py +165 -0
- vllm/transformers_utils/configs/mlp_speculator.py +68 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/nemotron.py +205 -0
- vllm/transformers_utils/configs/nemotron_h.py +259 -0
- vllm/transformers_utils/configs/nemotron_vl.py +56 -0
- vllm/transformers_utils/configs/olmo3.py +80 -0
- vllm/transformers_utils/configs/ovis.py +176 -0
- vllm/transformers_utils/configs/qwen3_next.py +275 -0
- vllm/transformers_utils/configs/radio.py +91 -0
- vllm/transformers_utils/configs/speculators/__init__.py +2 -0
- vllm/transformers_utils/configs/speculators/algos.py +32 -0
- vllm/transformers_utils/configs/speculators/base.py +111 -0
- vllm/transformers_utils/configs/step3_vl.py +123 -0
- vllm/transformers_utils/configs/ultravox.py +116 -0
- vllm/transformers_utils/detokenizer_utils.py +199 -0
- vllm/transformers_utils/dynamic_module.py +60 -0
- vllm/transformers_utils/processor.py +299 -0
- vllm/transformers_utils/processors/__init__.py +16 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +362 -0
- vllm/transformers_utils/processors/ovis.py +420 -0
- vllm/transformers_utils/processors/ovis2_5.py +458 -0
- vllm/transformers_utils/runai_utils.py +104 -0
- vllm/transformers_utils/s3_utils.py +93 -0
- vllm/transformers_utils/tokenizer.py +292 -0
- vllm/transformers_utils/tokenizer_base.py +154 -0
- vllm/transformers_utils/tokenizers/__init__.py +10 -0
- vllm/transformers_utils/tokenizers/mistral.py +521 -0
- vllm/transformers_utils/utils.py +108 -0
- vllm/triton_utils/__init__.py +16 -0
- vllm/triton_utils/importing.py +96 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +259 -0
- vllm/utils/__init__.py +3566 -0
- vllm/utils/deep_gemm.py +319 -0
- vllm/utils/flashinfer.py +443 -0
- vllm/utils/jsontree.py +178 -0
- vllm/utils/tensor_schema.py +235 -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 +919 -0
- vllm/v1/attention/backends/flash_attn.py +795 -0
- vllm/v1/attention/backends/flashinfer.py +1181 -0
- vllm/v1/attention/backends/flex_attention.py +861 -0
- vllm/v1/attention/backends/gdn_attn.py +332 -0
- vllm/v1/attention/backends/linear_attn.py +67 -0
- vllm/v1/attention/backends/mamba1_attn.py +81 -0
- vllm/v1/attention/backends/mamba2_attn.py +232 -0
- vllm/v1/attention/backends/mamba_attn.py +52 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/common.py +1783 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +248 -0
- vllm/v1/attention/backends/mla/flashattn_mla.py +271 -0
- vllm/v1/attention/backends/mla/flashinfer_mla.py +114 -0
- vllm/v1/attention/backends/mla/flashmla.py +203 -0
- vllm/v1/attention/backends/mla/flashmla_sparse.py +544 -0
- vllm/v1/attention/backends/mla/indexer.py +342 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +255 -0
- vllm/v1/attention/backends/mla/triton_mla.py +177 -0
- vllm/v1/attention/backends/pallas.py +409 -0
- vllm/v1/attention/backends/rocm_aiter_fa.py +549 -0
- vllm/v1/attention/backends/rocm_attn.py +426 -0
- vllm/v1/attention/backends/short_conv_attn.py +94 -0
- vllm/v1/attention/backends/tree_attn.py +451 -0
- vllm/v1/attention/backends/triton_attn.py +361 -0
- vllm/v1/attention/backends/utils.py +990 -0
- vllm/v1/attention/backends/xformers.py +438 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +416 -0
- vllm/v1/core/encoder_cache_manager.py +333 -0
- vllm/v1/core/kv_cache_coordinator.py +440 -0
- vllm/v1/core/kv_cache_manager.py +399 -0
- vllm/v1/core/kv_cache_utils.py +1291 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/async_scheduler.py +47 -0
- vllm/v1/core/sched/interface.py +158 -0
- vllm/v1/core/sched/output.py +166 -0
- vllm/v1/core/sched/request_queue.py +224 -0
- vllm/v1/core/sched/scheduler.py +1296 -0
- vllm/v1/core/sched/utils.py +69 -0
- vllm/v1/core/single_type_kv_cache_manager.py +671 -0
- vllm/v1/cudagraph_dispatcher.py +125 -0
- vllm/v1/engine/__init__.py +203 -0
- vllm/v1/engine/async_llm.py +742 -0
- vllm/v1/engine/coordinator.py +357 -0
- vllm/v1/engine/core.py +1235 -0
- vllm/v1/engine/core_client.py +1334 -0
- vllm/v1/engine/detokenizer.py +349 -0
- vllm/v1/engine/exceptions.py +17 -0
- vllm/v1/engine/llm_engine.py +370 -0
- vllm/v1/engine/logprobs.py +201 -0
- vllm/v1/engine/output_processor.py +576 -0
- vllm/v1/engine/parallel_sampling.py +133 -0
- vllm/v1/engine/processor.py +545 -0
- vllm/v1/engine/utils.py +860 -0
- vllm/v1/executor/__init__.py +0 -0
- vllm/v1/executor/abstract.py +137 -0
- vllm/v1/executor/multiproc_executor.py +726 -0
- vllm/v1/executor/ray_distributed_executor.py +108 -0
- vllm/v1/executor/utils.py +23 -0
- vllm/v1/kv_cache_interface.py +375 -0
- vllm/v1/kv_offload/__init__.py +0 -0
- vllm/v1/kv_offload/abstract.py +165 -0
- vllm/v1/kv_offload/backend.py +96 -0
- vllm/v1/kv_offload/backends/__init__.py +0 -0
- vllm/v1/kv_offload/backends/cpu.py +61 -0
- vllm/v1/kv_offload/cpu.py +75 -0
- vllm/v1/kv_offload/factory.py +56 -0
- vllm/v1/kv_offload/lru_manager.py +132 -0
- vllm/v1/kv_offload/mediums.py +39 -0
- vllm/v1/kv_offload/spec.py +61 -0
- vllm/v1/kv_offload/worker/__init__.py +0 -0
- vllm/v1/kv_offload/worker/cpu_gpu.py +171 -0
- vllm/v1/kv_offload/worker/worker.py +142 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +741 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +152 -0
- vllm/v1/metrics/reader.py +246 -0
- vllm/v1/metrics/stats.py +257 -0
- vllm/v1/outputs.py +161 -0
- vllm/v1/pool/__init__.py +0 -0
- vllm/v1/pool/metadata.py +77 -0
- vllm/v1/request.py +241 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/logits_processor/__init__.py +294 -0
- vllm/v1/sample/logits_processor/builtin.py +275 -0
- vllm/v1/sample/logits_processor/interface.py +97 -0
- vllm/v1/sample/logits_processor/state.py +161 -0
- vllm/v1/sample/metadata.py +43 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +39 -0
- vllm/v1/sample/ops/logprobs.py +26 -0
- vllm/v1/sample/ops/penalties.py +43 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +292 -0
- vllm/v1/sample/rejection_sampler.py +623 -0
- vllm/v1/sample/sampler.py +285 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +124 -0
- vllm/v1/sample/tpu/sampler.py +213 -0
- vllm/v1/serial_utils.py +423 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +1011 -0
- vllm/v1/spec_decode/medusa.py +66 -0
- vllm/v1/spec_decode/metadata.py +62 -0
- vllm/v1/spec_decode/metrics.py +211 -0
- vllm/v1/spec_decode/ngram_proposer.py +276 -0
- vllm/v1/spec_decode/utils.py +14 -0
- vllm/v1/structured_output/__init__.py +295 -0
- vllm/v1/structured_output/backend_guidance.py +245 -0
- vllm/v1/structured_output/backend_lm_format_enforcer.py +167 -0
- vllm/v1/structured_output/backend_outlines.py +320 -0
- vllm/v1/structured_output/backend_types.py +134 -0
- vllm/v1/structured_output/backend_xgrammar.py +327 -0
- vllm/v1/structured_output/request.py +86 -0
- vllm/v1/structured_output/utils.py +454 -0
- vllm/v1/utils.py +396 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +210 -0
- vllm/v1/worker/cpu_model_runner.py +175 -0
- vllm/v1/worker/cpu_worker.py +156 -0
- vllm/v1/worker/gpu_input_batch.py +863 -0
- vllm/v1/worker/gpu_model_runner.py +4160 -0
- vllm/v1/worker/gpu_ubatch_wrapper.py +399 -0
- vllm/v1/worker/gpu_worker.py +710 -0
- vllm/v1/worker/kv_connector_model_runner_mixin.py +132 -0
- vllm/v1/worker/lora_model_runner_mixin.py +183 -0
- vllm/v1/worker/tpu_input_batch.py +587 -0
- vllm/v1/worker/tpu_model_runner.py +1946 -0
- vllm/v1/worker/tpu_worker.py +346 -0
- vllm/v1/worker/ubatch_splitting.py +192 -0
- vllm/v1/worker/ubatch_utils.py +27 -0
- vllm/v1/worker/ubatching.py +224 -0
- vllm/v1/worker/utils.py +344 -0
- vllm/v1/worker/worker_base.py +65 -0
- vllm/v1/worker/xpu_model_runner.py +57 -0
- vllm/v1/worker/xpu_worker.py +179 -0
- vllm/version.py +41 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm/worker/__init__.py +0 -0
- vllm/worker/worker_base.py +279 -0
- vllm_cpu-0.11.0.post2.dist-info/METADATA +348 -0
- vllm_cpu-0.11.0.post2.dist-info/RECORD +1398 -0
- vllm_cpu-0.11.0.post2.dist-info/WHEEL +5 -0
- vllm_cpu-0.11.0.post2.dist-info/entry_points.txt +5 -0
- vllm_cpu-0.11.0.post2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1444 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
|
|
4
|
+
# Adapted from
|
|
5
|
+
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
|
|
6
|
+
# Copyright 2023 The vLLM team.
|
|
7
|
+
# Copyright 2023 DeepSeek-AI and the HuggingFace Inc. team. All rights reserved.
|
|
8
|
+
#
|
|
9
|
+
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
|
10
|
+
# and OPT implementations in this library. It has been modified from its
|
|
11
|
+
# original forms to accommodate minor architectural differences compared
|
|
12
|
+
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
|
|
13
|
+
#
|
|
14
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
# you may not use this file except in compliance with the License.
|
|
16
|
+
# You may obtain a copy of the License at
|
|
17
|
+
#
|
|
18
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
#
|
|
20
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
21
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
+
# See the License for the specific language governing permissions and
|
|
24
|
+
# limitations under the License.
|
|
25
|
+
"""Inference-only DeepseekV2/DeepseekV3 model."""
|
|
26
|
+
import typing
|
|
27
|
+
from collections.abc import Callable, Iterable
|
|
28
|
+
from itertools import islice
|
|
29
|
+
from typing import Any, Optional, Union
|
|
30
|
+
|
|
31
|
+
import torch
|
|
32
|
+
from torch import nn
|
|
33
|
+
from transformers import DeepseekV2Config, DeepseekV3Config
|
|
34
|
+
|
|
35
|
+
from vllm.attention import Attention
|
|
36
|
+
from vllm.attention.backends.abstract import AttentionBackend
|
|
37
|
+
from vllm.attention.ops.common import pack_seq_triton, unpack_seq_triton
|
|
38
|
+
from vllm.compilation.decorators import support_torch_compile
|
|
39
|
+
from vllm.config import (CacheConfig, ParallelConfig, VllmConfig,
|
|
40
|
+
get_current_vllm_config)
|
|
41
|
+
from vllm.distributed import (get_ep_group, get_pp_group,
|
|
42
|
+
get_tensor_model_parallel_rank,
|
|
43
|
+
get_tensor_model_parallel_world_size,
|
|
44
|
+
tensor_model_parallel_all_gather)
|
|
45
|
+
from vllm.forward_context import get_forward_context
|
|
46
|
+
from vllm.logger import init_logger
|
|
47
|
+
from vllm.model_executor.layers.activation import SiluAndMul
|
|
48
|
+
from vllm.model_executor.layers.attention_layer_base import AttentionLayerBase
|
|
49
|
+
from vllm.model_executor.layers.fused_moe import FusedMoE
|
|
50
|
+
from vllm.model_executor.layers.layernorm import LayerNorm, RMSNorm
|
|
51
|
+
from vllm.model_executor.layers.linear import (ColumnParallelLinear,
|
|
52
|
+
MergedColumnParallelLinear,
|
|
53
|
+
ReplicatedLinear,
|
|
54
|
+
RowParallelLinear)
|
|
55
|
+
from vllm.model_executor.layers.logits_processor import LogitsProcessor
|
|
56
|
+
from vllm.model_executor.layers.mla import MLAModules, MultiHeadLatentAttention
|
|
57
|
+
from vllm.model_executor.layers.quantization import QuantizationConfig
|
|
58
|
+
from vllm.model_executor.layers.quantization.utils.fp8_utils import (
|
|
59
|
+
per_token_group_quant_fp8)
|
|
60
|
+
from vllm.model_executor.layers.rotary_embedding import get_rope
|
|
61
|
+
from vllm.model_executor.layers.shared_fused_moe import SharedFusedMoE
|
|
62
|
+
from vllm.model_executor.layers.vocab_parallel_embedding import (
|
|
63
|
+
ParallelLMHead, VocabParallelEmbedding)
|
|
64
|
+
from vllm.model_executor.model_loader.weight_utils import (
|
|
65
|
+
default_weight_loader, maybe_remap_kv_scale_name)
|
|
66
|
+
from vllm.model_executor.models.utils import sequence_parallel_chunk
|
|
67
|
+
from vllm.platforms import current_platform
|
|
68
|
+
from vllm.sequence import IntermediateTensors
|
|
69
|
+
from vllm.utils import cdiv, direct_register_custom_op
|
|
70
|
+
from vllm.utils.deep_gemm import fp8_mqa_logits, fp8_paged_mqa_logits
|
|
71
|
+
from vllm.v1.attention.backends.mla.indexer import (DeepseekV32IndexerBackend,
|
|
72
|
+
DeepseekV32IndexerMetadata)
|
|
73
|
+
from vllm.v1.kv_cache_interface import KVCacheSpec, MLAAttentionSpec
|
|
74
|
+
|
|
75
|
+
from .interfaces import MixtureOfExperts, SupportsLoRA, SupportsPP
|
|
76
|
+
from .utils import (PPMissingLayer, is_pp_missing_parameter,
|
|
77
|
+
make_empty_intermediate_tensors_factory, make_layers,
|
|
78
|
+
maybe_prefix)
|
|
79
|
+
|
|
80
|
+
if current_platform.is_cuda_alike():
|
|
81
|
+
from vllm import _custom_ops as ops
|
|
82
|
+
elif current_platform.is_xpu():
|
|
83
|
+
from vllm._ipex_ops import ipex_ops as ops
|
|
84
|
+
|
|
85
|
+
logger = init_logger(__name__)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class DeepseekV2MLP(nn.Module):
|
|
89
|
+
|
|
90
|
+
def __init__(
|
|
91
|
+
self,
|
|
92
|
+
hidden_size: int,
|
|
93
|
+
intermediate_size: int,
|
|
94
|
+
hidden_act: str,
|
|
95
|
+
quant_config: Optional[QuantizationConfig] = None,
|
|
96
|
+
reduce_results: bool = True,
|
|
97
|
+
is_sequence_parallel=False,
|
|
98
|
+
prefix: str = "",
|
|
99
|
+
) -> None:
|
|
100
|
+
super().__init__()
|
|
101
|
+
|
|
102
|
+
# If is_sequence_parallel, the input and output tensors are sharded
|
|
103
|
+
# across the ranks within the tp_group. In this case the weights are
|
|
104
|
+
# replicated and no collective ops are needed.
|
|
105
|
+
# Otherwise we use standard TP with an allreduce at the end.
|
|
106
|
+
self.gate_up_proj = MergedColumnParallelLinear(
|
|
107
|
+
hidden_size, [intermediate_size] * 2,
|
|
108
|
+
bias=False,
|
|
109
|
+
quant_config=quant_config,
|
|
110
|
+
disable_tp=is_sequence_parallel,
|
|
111
|
+
prefix=f"{prefix}.gate_up_proj")
|
|
112
|
+
self.down_proj = RowParallelLinear(intermediate_size,
|
|
113
|
+
hidden_size,
|
|
114
|
+
bias=False,
|
|
115
|
+
quant_config=quant_config,
|
|
116
|
+
reduce_results=reduce_results,
|
|
117
|
+
disable_tp=is_sequence_parallel,
|
|
118
|
+
prefix=f"{prefix}.down_proj")
|
|
119
|
+
if hidden_act != "silu":
|
|
120
|
+
raise ValueError(f"Unsupported activation: {hidden_act}. "
|
|
121
|
+
"Only silu is supported for now.")
|
|
122
|
+
self.act_fn = SiluAndMul()
|
|
123
|
+
|
|
124
|
+
def forward(self, x):
|
|
125
|
+
gate_up, _ = self.gate_up_proj(x)
|
|
126
|
+
x = self.act_fn(gate_up)
|
|
127
|
+
x, _ = self.down_proj(x)
|
|
128
|
+
return x
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class DeepseekV2MoE(nn.Module):
|
|
132
|
+
|
|
133
|
+
def __init__(
|
|
134
|
+
self,
|
|
135
|
+
config: Union[DeepseekV2Config, DeepseekV3Config],
|
|
136
|
+
parallel_config: ParallelConfig,
|
|
137
|
+
quant_config: Optional[QuantizationConfig] = None,
|
|
138
|
+
prefix: str = "",
|
|
139
|
+
):
|
|
140
|
+
super().__init__()
|
|
141
|
+
self.tp_size = get_tensor_model_parallel_world_size()
|
|
142
|
+
self.tp_rank = get_tensor_model_parallel_rank()
|
|
143
|
+
|
|
144
|
+
self.routed_scaling_factor = config.routed_scaling_factor
|
|
145
|
+
|
|
146
|
+
self.ep_group = get_ep_group().device_group
|
|
147
|
+
self.ep_rank = self.ep_group.rank()
|
|
148
|
+
self.ep_size = self.ep_group.size()
|
|
149
|
+
self.n_routed_experts: int = config.n_routed_experts
|
|
150
|
+
self.n_shared_experts: int = config.n_shared_experts
|
|
151
|
+
|
|
152
|
+
self.is_sequence_parallel = parallel_config.use_sequence_parallel_moe
|
|
153
|
+
|
|
154
|
+
if config.hidden_act != "silu":
|
|
155
|
+
raise ValueError(f"Unsupported activation: {config.hidden_act}. "
|
|
156
|
+
"Only silu is supported for now.")
|
|
157
|
+
|
|
158
|
+
self.gate = ReplicatedLinear(config.hidden_size,
|
|
159
|
+
config.n_routed_experts,
|
|
160
|
+
bias=False,
|
|
161
|
+
quant_config=None,
|
|
162
|
+
prefix=f"{prefix}.gate")
|
|
163
|
+
if config.topk_method == "noaux_tc":
|
|
164
|
+
self.gate.e_score_correction_bias = nn.Parameter(
|
|
165
|
+
torch.empty(config.n_routed_experts, dtype=torch.float32))
|
|
166
|
+
else:
|
|
167
|
+
self.gate.e_score_correction_bias = None
|
|
168
|
+
|
|
169
|
+
# Load balancing settings.
|
|
170
|
+
eplb_config = parallel_config.eplb_config
|
|
171
|
+
self.enable_eplb = parallel_config.enable_eplb
|
|
172
|
+
|
|
173
|
+
self.n_redundant_experts = eplb_config.num_redundant_experts
|
|
174
|
+
self.n_logical_experts = self.n_routed_experts
|
|
175
|
+
self.n_physical_experts = (self.n_logical_experts +
|
|
176
|
+
self.n_redundant_experts)
|
|
177
|
+
self.n_local_physical_experts = self.n_physical_experts // self.ep_size
|
|
178
|
+
|
|
179
|
+
self.physical_expert_start = (self.ep_rank *
|
|
180
|
+
self.n_local_physical_experts)
|
|
181
|
+
self.physical_expert_end = (self.physical_expert_start +
|
|
182
|
+
self.n_local_physical_experts)
|
|
183
|
+
|
|
184
|
+
if config.n_shared_experts is None:
|
|
185
|
+
self.experts = FusedMoE(
|
|
186
|
+
num_experts=config.n_routed_experts,
|
|
187
|
+
top_k=config.num_experts_per_tok,
|
|
188
|
+
hidden_size=config.hidden_size,
|
|
189
|
+
intermediate_size=config.moe_intermediate_size,
|
|
190
|
+
reduce_results=False,
|
|
191
|
+
renormalize=config.norm_topk_prob,
|
|
192
|
+
quant_config=quant_config,
|
|
193
|
+
use_grouped_topk=True,
|
|
194
|
+
num_expert_group=config.n_group,
|
|
195
|
+
topk_group=config.topk_group,
|
|
196
|
+
prefix=f"{prefix}.experts",
|
|
197
|
+
scoring_func=config.scoring_func,
|
|
198
|
+
# we do scaling outside, set factor to 1.0 to avoid double mul
|
|
199
|
+
routed_scaling_factor=1.0,
|
|
200
|
+
e_score_correction_bias=self.gate.e_score_correction_bias,
|
|
201
|
+
enable_eplb=self.enable_eplb,
|
|
202
|
+
num_redundant_experts=self.n_redundant_experts,
|
|
203
|
+
is_sequence_parallel=self.is_sequence_parallel,
|
|
204
|
+
)
|
|
205
|
+
self.shared_experts = None
|
|
206
|
+
else:
|
|
207
|
+
intermediate_size = (config.moe_intermediate_size *
|
|
208
|
+
config.n_shared_experts)
|
|
209
|
+
|
|
210
|
+
self.shared_experts = DeepseekV2MLP(
|
|
211
|
+
hidden_size=config.hidden_size,
|
|
212
|
+
intermediate_size=intermediate_size,
|
|
213
|
+
hidden_act=config.hidden_act,
|
|
214
|
+
quant_config=quant_config,
|
|
215
|
+
is_sequence_parallel=self.is_sequence_parallel,
|
|
216
|
+
reduce_results=False,
|
|
217
|
+
prefix=f"{prefix}.shared_experts",
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
self.experts = SharedFusedMoE(
|
|
221
|
+
shared_experts=self.shared_experts,
|
|
222
|
+
num_experts=config.n_routed_experts,
|
|
223
|
+
top_k=config.num_experts_per_tok,
|
|
224
|
+
hidden_size=config.hidden_size,
|
|
225
|
+
intermediate_size=config.moe_intermediate_size,
|
|
226
|
+
reduce_results=False,
|
|
227
|
+
renormalize=config.norm_topk_prob,
|
|
228
|
+
quant_config=quant_config,
|
|
229
|
+
use_grouped_topk=True,
|
|
230
|
+
num_expert_group=config.n_group,
|
|
231
|
+
topk_group=config.topk_group,
|
|
232
|
+
prefix=f"{prefix}.experts",
|
|
233
|
+
scoring_func=config.scoring_func,
|
|
234
|
+
# we do scaling outside, set factor to 1.0 to avoid double mul
|
|
235
|
+
routed_scaling_factor=1.0,
|
|
236
|
+
e_score_correction_bias=self.gate.e_score_correction_bias,
|
|
237
|
+
enable_eplb=self.enable_eplb,
|
|
238
|
+
num_redundant_experts=self.n_redundant_experts,
|
|
239
|
+
is_sequence_parallel=self.is_sequence_parallel,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
|
243
|
+
num_tokens, hidden_dim = hidden_states.shape
|
|
244
|
+
hidden_states = hidden_states.view(-1, hidden_dim)
|
|
245
|
+
|
|
246
|
+
# Chunk the hidden states so they aren't replicated across TP ranks.
|
|
247
|
+
# This avoids duplicate computation in self.experts.
|
|
248
|
+
# TODO: We can replace the all_reduce at the end of attn with a
|
|
249
|
+
# reduce_scatter instead of chunking here.
|
|
250
|
+
if self.is_sequence_parallel:
|
|
251
|
+
hidden_states = sequence_parallel_chunk(hidden_states)
|
|
252
|
+
|
|
253
|
+
# router_logits: (num_tokens, n_experts)
|
|
254
|
+
router_logits, _ = self.gate(hidden_states)
|
|
255
|
+
|
|
256
|
+
fused_moe_out = self.experts(hidden_states=hidden_states,
|
|
257
|
+
router_logits=router_logits)
|
|
258
|
+
|
|
259
|
+
if self.shared_experts is not None:
|
|
260
|
+
shared_output, final_hidden_states = fused_moe_out
|
|
261
|
+
else:
|
|
262
|
+
shared_output = None
|
|
263
|
+
final_hidden_states = fused_moe_out
|
|
264
|
+
|
|
265
|
+
# Fix FP16 overflow
|
|
266
|
+
# See DeepseekV2DecoderLayer for more details.
|
|
267
|
+
if hidden_states.dtype != torch.float16:
|
|
268
|
+
final_hidden_states *= self.routed_scaling_factor
|
|
269
|
+
elif self.shared_experts is not None:
|
|
270
|
+
assert shared_output is not None
|
|
271
|
+
shared_output *= (1. / self.routed_scaling_factor)
|
|
272
|
+
|
|
273
|
+
if self.shared_experts is not None:
|
|
274
|
+
assert shared_output is not None
|
|
275
|
+
final_hidden_states += shared_output
|
|
276
|
+
|
|
277
|
+
if self.is_sequence_parallel:
|
|
278
|
+
final_hidden_states = tensor_model_parallel_all_gather(
|
|
279
|
+
final_hidden_states, 0)
|
|
280
|
+
final_hidden_states = final_hidden_states[:num_tokens]
|
|
281
|
+
elif self.tp_size > 1:
|
|
282
|
+
final_hidden_states = (
|
|
283
|
+
self.experts.maybe_all_reduce_tensor_model_parallel(
|
|
284
|
+
final_hidden_states))
|
|
285
|
+
|
|
286
|
+
return final_hidden_states.view(num_tokens, hidden_dim)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def yarn_get_mscale(scale: float = 1, mscale: float = 1) -> float:
|
|
290
|
+
import math
|
|
291
|
+
if scale <= 1:
|
|
292
|
+
return 1.0
|
|
293
|
+
return 0.1 * mscale * math.log(scale) + 1.0
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
class DeepseekV2Attention(nn.Module):
|
|
297
|
+
|
|
298
|
+
def __init__(
|
|
299
|
+
self,
|
|
300
|
+
vllm_config: VllmConfig,
|
|
301
|
+
config: Union[DeepseekV2Config, DeepseekV3Config],
|
|
302
|
+
hidden_size: int,
|
|
303
|
+
num_heads: int,
|
|
304
|
+
qk_nope_head_dim: int,
|
|
305
|
+
qk_rope_head_dim: int,
|
|
306
|
+
v_head_dim: int,
|
|
307
|
+
q_lora_rank: int,
|
|
308
|
+
kv_lora_rank: int,
|
|
309
|
+
rope_theta: float = 10000,
|
|
310
|
+
rope_scaling: Optional[dict[str, Any]] = None,
|
|
311
|
+
max_position_embeddings: int = 8192,
|
|
312
|
+
cache_config: Optional[CacheConfig] = None,
|
|
313
|
+
quant_config: Optional[QuantizationConfig] = None,
|
|
314
|
+
topk_indices_buffer: Optional[torch.Tensor] = None,
|
|
315
|
+
prefix: str = "",
|
|
316
|
+
) -> None:
|
|
317
|
+
super().__init__()
|
|
318
|
+
self.hidden_size = hidden_size
|
|
319
|
+
self.qk_nope_head_dim = qk_nope_head_dim
|
|
320
|
+
self.qk_rope_head_dim = qk_rope_head_dim
|
|
321
|
+
self.qk_head_dim = qk_nope_head_dim + qk_rope_head_dim
|
|
322
|
+
self.v_head_dim = v_head_dim
|
|
323
|
+
self.q_lora_rank = q_lora_rank
|
|
324
|
+
self.kv_lora_rank = kv_lora_rank
|
|
325
|
+
self.num_heads = num_heads
|
|
326
|
+
tp_size = get_tensor_model_parallel_world_size()
|
|
327
|
+
assert num_heads % tp_size == 0
|
|
328
|
+
self.num_local_heads = num_heads // tp_size
|
|
329
|
+
self.scaling = self.qk_head_dim**-0.5
|
|
330
|
+
self.rope_theta = rope_theta
|
|
331
|
+
self.max_position_embeddings = max_position_embeddings
|
|
332
|
+
assert topk_indices_buffer is None, "topk_indices_buffer is not \
|
|
333
|
+
supported for DeepseekV2Attention"
|
|
334
|
+
|
|
335
|
+
if self.q_lora_rank is not None:
|
|
336
|
+
self.q_a_proj = ReplicatedLinear(self.hidden_size,
|
|
337
|
+
self.q_lora_rank,
|
|
338
|
+
bias=False,
|
|
339
|
+
quant_config=quant_config,
|
|
340
|
+
prefix=f"{prefix}.q_a_proj")
|
|
341
|
+
self.q_a_layernorm = RMSNorm(self.q_lora_rank,
|
|
342
|
+
eps=config.rms_norm_eps)
|
|
343
|
+
self.q_b_proj = ColumnParallelLinear(q_lora_rank,
|
|
344
|
+
self.num_heads *
|
|
345
|
+
self.qk_head_dim,
|
|
346
|
+
bias=False,
|
|
347
|
+
quant_config=quant_config,
|
|
348
|
+
prefix=f"{prefix}.q_b_proj")
|
|
349
|
+
else:
|
|
350
|
+
self.q_proj = ColumnParallelLinear(self.hidden_size,
|
|
351
|
+
self.num_heads *
|
|
352
|
+
self.qk_head_dim,
|
|
353
|
+
bias=False,
|
|
354
|
+
quant_config=quant_config,
|
|
355
|
+
prefix=f"{prefix}.q_proj")
|
|
356
|
+
|
|
357
|
+
self.kv_a_proj_with_mqa = ReplicatedLinear(
|
|
358
|
+
self.hidden_size,
|
|
359
|
+
self.kv_lora_rank + self.qk_rope_head_dim,
|
|
360
|
+
bias=False,
|
|
361
|
+
quant_config=quant_config,
|
|
362
|
+
prefix=f"{prefix}.kv_a_proj_with_mqa")
|
|
363
|
+
self.kv_a_layernorm = RMSNorm(self.kv_lora_rank,
|
|
364
|
+
eps=config.rms_norm_eps)
|
|
365
|
+
self.kv_b_proj = ColumnParallelLinear(
|
|
366
|
+
self.kv_lora_rank,
|
|
367
|
+
self.num_heads * (self.qk_nope_head_dim + self.v_head_dim),
|
|
368
|
+
bias=False,
|
|
369
|
+
quant_config=quant_config,
|
|
370
|
+
prefix=f"{prefix}.kv_b_proj")
|
|
371
|
+
# O projection.
|
|
372
|
+
self.o_proj = RowParallelLinear(self.num_heads * self.v_head_dim,
|
|
373
|
+
self.hidden_size,
|
|
374
|
+
bias=False,
|
|
375
|
+
quant_config=quant_config,
|
|
376
|
+
prefix=f"{prefix}.o_proj")
|
|
377
|
+
if rope_scaling:
|
|
378
|
+
rope_scaling["rope_type"] = 'deepseek_yarn'
|
|
379
|
+
|
|
380
|
+
self.rotary_emb = get_rope(qk_rope_head_dim,
|
|
381
|
+
rotary_dim=qk_rope_head_dim,
|
|
382
|
+
max_position=max_position_embeddings,
|
|
383
|
+
base=rope_theta,
|
|
384
|
+
rope_scaling=rope_scaling,
|
|
385
|
+
is_neox_style=False)
|
|
386
|
+
|
|
387
|
+
if rope_scaling:
|
|
388
|
+
mscale_all_dim = rope_scaling.get("mscale_all_dim", False)
|
|
389
|
+
scaling_factor = rope_scaling["factor"]
|
|
390
|
+
mscale = yarn_get_mscale(scaling_factor, float(mscale_all_dim))
|
|
391
|
+
self.scaling = self.scaling * mscale * mscale
|
|
392
|
+
|
|
393
|
+
self.attn = Attention(self.num_local_heads,
|
|
394
|
+
self.qk_head_dim,
|
|
395
|
+
self.scaling,
|
|
396
|
+
num_kv_heads=self.num_local_heads,
|
|
397
|
+
cache_config=cache_config,
|
|
398
|
+
quant_config=quant_config,
|
|
399
|
+
prefix=f"{prefix}.attn")
|
|
400
|
+
|
|
401
|
+
def forward(
|
|
402
|
+
self,
|
|
403
|
+
positions: torch.Tensor,
|
|
404
|
+
hidden_states: torch.Tensor,
|
|
405
|
+
) -> torch.Tensor:
|
|
406
|
+
if self.q_lora_rank is not None:
|
|
407
|
+
q = self.q_a_proj(hidden_states)[0]
|
|
408
|
+
q = self.q_a_layernorm(q)
|
|
409
|
+
q = self.q_b_proj(q)[0].view(-1, self.num_local_heads,
|
|
410
|
+
self.qk_head_dim)
|
|
411
|
+
else:
|
|
412
|
+
q = self.q_proj(hidden_states)[0].view(-1, self.num_local_heads,
|
|
413
|
+
self.qk_head_dim)
|
|
414
|
+
q_nope, q_pe = q.split([self.qk_nope_head_dim, self.qk_rope_head_dim],
|
|
415
|
+
dim=-1)
|
|
416
|
+
latent_cache = self.kv_a_proj_with_mqa(hidden_states)[0]
|
|
417
|
+
kv_a, _ = latent_cache.split(
|
|
418
|
+
[self.kv_lora_rank, self.qk_rope_head_dim], dim=-1)
|
|
419
|
+
latent_cache = latent_cache.unsqueeze(1)
|
|
420
|
+
kv_a = self.kv_a_layernorm(kv_a)
|
|
421
|
+
kv = self.kv_b_proj(kv_a)[0]
|
|
422
|
+
kv = kv.view(-1, self.num_local_heads,
|
|
423
|
+
self.qk_nope_head_dim + self.v_head_dim)
|
|
424
|
+
k_nope, v = kv.split([self.qk_nope_head_dim, self.v_head_dim], dim=-1)
|
|
425
|
+
k_pe = latent_cache[:, :, self.kv_lora_rank:]
|
|
426
|
+
|
|
427
|
+
q_pe, k_pe = self.rotary_emb(positions, q_pe, k_pe)
|
|
428
|
+
|
|
429
|
+
q[..., self.qk_nope_head_dim:] = q_pe
|
|
430
|
+
k = torch.empty_like(q)
|
|
431
|
+
k[..., :self.qk_nope_head_dim] = k_nope
|
|
432
|
+
k[..., self.qk_nope_head_dim:] = k_pe
|
|
433
|
+
# padding value to qk_head_dim for alignment
|
|
434
|
+
v = torch.nn.functional.pad(
|
|
435
|
+
v, [0, self.qk_head_dim - self.v_head_dim],
|
|
436
|
+
value=0).view(-1, self.num_local_heads * self.qk_head_dim)
|
|
437
|
+
attn_output = self.attn(q, k, v)
|
|
438
|
+
attn_output = attn_output.view(
|
|
439
|
+
-1, self.num_local_heads,
|
|
440
|
+
self.qk_head_dim)[..., :self.v_head_dim].reshape(
|
|
441
|
+
-1, self.num_local_heads * self.v_head_dim)
|
|
442
|
+
output, _ = self.o_proj(attn_output)
|
|
443
|
+
return output
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
class DeepseekV32IndexerCache(torch.nn.Module, AttentionLayerBase):
|
|
447
|
+
|
|
448
|
+
def __init__(self, head_dim: int, dtype: torch.dtype, prefix: str,
|
|
449
|
+
cache_config: CacheConfig):
|
|
450
|
+
super().__init__()
|
|
451
|
+
self.kv_cache = [torch.tensor([])]
|
|
452
|
+
self.head_dim = head_dim
|
|
453
|
+
self.prefix = prefix
|
|
454
|
+
self.cache_config = cache_config
|
|
455
|
+
self.dtype = dtype
|
|
456
|
+
compilation_config = get_current_vllm_config().compilation_config
|
|
457
|
+
if prefix in compilation_config.static_forward_context:
|
|
458
|
+
raise ValueError(f"Duplicate layer name: {prefix}")
|
|
459
|
+
compilation_config.static_forward_context[prefix] = self
|
|
460
|
+
|
|
461
|
+
def get_kv_cache_spec(self) -> KVCacheSpec:
|
|
462
|
+
return MLAAttentionSpec( # Only has one vector instead of K + V
|
|
463
|
+
block_size=self.cache_config.block_size,
|
|
464
|
+
num_kv_heads=1,
|
|
465
|
+
head_size=self.head_dim,
|
|
466
|
+
dtype=self.dtype,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
def forward(self):
|
|
470
|
+
...
|
|
471
|
+
|
|
472
|
+
def get_attn_backend(self) -> AttentionBackend:
|
|
473
|
+
return DeepseekV32IndexerBackend
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
@torch.inference_mode()
|
|
477
|
+
def cp_gather_indexer_k_quant_cache(
|
|
478
|
+
kv_cache, # [num_blocks, block_size, head_dim + 1]
|
|
479
|
+
dst_value, # [cu_seq_lens[-1], head_dim]
|
|
480
|
+
dst_scale, # [cu_seq_lens[-1], 4]
|
|
481
|
+
block_table, # [batch_size, num_blocks]
|
|
482
|
+
cu_seq_lens, # [batch_size + 1, ]
|
|
483
|
+
batch_size,
|
|
484
|
+
):
|
|
485
|
+
num_blocks, block_size, _ = kv_cache.shape
|
|
486
|
+
head_dim = dst_value.shape[-1]
|
|
487
|
+
kv_cache = kv_cache.view(num_blocks, -1)
|
|
488
|
+
|
|
489
|
+
expected_value = []
|
|
490
|
+
expected_scale = []
|
|
491
|
+
for b in range(batch_size):
|
|
492
|
+
s = cu_seq_lens[b + 1] - cu_seq_lens[b]
|
|
493
|
+
if s == 0:
|
|
494
|
+
continue
|
|
495
|
+
tot = cdiv(s, block_size)
|
|
496
|
+
blocks = block_table[b, :tot]
|
|
497
|
+
|
|
498
|
+
value = []
|
|
499
|
+
scale = []
|
|
500
|
+
full_block = torch.arange(tot - 1,
|
|
501
|
+
device=kv_cache.device,
|
|
502
|
+
dtype=torch.int32)
|
|
503
|
+
non_remaining_value = kv_cache[blocks[full_block], :block_size *
|
|
504
|
+
head_dim].view(-1, head_dim)
|
|
505
|
+
non_remaining_scale = kv_cache[blocks[full_block],
|
|
506
|
+
block_size * head_dim:].view(-1, 4)
|
|
507
|
+
|
|
508
|
+
remaining = s - (tot - 1) * block_size
|
|
509
|
+
|
|
510
|
+
value = torch.cat([
|
|
511
|
+
non_remaining_value,
|
|
512
|
+
kv_cache[blocks[-1], :remaining * head_dim].view(-1, head_dim)
|
|
513
|
+
],
|
|
514
|
+
dim=0)
|
|
515
|
+
scale = torch.cat([
|
|
516
|
+
non_remaining_scale,
|
|
517
|
+
kv_cache[blocks[-1], block_size * head_dim:block_size * head_dim +
|
|
518
|
+
remaining * 4].view(-1, 4)
|
|
519
|
+
],
|
|
520
|
+
dim=0)
|
|
521
|
+
|
|
522
|
+
expected_value.append(value)
|
|
523
|
+
expected_scale.append(scale)
|
|
524
|
+
|
|
525
|
+
gather_value = torch.cat(expected_value, dim=0).view(-1, head_dim)
|
|
526
|
+
gather_scale = torch.cat(expected_scale, dim=0).view(-1, 4)
|
|
527
|
+
gather_value = gather_value.view(torch.float8_e4m3fn)
|
|
528
|
+
gather_scale = gather_scale.view(torch.float32)
|
|
529
|
+
dst_value.copy_(gather_value)
|
|
530
|
+
dst_scale.copy_(gather_scale)
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def sparse_attn_indexer(
|
|
534
|
+
hidden_states: torch.Tensor,
|
|
535
|
+
k_cache_prefix: str,
|
|
536
|
+
kv_cache: torch.Tensor,
|
|
537
|
+
q_fp8: torch.Tensor,
|
|
538
|
+
k: torch.Tensor,
|
|
539
|
+
weights: torch.Tensor,
|
|
540
|
+
quant_block_size: int,
|
|
541
|
+
scale_fmt: Optional[str],
|
|
542
|
+
topk_tokens: int,
|
|
543
|
+
head_dim: int,
|
|
544
|
+
max_model_len: int,
|
|
545
|
+
total_seq_lens: int,
|
|
546
|
+
topk_indices_buffer: Optional[torch.Tensor],
|
|
547
|
+
) -> torch.Tensor:
|
|
548
|
+
|
|
549
|
+
# careful! this will be None in dummy run
|
|
550
|
+
attn_metadata = get_forward_context().attn_metadata
|
|
551
|
+
# assert isinstance(attn_metadata, dict)
|
|
552
|
+
if not isinstance(attn_metadata, dict):
|
|
553
|
+
return sparse_attn_indexer_fake(
|
|
554
|
+
hidden_states,
|
|
555
|
+
k_cache_prefix,
|
|
556
|
+
kv_cache,
|
|
557
|
+
q_fp8,
|
|
558
|
+
k,
|
|
559
|
+
weights,
|
|
560
|
+
quant_block_size,
|
|
561
|
+
scale_fmt,
|
|
562
|
+
topk_tokens,
|
|
563
|
+
head_dim,
|
|
564
|
+
max_model_len,
|
|
565
|
+
total_seq_lens,
|
|
566
|
+
topk_indices_buffer,
|
|
567
|
+
)
|
|
568
|
+
attn_metadata = attn_metadata[k_cache_prefix]
|
|
569
|
+
assert isinstance(attn_metadata, DeepseekV32IndexerMetadata)
|
|
570
|
+
slot_mapping = attn_metadata.slot_mapping
|
|
571
|
+
has_decode = attn_metadata.num_decodes > 0
|
|
572
|
+
has_prefill = attn_metadata.num_prefills > 0
|
|
573
|
+
num_decode_tokens = attn_metadata.num_decode_tokens
|
|
574
|
+
|
|
575
|
+
ops.indexer_k_quant_and_cache(
|
|
576
|
+
k,
|
|
577
|
+
kv_cache,
|
|
578
|
+
slot_mapping,
|
|
579
|
+
quant_block_size,
|
|
580
|
+
scale_fmt,
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
topk_indices_buffer[:hidden_states.shape[0]] = -1
|
|
584
|
+
if has_prefill:
|
|
585
|
+
prefill_metadata = attn_metadata.prefill
|
|
586
|
+
for chunk in prefill_metadata.chunks:
|
|
587
|
+
k_fp8 = torch.empty([chunk.total_seq_lens, head_dim],
|
|
588
|
+
device=k.device,
|
|
589
|
+
dtype=torch.float8_e4m3fn)
|
|
590
|
+
k_scale = torch.empty([chunk.total_seq_lens, 1],
|
|
591
|
+
device=k.device,
|
|
592
|
+
dtype=torch.float32)
|
|
593
|
+
cp_gather_indexer_k_quant_cache(
|
|
594
|
+
kv_cache,
|
|
595
|
+
k_fp8,
|
|
596
|
+
k_scale,
|
|
597
|
+
chunk.block_table,
|
|
598
|
+
chunk.cu_seq_lens,
|
|
599
|
+
chunk.num_reqs,
|
|
600
|
+
)
|
|
601
|
+
logits = fp8_mqa_logits(
|
|
602
|
+
q_fp8[chunk.token_start:chunk.token_end],
|
|
603
|
+
(k_fp8, k_scale),
|
|
604
|
+
weights[chunk.token_start:chunk.token_end],
|
|
605
|
+
chunk.cu_seqlen_ks,
|
|
606
|
+
chunk.cu_seqlen_ke,
|
|
607
|
+
)
|
|
608
|
+
topk_indices = logits.topk(min(topk_tokens, logits.shape[-1]),
|
|
609
|
+
dim=-1)[1]
|
|
610
|
+
topk_indices -= chunk.cu_seqlen_ks[:, None]
|
|
611
|
+
mask_lo = topk_indices >= 0
|
|
612
|
+
mask_hi = topk_indices - (chunk.cu_seqlen_ke -
|
|
613
|
+
chunk.cu_seqlen_ks)[:, None] < 0
|
|
614
|
+
mask = torch.full_like(topk_indices,
|
|
615
|
+
False,
|
|
616
|
+
dtype=torch.bool,
|
|
617
|
+
device=topk_indices.device)
|
|
618
|
+
mask = mask_lo & mask_hi
|
|
619
|
+
topk_indices = topk_indices.masked_fill(~mask, -1)
|
|
620
|
+
topk_indices_buffer[
|
|
621
|
+
chunk.token_start:chunk.token_end, :topk_indices.
|
|
622
|
+
shape[-1]] = topk_indices.to(dtype=torch.int32)
|
|
623
|
+
|
|
624
|
+
if has_decode:
|
|
625
|
+
decode_metadata = attn_metadata.decode
|
|
626
|
+
# kv_cache size requirement [num_block, block_size, n_head, head_dim],
|
|
627
|
+
# we only have [num_block, block_size, head_dim],
|
|
628
|
+
kv_cache = kv_cache.unsqueeze(-2)
|
|
629
|
+
decode_lens = decode_metadata.decode_lens
|
|
630
|
+
if decode_metadata.requires_padding:
|
|
631
|
+
# pad in edge case where we have short chunked prefill length <
|
|
632
|
+
# decode_threshold since we unstrictly split
|
|
633
|
+
# prefill and decode by decode_threshold
|
|
634
|
+
# (currently set to 1 + speculative tokens)
|
|
635
|
+
padded_q_fp8_decode_tokens = pack_seq_triton(
|
|
636
|
+
q_fp8[:num_decode_tokens], decode_lens)
|
|
637
|
+
else:
|
|
638
|
+
padded_q_fp8_decode_tokens = q_fp8[:num_decode_tokens].reshape(
|
|
639
|
+
decode_lens.shape[0], -1, *q_fp8.shape[1:])
|
|
640
|
+
# TODO: move and optimize below logic with triton kernels
|
|
641
|
+
batch_size = padded_q_fp8_decode_tokens.shape[0]
|
|
642
|
+
next_n = padded_q_fp8_decode_tokens.shape[1]
|
|
643
|
+
assert batch_size == decode_metadata.seq_lens.shape[0]
|
|
644
|
+
num_padded_tokens = batch_size * next_n
|
|
645
|
+
logits = fp8_paged_mqa_logits(
|
|
646
|
+
padded_q_fp8_decode_tokens,
|
|
647
|
+
kv_cache,
|
|
648
|
+
weights[:num_padded_tokens],
|
|
649
|
+
decode_metadata.seq_lens,
|
|
650
|
+
decode_metadata.block_table,
|
|
651
|
+
decode_metadata.schedule_metadata,
|
|
652
|
+
max_model_len=max_model_len,
|
|
653
|
+
)
|
|
654
|
+
# padded query len
|
|
655
|
+
current_device = padded_q_fp8_decode_tokens.device
|
|
656
|
+
padded_num_tokens = batch_size * next_n
|
|
657
|
+
positions = torch.arange(max_model_len,
|
|
658
|
+
device=current_device).unsqueeze(0).expand(
|
|
659
|
+
batch_size * next_n, -1)
|
|
660
|
+
row_indices = torch.arange(padded_num_tokens,
|
|
661
|
+
device=current_device) // next_n
|
|
662
|
+
next_n_offset = torch.arange(
|
|
663
|
+
padded_num_tokens,
|
|
664
|
+
device=padded_q_fp8_decode_tokens.device) % next_n
|
|
665
|
+
index_end_pos = (decode_metadata.seq_lens[row_indices] - next_n +
|
|
666
|
+
next_n_offset).unsqueeze(1)
|
|
667
|
+
# index_end_pos: [B * N, 1]
|
|
668
|
+
mask = positions <= index_end_pos
|
|
669
|
+
# mask: [B * N, L]
|
|
670
|
+
logits = logits.masked_fill(~mask, float('-inf'))
|
|
671
|
+
topk_indices = logits.topk(topk_tokens,
|
|
672
|
+
dim=-1)[1].to(torch.int32) # [B * N, K]
|
|
673
|
+
# ensure we don't set indices for the top k
|
|
674
|
+
# that is out of range(masked already)
|
|
675
|
+
# this will happen if context length is shorter than K
|
|
676
|
+
topk_indices[topk_indices > index_end_pos] = -1
|
|
677
|
+
if decode_metadata.requires_padding:
|
|
678
|
+
# if padded, we need to unpack
|
|
679
|
+
# the topk indices removing padded tokens
|
|
680
|
+
topk_indices = unpack_seq_triton(
|
|
681
|
+
topk_indices.reshape(batch_size, -1, topk_indices.shape[-1]),
|
|
682
|
+
decode_lens)
|
|
683
|
+
topk_indices_buffer[:num_decode_tokens, :topk_indices.
|
|
684
|
+
shape[-1]] = topk_indices.to(dtype=torch.int32)
|
|
685
|
+
|
|
686
|
+
return topk_indices_buffer
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
def sparse_attn_indexer_fake(
|
|
690
|
+
hidden_states: torch.Tensor,
|
|
691
|
+
k_cache_prefix: str,
|
|
692
|
+
kv_cache: torch.Tensor,
|
|
693
|
+
q_fp8: torch.Tensor,
|
|
694
|
+
k: torch.Tensor,
|
|
695
|
+
weights: torch.Tensor,
|
|
696
|
+
quant_block_size: int,
|
|
697
|
+
scale_fmt: Optional[str],
|
|
698
|
+
topk_tokens: int,
|
|
699
|
+
head_dim: int,
|
|
700
|
+
max_model_len: int,
|
|
701
|
+
total_seq_lens: int,
|
|
702
|
+
topk_indices_buffer: Optional[torch.Tensor],
|
|
703
|
+
) -> torch.Tensor:
|
|
704
|
+
# profile run
|
|
705
|
+
# NOTE(Chen): create the max possible flattened_kv. So that
|
|
706
|
+
# profile_run can get correct memory usage.
|
|
707
|
+
_flattened_kv = torch.empty([total_seq_lens, head_dim + 4],
|
|
708
|
+
device=k.device,
|
|
709
|
+
dtype=torch.uint8)
|
|
710
|
+
_k_fp8 = _flattened_kv[..., :head_dim].view(
|
|
711
|
+
torch.float8_e4m3fn).contiguous()
|
|
712
|
+
_k_scale = _flattened_kv[..., head_dim:].view(torch.float32).contiguous()
|
|
713
|
+
return topk_indices_buffer
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
direct_register_custom_op(
|
|
717
|
+
op_name="sparse_attn_indexer",
|
|
718
|
+
op_func=sparse_attn_indexer,
|
|
719
|
+
mutates_args=["topk_indices_buffer"],
|
|
720
|
+
fake_impl=sparse_attn_indexer_fake,
|
|
721
|
+
dispatch_key=current_platform.dispatch_key,
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
class Indexer(nn.Module):
|
|
726
|
+
|
|
727
|
+
def __init__(self,
|
|
728
|
+
vllm_config: VllmConfig,
|
|
729
|
+
config: Union[DeepseekV2Config, DeepseekV3Config],
|
|
730
|
+
hidden_size: int,
|
|
731
|
+
q_lora_rank: int,
|
|
732
|
+
quant_config: Optional[QuantizationConfig],
|
|
733
|
+
cache_config: Optional[CacheConfig],
|
|
734
|
+
topk_indices_buffer: Optional[torch.Tensor],
|
|
735
|
+
prefix: str = ""):
|
|
736
|
+
super().__init__()
|
|
737
|
+
self.vllm_config = vllm_config
|
|
738
|
+
self.config = config
|
|
739
|
+
# self.indexer_cfg = config.attn_module_list_cfg[0]["attn_index"]
|
|
740
|
+
self.topk_tokens = config.index_topk
|
|
741
|
+
self.n_head = config.index_n_heads # 64
|
|
742
|
+
self.head_dim = config.index_head_dim # 128
|
|
743
|
+
self.rope_dim = config.qk_rope_head_dim # 64
|
|
744
|
+
self.q_lora_rank = q_lora_rank # 1536
|
|
745
|
+
# no tensor parallel, just replicated
|
|
746
|
+
self.wq_b = ReplicatedLinear(self.q_lora_rank,
|
|
747
|
+
self.head_dim * self.n_head,
|
|
748
|
+
bias=False,
|
|
749
|
+
quant_config=quant_config,
|
|
750
|
+
prefix=f"{prefix}.wq_b")
|
|
751
|
+
self.wk = ReplicatedLinear(hidden_size,
|
|
752
|
+
self.head_dim,
|
|
753
|
+
bias=False,
|
|
754
|
+
quant_config=quant_config,
|
|
755
|
+
prefix=f"{prefix}.wk")
|
|
756
|
+
self.k_norm = LayerNorm(self.head_dim, eps=1e-6)
|
|
757
|
+
self.weights_proj = ReplicatedLinear(hidden_size,
|
|
758
|
+
self.n_head,
|
|
759
|
+
quant_config=None,
|
|
760
|
+
prefix=f"{prefix}.weights_proj")
|
|
761
|
+
self.softmax_scale = self.head_dim**-0.5
|
|
762
|
+
|
|
763
|
+
self.scale_fmt = "ue8m0"
|
|
764
|
+
self.quant_block_size = 128 # TODO: get from config
|
|
765
|
+
self.topk_indices_buffer = topk_indices_buffer
|
|
766
|
+
|
|
767
|
+
# NOTE: (zyongye) we use fp8 naive cache,
|
|
768
|
+
# where we store value in fp8 and scale in fp32
|
|
769
|
+
# per self.quant_block_size element
|
|
770
|
+
self.k_cache = DeepseekV32IndexerCache(
|
|
771
|
+
head_dim=self.head_dim +
|
|
772
|
+
self.head_dim // self.quant_block_size * 4,
|
|
773
|
+
dtype=torch.uint8,
|
|
774
|
+
prefix=f"{prefix}.k_cache",
|
|
775
|
+
cache_config=cache_config)
|
|
776
|
+
self.max_model_len = vllm_config.model_config.max_model_len
|
|
777
|
+
self.prefix = prefix
|
|
778
|
+
from vllm.v1.attention.backends.mla.indexer import (
|
|
779
|
+
get_max_prefill_buffer_size)
|
|
780
|
+
self.max_total_seq_len = get_max_prefill_buffer_size(vllm_config)
|
|
781
|
+
|
|
782
|
+
def forward(self, hidden_states: torch.Tensor, qr: torch.Tensor, positions,
|
|
783
|
+
rotary_emb) -> torch.Tensor:
|
|
784
|
+
q, _ = self.wq_b(qr)
|
|
785
|
+
q = q.view(-1, self.n_head, self.head_dim)
|
|
786
|
+
q_pe, q_nope = torch.split(
|
|
787
|
+
q, [self.rope_dim, self.head_dim - self.rope_dim], dim=-1)
|
|
788
|
+
|
|
789
|
+
k, _ = self.wk(hidden_states)
|
|
790
|
+
k = self.k_norm(k)
|
|
791
|
+
k_pe, k_nope = torch.split(
|
|
792
|
+
k, [self.rope_dim, self.head_dim - self.rope_dim], dim=-1)
|
|
793
|
+
|
|
794
|
+
q_pe, k_pe = rotary_emb(positions, q_pe, k_pe.unsqueeze(1))
|
|
795
|
+
q = torch.cat([q_pe, q_nope], dim=-1)
|
|
796
|
+
k = torch.cat([k_pe.squeeze(1), k_nope], dim=-1)
|
|
797
|
+
|
|
798
|
+
# we only quant q here since k quant is fused with cache insertion
|
|
799
|
+
q = q.view(-1, self.head_dim)
|
|
800
|
+
q_fp8, q_scale = per_token_group_quant_fp8(q,
|
|
801
|
+
self.quant_block_size,
|
|
802
|
+
column_major_scales=False,
|
|
803
|
+
use_ue8m0=self.scale_fmt
|
|
804
|
+
is not None)
|
|
805
|
+
q_fp8 = q_fp8.view(-1, self.n_head, self.head_dim)
|
|
806
|
+
q_scale = q_scale.view(-1, self.n_head, 1)
|
|
807
|
+
|
|
808
|
+
weights, _ = self.weights_proj(hidden_states)
|
|
809
|
+
weights = weights.unsqueeze(
|
|
810
|
+
-1) * q_scale * self.softmax_scale * self.n_head**-0.5
|
|
811
|
+
weights = weights.squeeze(-1)
|
|
812
|
+
|
|
813
|
+
return torch.ops.vllm.sparse_attn_indexer(
|
|
814
|
+
hidden_states,
|
|
815
|
+
self.k_cache.prefix,
|
|
816
|
+
self.k_cache.kv_cache[0],
|
|
817
|
+
q_fp8,
|
|
818
|
+
k,
|
|
819
|
+
weights,
|
|
820
|
+
self.quant_block_size,
|
|
821
|
+
self.scale_fmt,
|
|
822
|
+
self.topk_tokens,
|
|
823
|
+
self.head_dim,
|
|
824
|
+
self.max_model_len,
|
|
825
|
+
self.max_total_seq_len,
|
|
826
|
+
self.topk_indices_buffer,
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
class DeepseekV2MLAAttention(nn.Module):
|
|
831
|
+
"""
|
|
832
|
+
Main reference: DeepseekV2 paper, and FlashInfer Implementation
|
|
833
|
+
(https://arxiv.org/abs/2405.04434 and https://github.com/flashinfer-ai/flashinfer/pull/551).
|
|
834
|
+
|
|
835
|
+
For more info see MLACommonImpl in:
|
|
836
|
+
vllm/v1/attention/backends/mla/utils.py
|
|
837
|
+
"""
|
|
838
|
+
|
|
839
|
+
def __init__(
|
|
840
|
+
self,
|
|
841
|
+
vllm_config: VllmConfig,
|
|
842
|
+
config: Union[DeepseekV2Config, DeepseekV3Config],
|
|
843
|
+
hidden_size: int,
|
|
844
|
+
num_heads: int,
|
|
845
|
+
qk_nope_head_dim: int,
|
|
846
|
+
qk_rope_head_dim: int,
|
|
847
|
+
v_head_dim: int,
|
|
848
|
+
q_lora_rank: Optional[int],
|
|
849
|
+
kv_lora_rank: int,
|
|
850
|
+
rope_theta: float = 10000,
|
|
851
|
+
rope_scaling: Optional[dict[str, Any]] = None,
|
|
852
|
+
max_position_embeddings: int = 8192,
|
|
853
|
+
cache_config: Optional[CacheConfig] = None,
|
|
854
|
+
quant_config: Optional[QuantizationConfig] = None,
|
|
855
|
+
prefix: str = "",
|
|
856
|
+
topk_indices_buffer: Optional[torch.Tensor] = None,
|
|
857
|
+
) -> None:
|
|
858
|
+
super().__init__()
|
|
859
|
+
self.hidden_size = hidden_size
|
|
860
|
+
self.qk_nope_head_dim = qk_nope_head_dim
|
|
861
|
+
self.qk_rope_head_dim = qk_rope_head_dim
|
|
862
|
+
self.qk_head_dim = qk_nope_head_dim + qk_rope_head_dim
|
|
863
|
+
self.v_head_dim = v_head_dim
|
|
864
|
+
|
|
865
|
+
self.q_lora_rank = q_lora_rank
|
|
866
|
+
self.kv_lora_rank = kv_lora_rank
|
|
867
|
+
|
|
868
|
+
self.num_heads = num_heads
|
|
869
|
+
tp_size = get_tensor_model_parallel_world_size()
|
|
870
|
+
assert num_heads % tp_size == 0
|
|
871
|
+
self.num_local_heads = num_heads // tp_size
|
|
872
|
+
|
|
873
|
+
self.scaling = self.qk_head_dim**-0.5
|
|
874
|
+
self.rope_theta = rope_theta
|
|
875
|
+
self.max_position_embeddings = max_position_embeddings
|
|
876
|
+
|
|
877
|
+
if self.q_lora_rank is not None:
|
|
878
|
+
self.fused_qkv_a_proj = MergedColumnParallelLinear(
|
|
879
|
+
self.hidden_size,
|
|
880
|
+
[self.q_lora_rank, self.kv_lora_rank + self.qk_rope_head_dim],
|
|
881
|
+
bias=False,
|
|
882
|
+
quant_config=quant_config,
|
|
883
|
+
prefix=f"{prefix}.fused_qkv_a_proj",
|
|
884
|
+
disable_tp=True)
|
|
885
|
+
else:
|
|
886
|
+
self.kv_a_proj_with_mqa = ReplicatedLinear(
|
|
887
|
+
self.hidden_size,
|
|
888
|
+
self.kv_lora_rank + self.qk_rope_head_dim,
|
|
889
|
+
bias=False,
|
|
890
|
+
quant_config=quant_config,
|
|
891
|
+
prefix=f"{prefix}.kv_a_proj_with_mqa")
|
|
892
|
+
|
|
893
|
+
if self.q_lora_rank is not None:
|
|
894
|
+
self.q_a_layernorm = RMSNorm(self.q_lora_rank,
|
|
895
|
+
eps=config.rms_norm_eps)
|
|
896
|
+
self.q_b_proj = ColumnParallelLinear(self.q_lora_rank,
|
|
897
|
+
self.num_heads *
|
|
898
|
+
self.qk_head_dim,
|
|
899
|
+
bias=False,
|
|
900
|
+
quant_config=quant_config,
|
|
901
|
+
prefix=f"{prefix}.q_b_proj")
|
|
902
|
+
else:
|
|
903
|
+
self.q_proj = ColumnParallelLinear(self.hidden_size,
|
|
904
|
+
self.num_heads *
|
|
905
|
+
self.qk_head_dim,
|
|
906
|
+
bias=False,
|
|
907
|
+
quant_config=quant_config,
|
|
908
|
+
prefix=f"{prefix}.q_proj")
|
|
909
|
+
self.kv_a_layernorm = RMSNorm(self.kv_lora_rank,
|
|
910
|
+
eps=config.rms_norm_eps)
|
|
911
|
+
self.kv_b_proj = ColumnParallelLinear(
|
|
912
|
+
self.kv_lora_rank,
|
|
913
|
+
self.num_heads * (self.qk_nope_head_dim + self.v_head_dim),
|
|
914
|
+
bias=False,
|
|
915
|
+
quant_config=quant_config,
|
|
916
|
+
prefix=f"{prefix}.kv_b_proj")
|
|
917
|
+
self.o_proj = RowParallelLinear(self.num_heads * self.v_head_dim,
|
|
918
|
+
self.hidden_size,
|
|
919
|
+
bias=False,
|
|
920
|
+
quant_config=quant_config,
|
|
921
|
+
prefix=f"{prefix}.o_proj")
|
|
922
|
+
|
|
923
|
+
if rope_scaling:
|
|
924
|
+
rope_scaling["rope_type"] = 'deepseek_yarn'
|
|
925
|
+
self.rotary_emb = get_rope(qk_rope_head_dim,
|
|
926
|
+
rotary_dim=qk_rope_head_dim,
|
|
927
|
+
max_position=max_position_embeddings,
|
|
928
|
+
base=rope_theta,
|
|
929
|
+
rope_scaling=rope_scaling,
|
|
930
|
+
is_neox_style=False)
|
|
931
|
+
if rope_scaling:
|
|
932
|
+
mscale_all_dim = rope_scaling.get("mscale_all_dim", False)
|
|
933
|
+
scaling_factor = rope_scaling["factor"]
|
|
934
|
+
mscale = yarn_get_mscale(scaling_factor, float(mscale_all_dim))
|
|
935
|
+
self.scaling = self.scaling * mscale * mscale
|
|
936
|
+
|
|
937
|
+
self.is_v32 = hasattr(config, "index_topk")
|
|
938
|
+
|
|
939
|
+
if self.is_v32:
|
|
940
|
+
self.indexer = Indexer(vllm_config, config, hidden_size,
|
|
941
|
+
q_lora_rank, quant_config, cache_config,
|
|
942
|
+
topk_indices_buffer, f"{prefix}.indexer")
|
|
943
|
+
else:
|
|
944
|
+
self.indexer = None
|
|
945
|
+
|
|
946
|
+
mla_modules = MLAModules(
|
|
947
|
+
kv_a_layernorm=self.kv_a_layernorm,
|
|
948
|
+
kv_b_proj=self.kv_b_proj,
|
|
949
|
+
rotary_emb=self.rotary_emb,
|
|
950
|
+
o_proj=self.o_proj,
|
|
951
|
+
fused_qkv_a_proj=self.fused_qkv_a_proj
|
|
952
|
+
if self.q_lora_rank is not None else None,
|
|
953
|
+
kv_a_proj_with_mqa=self.kv_a_proj_with_mqa
|
|
954
|
+
if self.q_lora_rank is None else None,
|
|
955
|
+
q_a_layernorm=self.q_a_layernorm
|
|
956
|
+
if self.q_lora_rank is not None else None,
|
|
957
|
+
q_b_proj=self.q_b_proj if self.q_lora_rank is not None else None,
|
|
958
|
+
q_proj=self.q_proj if self.q_lora_rank is None else None,
|
|
959
|
+
indexer=self.indexer,
|
|
960
|
+
is_sparse=self.is_v32,
|
|
961
|
+
topk_indices_buffer=topk_indices_buffer,
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
self.mla_attn = MultiHeadLatentAttention(
|
|
965
|
+
self.hidden_size,
|
|
966
|
+
self.num_local_heads,
|
|
967
|
+
self.scaling,
|
|
968
|
+
self.qk_nope_head_dim,
|
|
969
|
+
self.qk_rope_head_dim,
|
|
970
|
+
self.v_head_dim,
|
|
971
|
+
self.q_lora_rank,
|
|
972
|
+
self.kv_lora_rank,
|
|
973
|
+
mla_modules,
|
|
974
|
+
cache_config,
|
|
975
|
+
quant_config,
|
|
976
|
+
prefix,
|
|
977
|
+
)
|
|
978
|
+
|
|
979
|
+
def forward(
|
|
980
|
+
self,
|
|
981
|
+
positions: torch.Tensor,
|
|
982
|
+
hidden_states: torch.Tensor,
|
|
983
|
+
) -> torch.Tensor:
|
|
984
|
+
return self.mla_attn(positions, hidden_states)
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
class DeepseekV2DecoderLayer(nn.Module):
|
|
988
|
+
|
|
989
|
+
def __init__(self,
|
|
990
|
+
vllm_config: VllmConfig,
|
|
991
|
+
prefix: str,
|
|
992
|
+
topk_indices_buffer: Optional[torch.Tensor] = None) -> None:
|
|
993
|
+
super().__init__()
|
|
994
|
+
|
|
995
|
+
config = vllm_config.model_config.hf_config
|
|
996
|
+
model_config = vllm_config.model_config
|
|
997
|
+
cache_config = vllm_config.cache_config
|
|
998
|
+
quant_config = vllm_config.quant_config
|
|
999
|
+
parallel_config = vllm_config.parallel_config
|
|
1000
|
+
|
|
1001
|
+
self.hidden_size = config.hidden_size
|
|
1002
|
+
rope_theta = getattr(config, "rope_theta", 10000)
|
|
1003
|
+
rope_scaling = getattr(config, "rope_scaling", None)
|
|
1004
|
+
max_position_embeddings = getattr(config, "max_position_embeddings",
|
|
1005
|
+
8192)
|
|
1006
|
+
# DecoderLayers are created with `make_layers` which passes the prefix
|
|
1007
|
+
# with the layer's index.
|
|
1008
|
+
layer_idx = int(prefix.split(sep='.')[-1])
|
|
1009
|
+
self.layer_idx = layer_idx
|
|
1010
|
+
if model_config.use_mla:
|
|
1011
|
+
attn_cls = DeepseekV2MLAAttention
|
|
1012
|
+
else:
|
|
1013
|
+
attn_cls = DeepseekV2Attention
|
|
1014
|
+
self.self_attn = attn_cls(
|
|
1015
|
+
vllm_config=vllm_config,
|
|
1016
|
+
config=config,
|
|
1017
|
+
hidden_size=self.hidden_size,
|
|
1018
|
+
num_heads=config.num_attention_heads,
|
|
1019
|
+
qk_nope_head_dim=config.qk_nope_head_dim,
|
|
1020
|
+
qk_rope_head_dim=config.qk_rope_head_dim,
|
|
1021
|
+
v_head_dim=config.v_head_dim,
|
|
1022
|
+
q_lora_rank=config.q_lora_rank
|
|
1023
|
+
if hasattr(config, "q_lora_rank") else None,
|
|
1024
|
+
kv_lora_rank=config.kv_lora_rank,
|
|
1025
|
+
rope_theta=rope_theta,
|
|
1026
|
+
rope_scaling=rope_scaling,
|
|
1027
|
+
max_position_embeddings=max_position_embeddings,
|
|
1028
|
+
cache_config=cache_config,
|
|
1029
|
+
quant_config=quant_config,
|
|
1030
|
+
prefix=f"{prefix}.self_attn",
|
|
1031
|
+
topk_indices_buffer=topk_indices_buffer,
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
if (config.n_routed_experts is not None
|
|
1035
|
+
and layer_idx >= config.first_k_dense_replace
|
|
1036
|
+
and layer_idx % config.moe_layer_freq == 0):
|
|
1037
|
+
self.mlp = DeepseekV2MoE(
|
|
1038
|
+
config=config,
|
|
1039
|
+
parallel_config=parallel_config,
|
|
1040
|
+
quant_config=quant_config,
|
|
1041
|
+
prefix=f"{prefix}.mlp",
|
|
1042
|
+
)
|
|
1043
|
+
else:
|
|
1044
|
+
self.mlp = DeepseekV2MLP(
|
|
1045
|
+
hidden_size=config.hidden_size,
|
|
1046
|
+
intermediate_size=config.intermediate_size,
|
|
1047
|
+
hidden_act=config.hidden_act,
|
|
1048
|
+
quant_config=quant_config,
|
|
1049
|
+
prefix=f"{prefix}.mlp",
|
|
1050
|
+
)
|
|
1051
|
+
self.input_layernorm = RMSNorm(config.hidden_size,
|
|
1052
|
+
eps=config.rms_norm_eps)
|
|
1053
|
+
self.post_attention_layernorm = RMSNorm(config.hidden_size,
|
|
1054
|
+
eps=config.rms_norm_eps)
|
|
1055
|
+
self.routed_scaling_factor = config.routed_scaling_factor
|
|
1056
|
+
|
|
1057
|
+
def forward(
|
|
1058
|
+
self,
|
|
1059
|
+
positions: torch.Tensor,
|
|
1060
|
+
hidden_states: torch.Tensor,
|
|
1061
|
+
residual: Optional[torch.Tensor],
|
|
1062
|
+
) -> torch.Tensor:
|
|
1063
|
+
# Self Attention
|
|
1064
|
+
if residual is None:
|
|
1065
|
+
residual = hidden_states.clone()
|
|
1066
|
+
hidden_states = self.input_layernorm(hidden_states)
|
|
1067
|
+
else:
|
|
1068
|
+
hidden_states, residual = self.input_layernorm(
|
|
1069
|
+
hidden_states, residual)
|
|
1070
|
+
hidden_states = self.self_attn(
|
|
1071
|
+
positions=positions,
|
|
1072
|
+
hidden_states=hidden_states,
|
|
1073
|
+
)
|
|
1074
|
+
|
|
1075
|
+
if hidden_states.dtype == torch.float16:
|
|
1076
|
+
# Fix FP16 overflow
|
|
1077
|
+
# We scale both hidden_states and residual before
|
|
1078
|
+
# rmsnorm, and rmsnorm result would not affect by scale.
|
|
1079
|
+
hidden_states *= 1. / self.routed_scaling_factor
|
|
1080
|
+
if self.layer_idx == 0:
|
|
1081
|
+
# The residual is shared by all layers, we only scale it on
|
|
1082
|
+
# first layer.
|
|
1083
|
+
residual *= 1. / self.routed_scaling_factor
|
|
1084
|
+
|
|
1085
|
+
# Fully Connected
|
|
1086
|
+
hidden_states, residual = self.post_attention_layernorm(
|
|
1087
|
+
hidden_states, residual)
|
|
1088
|
+
hidden_states = self.mlp(hidden_states)
|
|
1089
|
+
|
|
1090
|
+
if isinstance(self.mlp,
|
|
1091
|
+
DeepseekV2MLP) and hidden_states.dtype == torch.float16:
|
|
1092
|
+
# Fix FP16 overflow
|
|
1093
|
+
# Scaling the DeepseekV2MLP output, it is the input of
|
|
1094
|
+
# input_layernorm of next decoder layer.
|
|
1095
|
+
# The scaling of DeepseekV2MOE output would be done in the forward
|
|
1096
|
+
# of DeepseekV2MOE
|
|
1097
|
+
hidden_states *= 1. / self.routed_scaling_factor
|
|
1098
|
+
|
|
1099
|
+
return hidden_states, residual
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
@support_torch_compile
|
|
1103
|
+
class DeepseekV2Model(nn.Module):
|
|
1104
|
+
|
|
1105
|
+
fall_back_to_pt_during_load = False
|
|
1106
|
+
|
|
1107
|
+
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
|
1108
|
+
super().__init__()
|
|
1109
|
+
|
|
1110
|
+
config = vllm_config.model_config.hf_config
|
|
1111
|
+
quant_config = vllm_config.quant_config
|
|
1112
|
+
self.config = config
|
|
1113
|
+
|
|
1114
|
+
self.vocab_size = config.vocab_size
|
|
1115
|
+
self.is_v32 = hasattr(config, "index_topk")
|
|
1116
|
+
if self.is_v32:
|
|
1117
|
+
topk_tokens = config.index_topk
|
|
1118
|
+
topk_indices_buffer = torch.empty(
|
|
1119
|
+
vllm_config.scheduler_config.max_num_batched_tokens,
|
|
1120
|
+
topk_tokens,
|
|
1121
|
+
dtype=torch.int32,
|
|
1122
|
+
device="cuda")
|
|
1123
|
+
else:
|
|
1124
|
+
topk_indices_buffer = None
|
|
1125
|
+
|
|
1126
|
+
if get_pp_group().is_first_rank:
|
|
1127
|
+
self.embed_tokens = VocabParallelEmbedding(
|
|
1128
|
+
config.vocab_size,
|
|
1129
|
+
config.hidden_size,
|
|
1130
|
+
quant_config=quant_config,
|
|
1131
|
+
prefix=f"{prefix}.embed_tokens")
|
|
1132
|
+
else:
|
|
1133
|
+
self.embed_tokens = PPMissingLayer()
|
|
1134
|
+
|
|
1135
|
+
self.start_layer, self.end_layer, self.layers = make_layers(
|
|
1136
|
+
config.num_hidden_layers,
|
|
1137
|
+
lambda prefix: DeepseekV2DecoderLayer(vllm_config, prefix,
|
|
1138
|
+
topk_indices_buffer),
|
|
1139
|
+
prefix=f"{prefix}.layers")
|
|
1140
|
+
|
|
1141
|
+
if get_pp_group().is_last_rank:
|
|
1142
|
+
self.norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
|
1143
|
+
else:
|
|
1144
|
+
self.norm = PPMissingLayer()
|
|
1145
|
+
self.make_empty_intermediate_tensors = (
|
|
1146
|
+
make_empty_intermediate_tensors_factory(
|
|
1147
|
+
["hidden_states", "residual"], config.hidden_size))
|
|
1148
|
+
|
|
1149
|
+
def get_input_embeddings(self, input_ids: torch.Tensor) -> torch.Tensor:
|
|
1150
|
+
return self.embed_tokens(input_ids)
|
|
1151
|
+
|
|
1152
|
+
def forward(
|
|
1153
|
+
self,
|
|
1154
|
+
input_ids: torch.Tensor,
|
|
1155
|
+
positions: torch.Tensor,
|
|
1156
|
+
intermediate_tensors: Optional[IntermediateTensors],
|
|
1157
|
+
inputs_embeds: Optional[torch.Tensor] = None,
|
|
1158
|
+
) -> Union[torch.Tensor, IntermediateTensors]:
|
|
1159
|
+
if get_pp_group().is_first_rank:
|
|
1160
|
+
if inputs_embeds is not None:
|
|
1161
|
+
hidden_states = inputs_embeds
|
|
1162
|
+
else:
|
|
1163
|
+
hidden_states = self.get_input_embeddings(input_ids)
|
|
1164
|
+
residual = None
|
|
1165
|
+
else:
|
|
1166
|
+
assert intermediate_tensors is not None
|
|
1167
|
+
hidden_states = intermediate_tensors["hidden_states"]
|
|
1168
|
+
residual = intermediate_tensors["residual"]
|
|
1169
|
+
|
|
1170
|
+
for layer in islice(self.layers, self.start_layer, self.end_layer):
|
|
1171
|
+
hidden_states, residual = layer(positions, hidden_states, residual)
|
|
1172
|
+
|
|
1173
|
+
if not get_pp_group().is_last_rank:
|
|
1174
|
+
return IntermediateTensors({
|
|
1175
|
+
"hidden_states": hidden_states,
|
|
1176
|
+
"residual": residual
|
|
1177
|
+
})
|
|
1178
|
+
|
|
1179
|
+
hidden_states, _ = self.norm(hidden_states, residual)
|
|
1180
|
+
return hidden_states
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
class DeepseekV2ForCausalLM(nn.Module, SupportsPP, MixtureOfExperts,
|
|
1184
|
+
SupportsLoRA):
|
|
1185
|
+
packed_modules_mapping = {
|
|
1186
|
+
"gate_up_proj": ["gate_proj", "up_proj"],
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
|
1190
|
+
super().__init__()
|
|
1191
|
+
config = vllm_config.model_config.hf_config
|
|
1192
|
+
quant_config = vllm_config.quant_config
|
|
1193
|
+
self.config = config
|
|
1194
|
+
self.quant_config = quant_config
|
|
1195
|
+
|
|
1196
|
+
# `packed_modules_mapping` needs to be modified before
|
|
1197
|
+
# initializing DeepseekV2Model, as it is passed inplace to
|
|
1198
|
+
# quantization config init and may be used to select the
|
|
1199
|
+
# quant_method for relevant layers during initialization.
|
|
1200
|
+
self.fuse_qkv_a_proj = hasattr(
|
|
1201
|
+
config, "q_lora_rank") and config.q_lora_rank is not None
|
|
1202
|
+
if self.fuse_qkv_a_proj:
|
|
1203
|
+
self.packed_modules_mapping["fused_qkv_a_proj"] = [
|
|
1204
|
+
"q_a_proj",
|
|
1205
|
+
"kv_a_proj_with_mqa",
|
|
1206
|
+
]
|
|
1207
|
+
|
|
1208
|
+
self.model = DeepseekV2Model(vllm_config=vllm_config,
|
|
1209
|
+
prefix=maybe_prefix(prefix, "model"))
|
|
1210
|
+
if get_pp_group().is_last_rank:
|
|
1211
|
+
self.lm_head = ParallelLMHead(
|
|
1212
|
+
config.vocab_size,
|
|
1213
|
+
config.hidden_size,
|
|
1214
|
+
quant_config=quant_config,
|
|
1215
|
+
prefix=maybe_prefix(prefix, "lm_head"),
|
|
1216
|
+
)
|
|
1217
|
+
else:
|
|
1218
|
+
self.lm_head = PPMissingLayer()
|
|
1219
|
+
self.logits_processor = LogitsProcessor(config.vocab_size)
|
|
1220
|
+
self.make_empty_intermediate_tensors = (
|
|
1221
|
+
self.model.make_empty_intermediate_tensors)
|
|
1222
|
+
self.expert_weights = []
|
|
1223
|
+
|
|
1224
|
+
# Set MoE hyperparameters
|
|
1225
|
+
self.num_moe_layers = (config.num_hidden_layers -
|
|
1226
|
+
config.first_k_dense_replace)
|
|
1227
|
+
self.num_expert_groups = config.n_group
|
|
1228
|
+
|
|
1229
|
+
self.moe_layers: list[FusedMoE] = []
|
|
1230
|
+
example_moe = None
|
|
1231
|
+
for layer in self.model.layers:
|
|
1232
|
+
if isinstance(layer, PPMissingLayer):
|
|
1233
|
+
continue
|
|
1234
|
+
|
|
1235
|
+
assert isinstance(layer, DeepseekV2DecoderLayer)
|
|
1236
|
+
if isinstance(layer.mlp, DeepseekV2MoE):
|
|
1237
|
+
# Pick last one layer since the first ones may be dense layers.
|
|
1238
|
+
example_moe = layer.mlp
|
|
1239
|
+
self.moe_layers.append(layer.mlp.experts)
|
|
1240
|
+
|
|
1241
|
+
if example_moe is None:
|
|
1242
|
+
raise RuntimeError("No DeepseekV2MoE layer found in model.layers.")
|
|
1243
|
+
|
|
1244
|
+
self.num_logical_experts = example_moe.n_logical_experts
|
|
1245
|
+
self.num_physical_experts = example_moe.n_physical_experts
|
|
1246
|
+
self.num_local_physical_experts = example_moe.n_local_physical_experts
|
|
1247
|
+
self.num_routed_experts = example_moe.n_routed_experts
|
|
1248
|
+
self.num_shared_experts = example_moe.n_shared_experts
|
|
1249
|
+
self.num_redundant_experts = example_moe.n_redundant_experts
|
|
1250
|
+
|
|
1251
|
+
def set_eplb_state(
|
|
1252
|
+
self,
|
|
1253
|
+
expert_load_view: torch.Tensor,
|
|
1254
|
+
logical_to_physical_map: torch.Tensor,
|
|
1255
|
+
logical_replica_count: torch.Tensor,
|
|
1256
|
+
) -> None:
|
|
1257
|
+
for layer_idx, layer in enumerate(self.moe_layers):
|
|
1258
|
+
# Register the expert weights.
|
|
1259
|
+
self.expert_weights.append(layer.get_expert_weights())
|
|
1260
|
+
layer.set_eplb_state(
|
|
1261
|
+
moe_layer_idx=layer_idx,
|
|
1262
|
+
expert_load_view=expert_load_view,
|
|
1263
|
+
logical_to_physical_map=logical_to_physical_map,
|
|
1264
|
+
logical_replica_count=logical_replica_count,
|
|
1265
|
+
)
|
|
1266
|
+
|
|
1267
|
+
def update_physical_experts_metadata(
|
|
1268
|
+
self,
|
|
1269
|
+
num_physical_experts: int,
|
|
1270
|
+
num_local_physical_experts: int,
|
|
1271
|
+
) -> None:
|
|
1272
|
+
assert self.num_local_physical_experts == num_local_physical_experts
|
|
1273
|
+
self.num_physical_experts = num_physical_experts
|
|
1274
|
+
self.num_local_physical_experts = num_local_physical_experts
|
|
1275
|
+
self.num_redundant_experts = (num_physical_experts -
|
|
1276
|
+
self.num_logical_experts)
|
|
1277
|
+
for layer in self.model.layers:
|
|
1278
|
+
if isinstance(layer.mlp, DeepseekV2MoE):
|
|
1279
|
+
moe = layer.mlp
|
|
1280
|
+
moe.n_local_physical_experts = num_local_physical_experts
|
|
1281
|
+
moe.n_physical_experts = num_physical_experts
|
|
1282
|
+
moe.n_redundant_experts = self.num_redundant_experts
|
|
1283
|
+
moe.experts.update_expert_map()
|
|
1284
|
+
|
|
1285
|
+
def get_input_embeddings(self, input_ids: torch.Tensor) -> torch.Tensor:
|
|
1286
|
+
return self.model.get_input_embeddings(input_ids)
|
|
1287
|
+
|
|
1288
|
+
def forward(
|
|
1289
|
+
self,
|
|
1290
|
+
input_ids: torch.Tensor,
|
|
1291
|
+
positions: torch.Tensor,
|
|
1292
|
+
intermediate_tensors: Optional[IntermediateTensors] = None,
|
|
1293
|
+
inputs_embeds: Optional[torch.Tensor] = None,
|
|
1294
|
+
) -> Union[torch.Tensor, IntermediateTensors]:
|
|
1295
|
+
hidden_states = self.model(input_ids, positions, intermediate_tensors,
|
|
1296
|
+
inputs_embeds)
|
|
1297
|
+
return hidden_states
|
|
1298
|
+
|
|
1299
|
+
def compute_logits(
|
|
1300
|
+
self,
|
|
1301
|
+
hidden_states: torch.Tensor,
|
|
1302
|
+
) -> Optional[torch.Tensor]:
|
|
1303
|
+
logits = self.logits_processor(self.lm_head, hidden_states)
|
|
1304
|
+
return logits
|
|
1305
|
+
|
|
1306
|
+
def load_weights(self, weights: Iterable[tuple[str,
|
|
1307
|
+
torch.Tensor]]) -> set[str]:
|
|
1308
|
+
stacked_params_mapping = [
|
|
1309
|
+
# (param_name, shard_name, shard_id)
|
|
1310
|
+
("gate_up_proj", "gate_proj", 0),
|
|
1311
|
+
("gate_up_proj", "up_proj", 1),
|
|
1312
|
+
("fused_qkv_a_proj", "q_a_proj", 0),
|
|
1313
|
+
("fused_qkv_a_proj", "kv_a_proj_with_mqa", 1),
|
|
1314
|
+
]
|
|
1315
|
+
|
|
1316
|
+
# Params for weights, fp8 weight scales, fp8 activation scales
|
|
1317
|
+
# (param_name, weight_name, expert_id, shard_id)
|
|
1318
|
+
expert_params_mapping = FusedMoE.make_expert_params_mapping(
|
|
1319
|
+
ckpt_gate_proj_name="gate_proj",
|
|
1320
|
+
ckpt_down_proj_name="down_proj",
|
|
1321
|
+
ckpt_up_proj_name="up_proj",
|
|
1322
|
+
num_experts=self.config.n_routed_experts,
|
|
1323
|
+
num_redundant_experts=self.num_redundant_experts)
|
|
1324
|
+
|
|
1325
|
+
params_dict = dict(self.named_parameters())
|
|
1326
|
+
loaded_params: set[str] = set()
|
|
1327
|
+
for name, loaded_weight in weights:
|
|
1328
|
+
if "rotary_emb.inv_freq" in name:
|
|
1329
|
+
continue
|
|
1330
|
+
|
|
1331
|
+
spec_layer = get_spec_layer_idx_from_weight_name(self.config, name)
|
|
1332
|
+
if spec_layer is not None:
|
|
1333
|
+
continue # skip spec decode layers for main model
|
|
1334
|
+
|
|
1335
|
+
for (param_name, weight_name, shard_id) in stacked_params_mapping:
|
|
1336
|
+
# Skip non-stacked layers and experts (experts handled below).
|
|
1337
|
+
if weight_name not in name:
|
|
1338
|
+
continue
|
|
1339
|
+
# We have mlp.experts[0].gate_proj in the checkpoint.
|
|
1340
|
+
# Since we handle the experts below in expert_params_mapping,
|
|
1341
|
+
# we need to skip here BEFORE we update the name, otherwise
|
|
1342
|
+
# name will be updated to mlp.experts[0].gate_up_proj, which
|
|
1343
|
+
# will then be updated below in expert_params_mapping
|
|
1344
|
+
# for mlp.experts[0].gate_gate_up_proj, which breaks load.
|
|
1345
|
+
if (("mlp.experts." in name) and name not in params_dict):
|
|
1346
|
+
continue
|
|
1347
|
+
name_mapped = name.replace(weight_name, param_name)
|
|
1348
|
+
|
|
1349
|
+
# QKV fusion is optional, fall back to normal
|
|
1350
|
+
# weight loading if it's not enabled
|
|
1351
|
+
# if go with fusion option, then update name
|
|
1352
|
+
if ((param_name == "fused_qkv_a_proj")
|
|
1353
|
+
and name_mapped not in params_dict):
|
|
1354
|
+
continue
|
|
1355
|
+
else:
|
|
1356
|
+
name = name_mapped
|
|
1357
|
+
# Skip loading extra bias for GPTQ models.
|
|
1358
|
+
if name.endswith(".bias") and name not in params_dict:
|
|
1359
|
+
continue
|
|
1360
|
+
|
|
1361
|
+
if is_pp_missing_parameter(name, self):
|
|
1362
|
+
continue
|
|
1363
|
+
|
|
1364
|
+
param = params_dict[name]
|
|
1365
|
+
weight_loader = param.weight_loader
|
|
1366
|
+
weight_loader(param, loaded_weight, shard_id)
|
|
1367
|
+
break
|
|
1368
|
+
else:
|
|
1369
|
+
is_expert_weight = False
|
|
1370
|
+
for mapping in expert_params_mapping:
|
|
1371
|
+
param_name, weight_name, expert_id, shard_id = mapping
|
|
1372
|
+
if weight_name not in name:
|
|
1373
|
+
continue
|
|
1374
|
+
|
|
1375
|
+
# Anyway, this is an expert weight and should not be
|
|
1376
|
+
# attempted to load as other weights later
|
|
1377
|
+
is_expert_weight = True
|
|
1378
|
+
|
|
1379
|
+
# Do not modify `name` since the loop may continue here
|
|
1380
|
+
# Instead, create a new variable
|
|
1381
|
+
name_mapped = name.replace(weight_name, param_name)
|
|
1382
|
+
|
|
1383
|
+
if is_pp_missing_parameter(name_mapped, self):
|
|
1384
|
+
continue
|
|
1385
|
+
|
|
1386
|
+
param = params_dict[name_mapped]
|
|
1387
|
+
# We should ask the weight loader to return success or not
|
|
1388
|
+
# here since otherwise we may skip experts with other
|
|
1389
|
+
# available replicas.
|
|
1390
|
+
weight_loader = typing.cast(Callable[..., bool],
|
|
1391
|
+
param.weight_loader)
|
|
1392
|
+
success = weight_loader(param,
|
|
1393
|
+
loaded_weight,
|
|
1394
|
+
name_mapped,
|
|
1395
|
+
shard_id=shard_id,
|
|
1396
|
+
expert_id=expert_id,
|
|
1397
|
+
return_success=True)
|
|
1398
|
+
if success:
|
|
1399
|
+
name = name_mapped
|
|
1400
|
+
break
|
|
1401
|
+
else:
|
|
1402
|
+
if is_expert_weight:
|
|
1403
|
+
# We've checked that this is an expert weight
|
|
1404
|
+
# However it's not mapped locally to this rank
|
|
1405
|
+
# So we simply skip it
|
|
1406
|
+
continue
|
|
1407
|
+
|
|
1408
|
+
# Skip loading extra bias for GPTQ models.
|
|
1409
|
+
if name.endswith(".bias") and name not in params_dict:
|
|
1410
|
+
continue
|
|
1411
|
+
|
|
1412
|
+
# Remapping the name of FP8 kv-scale.
|
|
1413
|
+
name = maybe_remap_kv_scale_name(name, params_dict)
|
|
1414
|
+
if name is None:
|
|
1415
|
+
continue
|
|
1416
|
+
|
|
1417
|
+
if is_pp_missing_parameter(name, self):
|
|
1418
|
+
continue
|
|
1419
|
+
|
|
1420
|
+
param = params_dict[name]
|
|
1421
|
+
weight_loader = getattr(param, "weight_loader",
|
|
1422
|
+
default_weight_loader)
|
|
1423
|
+
weight_loader(param, loaded_weight)
|
|
1424
|
+
loaded_params.add(name)
|
|
1425
|
+
|
|
1426
|
+
return loaded_params
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
class DeepseekV3ForCausalLM(DeepseekV2ForCausalLM):
|
|
1430
|
+
pass
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
# Compatibility with
|
|
1434
|
+
# https://huggingface.co/deepseek-ai/DeepSeek-V3-Base/blob/main/configuration_deepseek.py
|
|
1435
|
+
def get_spec_layer_idx_from_weight_name(config: Union[DeepseekV2Config,
|
|
1436
|
+
DeepseekV3Config],
|
|
1437
|
+
weight_name: str) -> Optional[int]:
|
|
1438
|
+
if (hasattr(config, "num_nextn_predict_layers")
|
|
1439
|
+
and config.num_nextn_predict_layers > 0):
|
|
1440
|
+
layer_idx = config.num_hidden_layers
|
|
1441
|
+
for i in range(config.num_nextn_predict_layers):
|
|
1442
|
+
if weight_name.startswith(f"model.layers.{layer_idx+i}."):
|
|
1443
|
+
return layer_idx + i
|
|
1444
|
+
return None
|