vllm-cpu 0.8.5.post2__cp310-cp310-manylinux_2_17_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vllm-cpu might be problematic. Click here for more details.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +170 -0
- vllm/_custom_ops.py +1536 -0
- vllm/_ipex_ops.py +241 -0
- vllm/_version.py +34 -0
- vllm/adapter_commons/__init__.py +0 -0
- vllm/adapter_commons/layers.py +16 -0
- vllm/adapter_commons/models.py +105 -0
- vllm/adapter_commons/request.py +25 -0
- vllm/adapter_commons/utils.py +92 -0
- vllm/adapter_commons/worker_manager.py +38 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +38 -0
- vllm/assets/base.py +40 -0
- vllm/assets/image.py +31 -0
- vllm/assets/video.py +103 -0
- vllm/attention/__init__.py +19 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +306 -0
- vllm/attention/backends/blocksparse_attn.py +457 -0
- vllm/attention/backends/cpu_mla.py +303 -0
- vllm/attention/backends/flash_attn.py +999 -0
- vllm/attention/backends/flashinfer.py +1092 -0
- vllm/attention/backends/flashmla.py +242 -0
- vllm/attention/backends/hpu_attn.py +301 -0
- vllm/attention/backends/ipex_attn.py +396 -0
- vllm/attention/backends/mla/__init__.py +0 -0
- vllm/attention/backends/mla/common.py +1444 -0
- vllm/attention/backends/pallas.py +346 -0
- vllm/attention/backends/placeholder_attn.py +399 -0
- vllm/attention/backends/rocm_aiter_mla.py +412 -0
- vllm/attention/backends/rocm_flash_attn.py +969 -0
- vllm/attention/backends/torch_sdpa.py +691 -0
- vllm/attention/backends/triton_mla.py +113 -0
- vllm/attention/backends/utils.py +609 -0
- vllm/attention/backends/xformers.py +798 -0
- vllm/attention/layer.py +443 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/blocksparse_attention/__init__.py +0 -0
- vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py +432 -0
- vllm/attention/ops/blocksparse_attention/interface.py +238 -0
- vllm/attention/ops/blocksparse_attention/utils.py +244 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +366 -0
- vllm/attention/ops/flashmla.py +115 -0
- vllm/attention/ops/hpu_paged_attn.py +105 -0
- vllm/attention/ops/ipex_attn.py +193 -0
- vllm/attention/ops/merge_attn_states.py +42 -0
- vllm/attention/ops/nki_flash_attn.py +905 -0
- vllm/attention/ops/paged_attn.py +255 -0
- vllm/attention/ops/prefix_prefill.py +902 -0
- vllm/attention/ops/rocm_aiter_mla.py +42 -0
- vllm/attention/ops/rocm_aiter_paged_attn.py +101 -0
- vllm/attention/ops/triton_decode_attention.py +675 -0
- vllm/attention/ops/triton_flash_attention.py +1375 -0
- vllm/attention/ops/triton_merge_attn_states.py +96 -0
- vllm/attention/selector.py +186 -0
- vllm/attention/utils/fa_utils.py +54 -0
- vllm/beam_search.py +82 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +831 -0
- vllm/benchmarks/endpoint_request_func.py +160 -0
- vllm/benchmarks/latency.py +181 -0
- vllm/benchmarks/serve.py +925 -0
- vllm/benchmarks/throughput.py +608 -0
- vllm/benchmarks/utils.py +69 -0
- vllm/collect_env.py +795 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/backends.py +715 -0
- vllm/compilation/compiler_interface.py +437 -0
- vllm/compilation/counter.py +33 -0
- vllm/compilation/decorators.py +249 -0
- vllm/compilation/fix_functionalization.py +182 -0
- vllm/compilation/fusion.py +617 -0
- vllm/compilation/fx_utils.py +60 -0
- vllm/compilation/inductor_pass.py +114 -0
- vllm/compilation/monitor.py +38 -0
- vllm/compilation/multi_output_match.py +108 -0
- vllm/compilation/noop_elimination.py +135 -0
- vllm/compilation/pass_manager.py +74 -0
- vllm/compilation/sequence_parallelism.py +266 -0
- vllm/compilation/torch25_custom_graph_pass.py +41 -0
- vllm/compilation/vllm_inductor_pass.py +68 -0
- vllm/compilation/wrapper.py +129 -0
- vllm/config.py +4179 -0
- vllm/connections.py +170 -0
- vllm/core/__init__.py +0 -0
- vllm/core/block/__init__.py +0 -0
- vllm/core/block/block_table.py +398 -0
- vllm/core/block/common.py +370 -0
- vllm/core/block/cpu_gpu_block_allocator.py +440 -0
- vllm/core/block/interfaces.py +318 -0
- vllm/core/block/naive_block.py +465 -0
- vllm/core/block/prefix_caching_block.py +1134 -0
- vllm/core/block/utils.py +27 -0
- vllm/core/block_manager.py +520 -0
- vllm/core/evictor.py +156 -0
- vllm/core/interfaces.py +134 -0
- vllm/core/placeholder_block_space_manager.py +99 -0
- vllm/core/scheduler.py +2060 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +280 -0
- vllm/distributed/__init__.py +5 -0
- vllm/distributed/communication_op.py +40 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/base_device_communicator.py +151 -0
- vllm/distributed/device_communicators/cpu_communicator.py +139 -0
- vllm/distributed/device_communicators/cuda_communicator.py +131 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +179 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +301 -0
- vllm/distributed/device_communicators/custom_all_reduce_utils.py +257 -0
- vllm/distributed/device_communicators/hpu_communicator.py +45 -0
- vllm/distributed/device_communicators/neuron_communicator.py +19 -0
- vllm/distributed/device_communicators/pynccl.py +217 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +340 -0
- vllm/distributed/device_communicators/shm_broadcast.py +557 -0
- vllm/distributed/device_communicators/tpu_communicator.py +93 -0
- vllm/distributed/device_communicators/xpu_communicator.py +54 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +11 -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 +127 -0
- vllm/distributed/kv_transfer/kv_connector/factory.py +107 -0
- vllm/distributed/kv_transfer/kv_connector/lmcache_connector.py +98 -0
- vllm/distributed/kv_transfer/kv_connector/mooncake_store_connector.py +201 -0
- vllm/distributed/kv_transfer/kv_connector/simple_connector.py +328 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +90 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +8 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +209 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +131 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +383 -0
- vllm/distributed/kv_transfer/kv_connector_agent.py +76 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +174 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +160 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +236 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +66 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +279 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +279 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +70 -0
- vllm/distributed/parallel_state.py +1209 -0
- vllm/distributed/utils.py +366 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +1724 -0
- vllm/engine/async_llm_engine.py +1261 -0
- vllm/engine/async_timeout.py +191 -0
- vllm/engine/llm_engine.py +2150 -0
- vllm/engine/metrics.py +717 -0
- vllm/engine/metrics_types.py +96 -0
- vllm/engine/multiprocessing/__init__.py +183 -0
- vllm/engine/multiprocessing/client.py +745 -0
- vllm/engine/multiprocessing/engine.py +450 -0
- vllm/engine/output_processor/__init__.py +0 -0
- vllm/engine/output_processor/interfaces.py +74 -0
- vllm/engine/output_processor/multi_step.py +210 -0
- vllm/engine/output_processor/single_step.py +136 -0
- vllm/engine/output_processor/stop_checker.py +130 -0
- vllm/engine/output_processor/util.py +27 -0
- vllm/engine/protocol.py +302 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/api_server.py +177 -0
- vllm/entrypoints/chat_utils.py +1259 -0
- vllm/entrypoints/cli/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/base.py +38 -0
- vllm/entrypoints/cli/benchmark/latency.py +29 -0
- vllm/entrypoints/cli/benchmark/main.py +53 -0
- vllm/entrypoints/cli/benchmark/serve.py +29 -0
- vllm/entrypoints/cli/benchmark/throughput.py +29 -0
- vllm/entrypoints/cli/collect_env.py +35 -0
- vllm/entrypoints/cli/main.py +59 -0
- vllm/entrypoints/cli/openai.py +175 -0
- vllm/entrypoints/cli/serve.py +59 -0
- vllm/entrypoints/cli/types.py +24 -0
- vllm/entrypoints/launcher.py +146 -0
- vllm/entrypoints/llm.py +1450 -0
- vllm/entrypoints/logger.py +44 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +1130 -0
- vllm/entrypoints/openai/cli_args.py +296 -0
- vllm/entrypoints/openai/logits_processors.py +89 -0
- vllm/entrypoints/openai/protocol.py +1806 -0
- vllm/entrypoints/openai/run_batch.py +439 -0
- vllm/entrypoints/openai/serving_chat.py +1210 -0
- vllm/entrypoints/openai/serving_completion.py +557 -0
- vllm/entrypoints/openai/serving_embedding.py +245 -0
- vllm/entrypoints/openai/serving_engine.py +569 -0
- vllm/entrypoints/openai/serving_models.py +314 -0
- vllm/entrypoints/openai/serving_pooling.py +237 -0
- vllm/entrypoints/openai/serving_score.py +439 -0
- vllm/entrypoints/openai/serving_tokenization.py +147 -0
- vllm/entrypoints/openai/serving_transcription.py +421 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +19 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +163 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +254 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +232 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +370 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +211 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +303 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +262 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +342 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +110 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +292 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +123 -0
- vllm/entrypoints/score_utils.py +49 -0
- vllm/entrypoints/ssl.py +74 -0
- vllm/entrypoints/utils.py +136 -0
- vllm/env_override.py +34 -0
- vllm/envs.py +800 -0
- vllm/executor/__init__.py +0 -0
- vllm/executor/executor_base.py +400 -0
- vllm/executor/mp_distributed_executor.py +243 -0
- vllm/executor/msgspec_utils.py +29 -0
- vllm/executor/multiproc_worker_utils.py +312 -0
- vllm/executor/ray_distributed_executor.py +700 -0
- vllm/executor/ray_utils.py +400 -0
- vllm/executor/uniproc_executor.py +141 -0
- vllm/forward_context.py +159 -0
- vllm/inputs/__init__.py +37 -0
- vllm/inputs/data.py +248 -0
- vllm/inputs/parse.py +121 -0
- vllm/inputs/preprocess.py +745 -0
- vllm/inputs/registry.py +212 -0
- vllm/jsontree.py +79 -0
- vllm/logger.py +210 -0
- vllm/logging_utils/__init__.py +7 -0
- vllm/logging_utils/formatter.py +17 -0
- vllm/logits_process.py +121 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/fully_sharded_layers.py +335 -0
- vllm/lora/layers.py +1263 -0
- vllm/lora/lora.py +198 -0
- vllm/lora/models.py +802 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/torch_ops/__init__.py +15 -0
- vllm/lora/ops/torch_ops/lora_ops.py +115 -0
- vllm/lora/ops/triton_ops/__init__.py +11 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +243 -0
- vllm/lora/ops/triton_ops/lora_expand.py +293 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +147 -0
- vllm/lora/ops/triton_ops/lora_shrink.py +247 -0
- vllm/lora/ops/triton_ops/utils.py +121 -0
- vllm/lora/peft_helper.py +115 -0
- vllm/lora/punica_wrapper/__init__.py +9 -0
- vllm/lora/punica_wrapper/punica_base.py +483 -0
- vllm/lora/punica_wrapper/punica_cpu.py +348 -0
- vllm/lora/punica_wrapper/punica_gpu.py +289 -0
- vllm/lora/punica_wrapper/punica_hpu.py +144 -0
- vllm/lora/punica_wrapper/punica_selector.py +20 -0
- vllm/lora/punica_wrapper/utils.py +161 -0
- vllm/lora/request.py +97 -0
- vllm/lora/resolver.py +83 -0
- vllm/lora/utils.py +237 -0
- vllm/lora/worker_manager.py +251 -0
- vllm/model_executor/__init__.py +15 -0
- vllm/model_executor/custom_op.py +153 -0
- vllm/model_executor/guided_decoding/__init__.py +180 -0
- vllm/model_executor/guided_decoding/guidance_decoding.py +63 -0
- vllm/model_executor/guided_decoding/guidance_logits_processors.py +85 -0
- vllm/model_executor/guided_decoding/guided_fields.py +42 -0
- vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py +66 -0
- vllm/model_executor/guided_decoding/outlines_decoding.py +154 -0
- vllm/model_executor/guided_decoding/outlines_logits_processors.py +271 -0
- vllm/model_executor/guided_decoding/reasoner/__init__.py +35 -0
- vllm/model_executor/guided_decoding/utils.py +241 -0
- vllm/model_executor/guided_decoding/xgrammar_decoding.py +425 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +368 -0
- vllm/model_executor/layers/fused_moe/__init__.py +51 -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=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.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=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.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/README +12 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +180 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +294 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +374 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +1539 -0
- vllm/model_executor/layers/fused_moe/layer.py +949 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +243 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +64 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +59 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +416 -0
- vllm/model_executor/layers/fused_moe/utils.py +48 -0
- vllm/model_executor/layers/layernorm.py +277 -0
- vllm/model_executor/layers/lightning_attn.py +651 -0
- vllm/model_executor/layers/linear.py +1518 -0
- vllm/model_executor/layers/logits_processor.py +196 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/mamba2_metadata.py +109 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +244 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +538 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +104 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +415 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +261 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +588 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +750 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +231 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +205 -0
- vllm/model_executor/layers/pooler.py +336 -0
- vllm/model_executor/layers/quantization/__init__.py +153 -0
- vllm/model_executor/layers/quantization/aqlm.py +374 -0
- vllm/model_executor/layers/quantization/awq.py +184 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +518 -0
- vllm/model_executor/layers/quantization/awq_triton.py +319 -0
- vllm/model_executor/layers/quantization/base_config.py +145 -0
- vllm/model_executor/layers/quantization/bitblas.py +459 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +396 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +624 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +1100 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +20 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +357 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +54 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +159 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +119 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +149 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +110 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +200 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +205 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +213 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +193 -0
- vllm/model_executor/layers/quantization/experts_int8.py +194 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +168 -0
- vllm/model_executor/layers/quantization/fp8.py +832 -0
- vllm/model_executor/layers/quantization/gguf.py +408 -0
- vllm/model_executor/layers/quantization/gptq.py +276 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +438 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +643 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +295 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +328 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +250 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +89 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +82 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +115 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +299 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +142 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +119 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +132 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +66 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +86 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +119 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +136 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +40 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +104 -0
- vllm/model_executor/layers/quantization/kv_cache.py +137 -0
- vllm/model_executor/layers/quantization/marlin.py +259 -0
- vllm/model_executor/layers/quantization/modelopt.py +410 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +447 -0
- vllm/model_executor/layers/quantization/neuron_quant.py +67 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +125 -0
- vllm/model_executor/layers/quantization/qqq.py +273 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +385 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +236 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +7 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +54 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +142 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +121 -0
- vllm/model_executor/layers/quantization/quark/utils.py +102 -0
- vllm/model_executor/layers/quantization/schema.py +85 -0
- vllm/model_executor/layers/quantization/torchao.py +127 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +119 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +5 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +51 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +198 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +18 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +523 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +94 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +459 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +39 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +32 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +413 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +110 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +164 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +464 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py +127 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +571 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +404 -0
- vllm/model_executor/layers/rejection_sampler.py +400 -0
- vllm/model_executor/layers/resampler.py +269 -0
- vllm/model_executor/layers/rotary_embedding.py +1598 -0
- vllm/model_executor/layers/sampler.py +1221 -0
- vllm/model_executor/layers/spec_decode_base_sampler.py +258 -0
- vllm/model_executor/layers/typical_acceptance_sampler.py +172 -0
- vllm/model_executor/layers/utils.py +99 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +485 -0
- vllm/model_executor/model_loader/__init__.py +20 -0
- vllm/model_executor/model_loader/loader.py +1542 -0
- vllm/model_executor/model_loader/neuron.py +243 -0
- vllm/model_executor/model_loader/tensorizer.py +468 -0
- vllm/model_executor/model_loader/utils.py +171 -0
- vllm/model_executor/model_loader/weight_utils.py +749 -0
- vllm/model_executor/models/__init__.py +27 -0
- vllm/model_executor/models/adapters.py +247 -0
- vllm/model_executor/models/arctic.py +559 -0
- vllm/model_executor/models/aria.py +656 -0
- vllm/model_executor/models/aya_vision.py +461 -0
- vllm/model_executor/models/baichuan.py +469 -0
- vllm/model_executor/models/bamba.py +542 -0
- vllm/model_executor/models/bart.py +936 -0
- vllm/model_executor/models/bert.py +725 -0
- vllm/model_executor/models/blip.py +337 -0
- vllm/model_executor/models/blip2.py +717 -0
- vllm/model_executor/models/bloom.py +358 -0
- vllm/model_executor/models/chameleon.py +1135 -0
- vllm/model_executor/models/chatglm.py +476 -0
- vllm/model_executor/models/clip.py +410 -0
- vllm/model_executor/models/commandr.py +466 -0
- vllm/model_executor/models/constant_size_cache.py +136 -0
- vllm/model_executor/models/dbrx.py +469 -0
- vllm/model_executor/models/deepseek.py +484 -0
- vllm/model_executor/models/deepseek_mtp.py +266 -0
- vllm/model_executor/models/deepseek_v2.py +830 -0
- vllm/model_executor/models/deepseek_vl2.py +647 -0
- vllm/model_executor/models/eagle.py +247 -0
- vllm/model_executor/models/exaone.py +548 -0
- vllm/model_executor/models/fairseq2_llama.py +153 -0
- vllm/model_executor/models/falcon.py +508 -0
- vllm/model_executor/models/florence2.py +1102 -0
- vllm/model_executor/models/fuyu.py +388 -0
- vllm/model_executor/models/gemma.py +423 -0
- vllm/model_executor/models/gemma2.py +423 -0
- vllm/model_executor/models/gemma3.py +531 -0
- vllm/model_executor/models/gemma3_mm.py +716 -0
- vllm/model_executor/models/glm.py +22 -0
- vllm/model_executor/models/glm4.py +303 -0
- vllm/model_executor/models/glm4v.py +647 -0
- vllm/model_executor/models/gpt2.py +313 -0
- vllm/model_executor/models/gpt_bigcode.py +336 -0
- vllm/model_executor/models/gpt_j.py +337 -0
- vllm/model_executor/models/gpt_neox.py +330 -0
- vllm/model_executor/models/granite.py +494 -0
- vllm/model_executor/models/granite_speech.py +777 -0
- vllm/model_executor/models/granitemoe.py +435 -0
- vllm/model_executor/models/granitemoeshared.py +339 -0
- vllm/model_executor/models/gritlm.py +245 -0
- vllm/model_executor/models/grok1.py +560 -0
- vllm/model_executor/models/h2ovl.py +542 -0
- vllm/model_executor/models/idefics2_vision_model.py +387 -0
- vllm/model_executor/models/idefics3.py +767 -0
- vllm/model_executor/models/interfaces.py +569 -0
- vllm/model_executor/models/interfaces_base.py +163 -0
- vllm/model_executor/models/intern_vit.py +476 -0
- vllm/model_executor/models/internlm2.py +453 -0
- vllm/model_executor/models/internlm2_ve.py +146 -0
- vllm/model_executor/models/internvl.py +945 -0
- vllm/model_executor/models/jais.py +371 -0
- vllm/model_executor/models/jamba.py +590 -0
- vllm/model_executor/models/kimi_vl.py +577 -0
- vllm/model_executor/models/llama.py +619 -0
- vllm/model_executor/models/llama4.py +530 -0
- vllm/model_executor/models/llama_eagle.py +152 -0
- vllm/model_executor/models/llama_eagle3.py +232 -0
- vllm/model_executor/models/llava.py +869 -0
- vllm/model_executor/models/llava_next.py +582 -0
- vllm/model_executor/models/llava_next_video.py +470 -0
- vllm/model_executor/models/llava_onevision.py +954 -0
- vllm/model_executor/models/mamba.py +271 -0
- vllm/model_executor/models/mamba2.py +302 -0
- vllm/model_executor/models/mamba_cache.py +76 -0
- vllm/model_executor/models/medusa.py +210 -0
- vllm/model_executor/models/minicpm.py +592 -0
- vllm/model_executor/models/minicpm3.py +229 -0
- vllm/model_executor/models/minicpmo.py +725 -0
- vllm/model_executor/models/minicpmv.py +1287 -0
- vllm/model_executor/models/minimax_cache.py +35 -0
- vllm/model_executor/models/minimax_text_01.py +1261 -0
- vllm/model_executor/models/mistral3.py +598 -0
- vllm/model_executor/models/mixtral.py +485 -0
- vllm/model_executor/models/mixtral_quant.py +447 -0
- vllm/model_executor/models/mllama.py +1623 -0
- vllm/model_executor/models/mllama4.py +838 -0
- vllm/model_executor/models/mlp_speculator.py +205 -0
- vllm/model_executor/models/modernbert.py +325 -0
- vllm/model_executor/models/module_mapping.py +71 -0
- vllm/model_executor/models/molmo.py +1567 -0
- vllm/model_executor/models/moonvit.py +628 -0
- vllm/model_executor/models/mpt.py +329 -0
- vllm/model_executor/models/nemotron.py +506 -0
- vllm/model_executor/models/nemotron_nas.py +446 -0
- vllm/model_executor/models/nvlm_d.py +212 -0
- vllm/model_executor/models/olmo.py +390 -0
- vllm/model_executor/models/olmo2.py +412 -0
- vllm/model_executor/models/olmoe.py +449 -0
- vllm/model_executor/models/opt.py +410 -0
- vllm/model_executor/models/orion.py +356 -0
- vllm/model_executor/models/paligemma.py +397 -0
- vllm/model_executor/models/persimmon.py +342 -0
- vllm/model_executor/models/phi.py +354 -0
- vllm/model_executor/models/phi3.py +18 -0
- vllm/model_executor/models/phi3_small.py +463 -0
- vllm/model_executor/models/phi3v.py +722 -0
- vllm/model_executor/models/phi4mm.py +1263 -0
- vllm/model_executor/models/phi4mm_audio.py +1232 -0
- vllm/model_executor/models/phi4mm_utils.py +1883 -0
- vllm/model_executor/models/phimoe.py +666 -0
- vllm/model_executor/models/pixtral.py +1281 -0
- vllm/model_executor/models/plamo2.py +736 -0
- vllm/model_executor/models/prithvi_geospatial_mae.py +231 -0
- vllm/model_executor/models/qwen.py +360 -0
- vllm/model_executor/models/qwen2.py +552 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +901 -0
- vllm/model_executor/models/qwen2_5_vl.py +1136 -0
- vllm/model_executor/models/qwen2_audio.py +402 -0
- vllm/model_executor/models/qwen2_moe.py +531 -0
- vllm/model_executor/models/qwen2_rm.py +130 -0
- vllm/model_executor/models/qwen2_vl.py +1409 -0
- vllm/model_executor/models/qwen3.py +319 -0
- vllm/model_executor/models/qwen3_moe.py +528 -0
- vllm/model_executor/models/qwen_vl.py +784 -0
- vllm/model_executor/models/registry.py +611 -0
- vllm/model_executor/models/roberta.py +332 -0
- vllm/model_executor/models/siglip.py +522 -0
- vllm/model_executor/models/skyworkr1v.py +949 -0
- vllm/model_executor/models/smolvlm.py +51 -0
- vllm/model_executor/models/solar.py +504 -0
- vllm/model_executor/models/stablelm.py +349 -0
- vllm/model_executor/models/starcoder2.py +355 -0
- vllm/model_executor/models/telechat2.py +139 -0
- vllm/model_executor/models/teleflm.py +78 -0
- vllm/model_executor/models/transformers.py +442 -0
- vllm/model_executor/models/ultravox.py +655 -0
- vllm/model_executor/models/utils.py +714 -0
- vllm/model_executor/models/vision.py +149 -0
- vllm/model_executor/models/whisper.py +746 -0
- vllm/model_executor/models/zamba2.py +1008 -0
- vllm/model_executor/parameter.py +458 -0
- vllm/model_executor/pooling_metadata.py +71 -0
- vllm/model_executor/sampling_metadata.py +596 -0
- vllm/model_executor/utils.py +53 -0
- vllm/multimodal/__init__.py +31 -0
- vllm/multimodal/audio.py +105 -0
- vllm/multimodal/base.py +218 -0
- vllm/multimodal/hasher.py +103 -0
- vllm/multimodal/image.py +77 -0
- vllm/multimodal/inputs.py +843 -0
- vllm/multimodal/parse.py +454 -0
- vllm/multimodal/processing.py +1760 -0
- vllm/multimodal/profiling.py +274 -0
- vllm/multimodal/registry.py +321 -0
- vllm/multimodal/utils.py +386 -0
- vllm/multimodal/video.py +166 -0
- vllm/outputs.py +521 -0
- vllm/platforms/__init__.py +286 -0
- vllm/platforms/cpu.py +182 -0
- vllm/platforms/cuda.py +463 -0
- vllm/platforms/hpu.py +94 -0
- vllm/platforms/interface.py +427 -0
- vllm/platforms/neuron.py +69 -0
- vllm/platforms/rocm.py +346 -0
- vllm/platforms/tpu.py +174 -0
- vllm/platforms/xpu.py +142 -0
- vllm/plugins/__init__.py +82 -0
- vllm/pooling_params.py +53 -0
- vllm/profiler/__init__.py +7 -0
- vllm/profiler/layerwise_profile.py +374 -0
- vllm/profiler/utils.py +147 -0
- vllm/prompt_adapter/__init__.py +0 -0
- vllm/prompt_adapter/layers.py +82 -0
- vllm/prompt_adapter/models.py +357 -0
- vllm/prompt_adapter/request.py +36 -0
- vllm/prompt_adapter/utils.py +97 -0
- vllm/prompt_adapter/worker_manager.py +178 -0
- vllm/py.typed +2 -0
- vllm/reasoning/__init__.py +12 -0
- vllm/reasoning/abs_reasoning_parsers.py +189 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +172 -0
- vllm/reasoning/granite_reasoning_parser.py +362 -0
- vllm/sampling_params.py +598 -0
- vllm/scalar_type.py +335 -0
- vllm/scripts.py +14 -0
- vllm/sequence.py +1486 -0
- vllm/spec_decode/__init__.py +0 -0
- vllm/spec_decode/batch_expansion.py +505 -0
- vllm/spec_decode/draft_model_runner.py +335 -0
- vllm/spec_decode/interfaces.py +98 -0
- vllm/spec_decode/medusa_worker.py +137 -0
- vllm/spec_decode/metrics.py +212 -0
- vllm/spec_decode/mlp_speculator_worker.py +93 -0
- vllm/spec_decode/mqa_scorer.py +159 -0
- vllm/spec_decode/multi_step_worker.py +416 -0
- vllm/spec_decode/ngram_worker.py +195 -0
- vllm/spec_decode/proposer_worker_base.py +58 -0
- vllm/spec_decode/smaller_tp_proposer_worker.py +194 -0
- vllm/spec_decode/spec_decode_worker.py +1324 -0
- vllm/spec_decode/target_model_runner.py +44 -0
- vllm/spec_decode/top1_proposer.py +274 -0
- vllm/spec_decode/util.py +276 -0
- vllm/test_utils.py +129 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6139 -0
- vllm/tracing.py +130 -0
- vllm/transformers_utils/__init__.py +19 -0
- vllm/transformers_utils/config.py +813 -0
- vllm/transformers_utils/configs/__init__.py +52 -0
- vllm/transformers_utils/configs/arctic.py +206 -0
- vllm/transformers_utils/configs/chatglm.py +71 -0
- vllm/transformers_utils/configs/cohere2.py +194 -0
- vllm/transformers_utils/configs/dbrx.py +280 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +216 -0
- vllm/transformers_utils/configs/eagle.py +65 -0
- vllm/transformers_utils/configs/exaone.py +191 -0
- vllm/transformers_utils/configs/falcon.py +89 -0
- vllm/transformers_utils/configs/h2ovl.py +15 -0
- vllm/transformers_utils/configs/internvl.py +53 -0
- vllm/transformers_utils/configs/jais.py +237 -0
- vllm/transformers_utils/configs/kimi_vl.py +36 -0
- vllm/transformers_utils/configs/medusa.py +62 -0
- vllm/transformers_utils/configs/mllama.py +30 -0
- vllm/transformers_utils/configs/mlp_speculator.py +67 -0
- vllm/transformers_utils/configs/moonvit.py +32 -0
- vllm/transformers_utils/configs/mpt.py +179 -0
- vllm/transformers_utils/configs/nemotron.py +204 -0
- vllm/transformers_utils/configs/nvlm_d.py +14 -0
- vllm/transformers_utils/configs/skyworkr1v.py +53 -0
- vllm/transformers_utils/configs/solar.py +246 -0
- vllm/transformers_utils/configs/telechat2.py +63 -0
- vllm/transformers_utils/configs/ultravox.py +107 -0
- vllm/transformers_utils/detokenizer.py +167 -0
- vllm/transformers_utils/detokenizer_utils.py +188 -0
- vllm/transformers_utils/processor.py +210 -0
- vllm/transformers_utils/processors/__init__.py +6 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +363 -0
- vllm/transformers_utils/s3_utils.py +161 -0
- vllm/transformers_utils/tokenizer.py +291 -0
- vllm/transformers_utils/tokenizer_base.py +146 -0
- vllm/transformers_utils/tokenizer_group.py +110 -0
- vllm/transformers_utils/tokenizers/__init__.py +9 -0
- vllm/transformers_utils/tokenizers/mistral.py +483 -0
- vllm/transformers_utils/utils.py +98 -0
- vllm/triton_utils/__init__.py +5 -0
- vllm/triton_utils/importing.py +53 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +255 -0
- vllm/utils.py +2692 -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/flash_attn.py +783 -0
- vllm/v1/attention/backends/flashinfer.py +638 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/common.py +974 -0
- vllm/v1/attention/backends/mla/flashmla.py +149 -0
- vllm/v1/attention/backends/mla/triton_mla.py +118 -0
- vllm/v1/attention/backends/pallas.py +221 -0
- vllm/v1/attention/backends/triton_attn.py +198 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +281 -0
- vllm/v1/core/encoder_cache_manager.py +149 -0
- vllm/v1/core/kv_cache_manager.py +385 -0
- vllm/v1/core/kv_cache_utils.py +744 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/interface.py +134 -0
- vllm/v1/core/sched/output.py +126 -0
- vllm/v1/core/sched/scheduler.py +838 -0
- vllm/v1/core/sched/utils.py +22 -0
- vllm/v1/core/specialized_manager.py +161 -0
- vllm/v1/engine/__init__.py +166 -0
- vllm/v1/engine/async_llm.py +532 -0
- vllm/v1/engine/core.py +701 -0
- vllm/v1/engine/core_client.py +942 -0
- vllm/v1/engine/detokenizer.py +260 -0
- vllm/v1/engine/exceptions.py +16 -0
- vllm/v1/engine/llm_engine.py +285 -0
- vllm/v1/engine/logprobs.py +198 -0
- vllm/v1/engine/mm_input_cache.py +82 -0
- vllm/v1/engine/output_processor.py +420 -0
- vllm/v1/engine/parallel_sampling.py +132 -0
- vllm/v1/engine/processor.py +387 -0
- vllm/v1/executor/__init__.py +0 -0
- vllm/v1/executor/abstract.py +112 -0
- vllm/v1/executor/multiproc_executor.py +480 -0
- vllm/v1/executor/ray_distributed_executor.py +61 -0
- vllm/v1/kv_cache_interface.py +166 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +498 -0
- vllm/v1/metrics/stats.py +238 -0
- vllm/v1/outputs.py +111 -0
- vllm/v1/request.py +178 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/metadata.py +43 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +38 -0
- vllm/v1/sample/ops/penalties.py +58 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +315 -0
- vllm/v1/sample/rejection_sampler.py +631 -0
- vllm/v1/sample/sampler.py +270 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +118 -0
- vllm/v1/sample/tpu/sampler.py +154 -0
- vllm/v1/serial_utils.py +274 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +318 -0
- vllm/v1/spec_decode/metadata.py +61 -0
- vllm/v1/spec_decode/metrics.py +164 -0
- vllm/v1/spec_decode/ngram_proposer.py +131 -0
- vllm/v1/spec_decode/utils.py +18 -0
- vllm/v1/stats/__init__.py +0 -0
- vllm/v1/stats/common.py +453 -0
- vllm/v1/structured_output/__init__.py +113 -0
- vllm/v1/structured_output/backend_guidance.py +215 -0
- vllm/v1/structured_output/backend_types.py +96 -0
- vllm/v1/structured_output/backend_xgrammar.py +299 -0
- vllm/v1/structured_output/request.py +84 -0
- vllm/v1/structured_output/utils.py +174 -0
- vllm/v1/utils.py +249 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +87 -0
- vllm/v1/worker/gpu_input_batch.py +677 -0
- vllm/v1/worker/gpu_model_runner.py +1776 -0
- vllm/v1/worker/gpu_worker.py +349 -0
- vllm/v1/worker/lora_model_runner_mixin.py +145 -0
- vllm/v1/worker/tpu_model_runner.py +1419 -0
- vllm/v1/worker/tpu_worker.py +260 -0
- vllm/v1/worker/utils.py +74 -0
- vllm/v1/worker/worker_base.py +64 -0
- vllm/version.py +40 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm/worker/__init__.py +0 -0
- vllm/worker/cache_engine.py +144 -0
- vllm/worker/cpu_enc_dec_model_runner.py +323 -0
- vllm/worker/cpu_model_runner.py +668 -0
- vllm/worker/cpu_pooling_model_runner.py +122 -0
- vllm/worker/cpu_worker.py +400 -0
- vllm/worker/enc_dec_model_runner.py +542 -0
- vllm/worker/hpu_model_runner.py +2221 -0
- vllm/worker/hpu_worker.py +483 -0
- vllm/worker/model_runner.py +2056 -0
- vllm/worker/model_runner_base.py +281 -0
- vllm/worker/multi_step_hpu_worker.py +122 -0
- vllm/worker/multi_step_model_runner.py +908 -0
- vllm/worker/multi_step_tpu_worker.py +107 -0
- vllm/worker/multi_step_worker.py +196 -0
- vllm/worker/neuron_model_runner.py +336 -0
- vllm/worker/neuron_worker.py +138 -0
- vllm/worker/pooling_model_runner.py +200 -0
- vllm/worker/tpu_model_runner.py +908 -0
- vllm/worker/tpu_worker.py +332 -0
- vllm/worker/utils.py +52 -0
- vllm/worker/worker.py +570 -0
- vllm/worker/worker_base.py +644 -0
- vllm/worker/xpu_model_runner.py +603 -0
- vllm/worker/xpu_worker.py +185 -0
- vllm_cpu-0.8.5.post2.dist-info/METADATA +309 -0
- vllm_cpu-0.8.5.post2.dist-info/RECORD +1103 -0
- vllm_cpu-0.8.5.post2.dist-info/WHEEL +5 -0
- vllm_cpu-0.8.5.post2.dist-info/entry_points.txt +2 -0
- vllm_cpu-0.8.5.post2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1100 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
|
|
3
|
+
import enum
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from typing import Callable, List, Optional
|
|
6
|
+
|
|
7
|
+
import torch
|
|
8
|
+
from compressed_tensors import CompressionFormat
|
|
9
|
+
from compressed_tensors.quantization import (ActivationOrdering,
|
|
10
|
+
QuantizationStrategy)
|
|
11
|
+
|
|
12
|
+
import vllm.model_executor.layers.fused_moe # noqa
|
|
13
|
+
from vllm import _custom_ops as ops
|
|
14
|
+
from vllm.logger import init_logger
|
|
15
|
+
from vllm.model_executor.layers.fused_moe import (FusedMoE, FusedMoEMethodBase,
|
|
16
|
+
FusedMoeWeightScaleSupported)
|
|
17
|
+
from vllm.model_executor.layers.quantization.compressed_tensors.schemes import (
|
|
18
|
+
WNA16_SUPPORTED_BITS)
|
|
19
|
+
from vllm.model_executor.layers.quantization.utils import replace_parameter
|
|
20
|
+
from vllm.model_executor.layers.quantization.utils.w8a8_utils import (
|
|
21
|
+
all_close_1d, normalize_e4m3fn_to_e4m3fnuz, per_tensor_dequantize)
|
|
22
|
+
from vllm.model_executor.utils import set_weight_attrs
|
|
23
|
+
from vllm.platforms import current_platform
|
|
24
|
+
|
|
25
|
+
logger = init_logger(__name__)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class GPTQMarlinState(Enum):
|
|
29
|
+
REPACK = enum.auto()
|
|
30
|
+
READY = enum.auto()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
__all__ = [
|
|
34
|
+
"CompressedTensorsMoEMethod",
|
|
35
|
+
"CompressedTensorsW8A8Fp8MoEMethod",
|
|
36
|
+
"CompressedTensorsW8A8Fp8MoECutlassMethod",
|
|
37
|
+
"CompressedTensorsWNA16MarlinMoEMethod",
|
|
38
|
+
"CompressedTensorsWNA16MoEMethod",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class CompressedTensorsMoEMethod(FusedMoEMethodBase):
|
|
43
|
+
|
|
44
|
+
@staticmethod
|
|
45
|
+
def get_moe_method(
|
|
46
|
+
quant_config: "CompressedTensorsConfig", # type: ignore # noqa E501
|
|
47
|
+
layer: torch.nn.Module,
|
|
48
|
+
) -> "CompressedTensorsMoEMethod":
|
|
49
|
+
# TODO: @dsikka: refactor this to use schemes as other kernels
|
|
50
|
+
# are supported + check if the layer is being ignored.
|
|
51
|
+
weight_quant = quant_config.target_scheme_map["Linear"].get("weights")
|
|
52
|
+
input_quant = quant_config.target_scheme_map["Linear"].get(
|
|
53
|
+
"input_activations")
|
|
54
|
+
|
|
55
|
+
if quant_config._is_wNa16_group_channel(weight_quant, input_quant):
|
|
56
|
+
# Prefer to use the non-marlin kernel when:
|
|
57
|
+
# 1. Many experts (MarlinMoE gives poor performance when >= 16)
|
|
58
|
+
# 2. Non-FP16 dtype (MarlinMoE only supports FP16)
|
|
59
|
+
# 3. Actorder is not group/dynamic (g_idx is unsupported)
|
|
60
|
+
# 4. Scaled are grouped (channelwise is unsupported)
|
|
61
|
+
if ((layer.local_num_experts >= 16
|
|
62
|
+
or layer.params_dtype != torch.float16) and
|
|
63
|
+
weight_quant.actorder not in (ActivationOrdering.GROUP,
|
|
64
|
+
ActivationOrdering.DYNAMIC)
|
|
65
|
+
and weight_quant.strategy in QuantizationStrategy.GROUP):
|
|
66
|
+
return CompressedTensorsWNA16MoEMethod(quant_config)
|
|
67
|
+
else:
|
|
68
|
+
return CompressedTensorsWNA16MarlinMoEMethod(quant_config)
|
|
69
|
+
elif (quant_config._is_fp8_w8a8_sm90(weight_quant, input_quant)
|
|
70
|
+
and layer.activation == "silu"):
|
|
71
|
+
return CompressedTensorsW8A8Fp8MoECutlassMethod(quant_config)
|
|
72
|
+
elif quant_config._is_fp8_w8a8(weight_quant, input_quant):
|
|
73
|
+
return CompressedTensorsW8A8Fp8MoEMethod(quant_config)
|
|
74
|
+
else:
|
|
75
|
+
raise RuntimeError(
|
|
76
|
+
f"Unsupported FusedMoe scheme: {weight_quant}, {input_quant}")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class CompressedTensorsW8A8Fp8MoEMethod(CompressedTensorsMoEMethod):
|
|
80
|
+
|
|
81
|
+
def __init__(
|
|
82
|
+
self,
|
|
83
|
+
quant_config: "CompressedTensorsConfig" # type: ignore # noqa E501
|
|
84
|
+
):
|
|
85
|
+
self.quant_config = quant_config
|
|
86
|
+
self.weight_quant = self.quant_config.target_scheme_map["Linear"].get(
|
|
87
|
+
"weights")
|
|
88
|
+
self.input_quant = self.quant_config.target_scheme_map["Linear"].get(
|
|
89
|
+
"input_activations")
|
|
90
|
+
|
|
91
|
+
per_tensor = (self.weight_quant.strategy == QuantizationStrategy.TENSOR
|
|
92
|
+
and self.input_quant.strategy
|
|
93
|
+
== QuantizationStrategy.TENSOR)
|
|
94
|
+
per_channel = (
|
|
95
|
+
self.weight_quant.strategy == QuantizationStrategy.CHANNEL
|
|
96
|
+
and self.input_quant.strategy == QuantizationStrategy.TOKEN)
|
|
97
|
+
if not (per_tensor or per_channel):
|
|
98
|
+
raise ValueError(
|
|
99
|
+
"For FP8 Fused MoE layers, we require per tensor "
|
|
100
|
+
"or channelwise, dynamic per token quantization. Found "
|
|
101
|
+
f"{self.weight_quant}, {self.input_quant}")
|
|
102
|
+
|
|
103
|
+
self.static_input_scales = not self.input_quant.dynamic
|
|
104
|
+
if self.static_input_scales and per_channel:
|
|
105
|
+
raise ValueError(
|
|
106
|
+
"For FP8 Fused MoE layer, we require either per tensor or "
|
|
107
|
+
"channelwise, dynamic per token quantization.")
|
|
108
|
+
|
|
109
|
+
def create_weights(self, layer: torch.nn.Module, num_experts: int,
|
|
110
|
+
hidden_size: int, intermediate_size_per_partition: int,
|
|
111
|
+
params_dtype: torch.dtype, **extra_weight_attrs):
|
|
112
|
+
|
|
113
|
+
params_dtype = torch.float8_e4m3fn
|
|
114
|
+
|
|
115
|
+
# WEIGHTS
|
|
116
|
+
w13_weight = torch.nn.Parameter(torch.empty(
|
|
117
|
+
num_experts,
|
|
118
|
+
2 * intermediate_size_per_partition,
|
|
119
|
+
hidden_size,
|
|
120
|
+
dtype=params_dtype),
|
|
121
|
+
requires_grad=False)
|
|
122
|
+
layer.register_parameter("w13_weight", w13_weight)
|
|
123
|
+
set_weight_attrs(w13_weight, extra_weight_attrs)
|
|
124
|
+
|
|
125
|
+
w2_weight = torch.nn.Parameter(torch.empty(
|
|
126
|
+
num_experts,
|
|
127
|
+
hidden_size,
|
|
128
|
+
intermediate_size_per_partition,
|
|
129
|
+
dtype=params_dtype),
|
|
130
|
+
requires_grad=False)
|
|
131
|
+
layer.register_parameter("w2_weight", w2_weight)
|
|
132
|
+
set_weight_attrs(w2_weight, extra_weight_attrs)
|
|
133
|
+
|
|
134
|
+
# WEIGHT_SCALES
|
|
135
|
+
if self.weight_quant.strategy == QuantizationStrategy.TENSOR:
|
|
136
|
+
# Allocate 2 scales for w1 and w3 respectively.
|
|
137
|
+
# They are combined to a single scale after weight loading.
|
|
138
|
+
w13_weight_scale = torch.nn.Parameter(torch.ones(
|
|
139
|
+
num_experts, 2, dtype=torch.float32),
|
|
140
|
+
requires_grad=False)
|
|
141
|
+
layer.register_parameter("w13_weight_scale", w13_weight_scale)
|
|
142
|
+
w2_weight_scale = torch.nn.Parameter(torch.ones(
|
|
143
|
+
num_experts, dtype=torch.float32),
|
|
144
|
+
requires_grad=False)
|
|
145
|
+
layer.register_parameter("w2_weight_scale", w2_weight_scale)
|
|
146
|
+
# Add PER-TENSOR quantization for FusedMoE.weight_loader.
|
|
147
|
+
extra_weight_attrs.update(
|
|
148
|
+
{"quant_method": FusedMoeWeightScaleSupported.TENSOR.value})
|
|
149
|
+
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
|
|
150
|
+
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
|
|
151
|
+
|
|
152
|
+
elif self.weight_quant.strategy == QuantizationStrategy.CHANNEL:
|
|
153
|
+
w13_weight_scale = torch.nn.Parameter(torch.ones(
|
|
154
|
+
num_experts,
|
|
155
|
+
2 * intermediate_size_per_partition,
|
|
156
|
+
1,
|
|
157
|
+
dtype=torch.float32),
|
|
158
|
+
requires_grad=False)
|
|
159
|
+
layer.register_parameter("w13_weight_scale", w13_weight_scale)
|
|
160
|
+
w2_weight_scale = torch.nn.Parameter(torch.ones(
|
|
161
|
+
num_experts, hidden_size, 1, dtype=torch.float32),
|
|
162
|
+
requires_grad=False)
|
|
163
|
+
layer.register_parameter("w2_weight_scale", w2_weight_scale)
|
|
164
|
+
# Add PER-CHANNEL quantization for FusedMoE.weight_loader.
|
|
165
|
+
extra_weight_attrs.update(
|
|
166
|
+
{"quant_method": FusedMoeWeightScaleSupported.CHANNEL.value})
|
|
167
|
+
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
|
|
168
|
+
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
|
|
169
|
+
|
|
170
|
+
# INPUT_SCALES
|
|
171
|
+
if self.static_input_scales:
|
|
172
|
+
w13_input_scale = torch.nn.Parameter(torch.ones(
|
|
173
|
+
num_experts, dtype=torch.float32),
|
|
174
|
+
requires_grad=False)
|
|
175
|
+
layer.register_parameter("w13_input_scale", w13_input_scale)
|
|
176
|
+
set_weight_attrs(w13_input_scale, extra_weight_attrs)
|
|
177
|
+
|
|
178
|
+
w2_input_scale = torch.nn.Parameter(torch.ones(
|
|
179
|
+
num_experts, dtype=torch.float32),
|
|
180
|
+
requires_grad=False)
|
|
181
|
+
layer.register_parameter("w2_input_scale", w2_input_scale)
|
|
182
|
+
set_weight_attrs(w2_input_scale, extra_weight_attrs)
|
|
183
|
+
else:
|
|
184
|
+
layer.w13_input_scale = None
|
|
185
|
+
layer.w2_input_scale = None
|
|
186
|
+
|
|
187
|
+
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
|
|
188
|
+
# Fp8 moe kernels require a single activation scale.
|
|
189
|
+
# We take the max of all the scales in case they differ.
|
|
190
|
+
if self.static_input_scales:
|
|
191
|
+
assert self.input_quant.strategy == QuantizationStrategy.TENSOR
|
|
192
|
+
if (layer.w13_input_scale is None or layer.w2_input_scale is None):
|
|
193
|
+
raise ValueError(
|
|
194
|
+
"QuantConfig has static quantization, but found "
|
|
195
|
+
"activation scales are None.")
|
|
196
|
+
if (not all_close_1d(layer.w13_input_scale)
|
|
197
|
+
or not all_close_1d(layer.w2_input_scale)):
|
|
198
|
+
logger.warning_once(
|
|
199
|
+
"Found input_scales that are not equal for "
|
|
200
|
+
"fp8 MoE layer. Using the maximum across experts "
|
|
201
|
+
"for each layer.")
|
|
202
|
+
layer.w13_input_scale = torch.nn.Parameter(
|
|
203
|
+
layer.w13_input_scale.max(), requires_grad=False)
|
|
204
|
+
layer.w2_input_scale = torch.nn.Parameter(
|
|
205
|
+
layer.w2_input_scale.max(), requires_grad=False)
|
|
206
|
+
|
|
207
|
+
if current_platform.is_fp8_fnuz():
|
|
208
|
+
# Normalize the weights and scales
|
|
209
|
+
w13_weight, w13_weight_scale, w13_input_scale = \
|
|
210
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
211
|
+
layer.w13_weight, layer.w13_weight_scale,
|
|
212
|
+
layer.w13_input_scale)
|
|
213
|
+
w2_weight, w2_weight_scale, w2_input_scale = \
|
|
214
|
+
normalize_e4m3fn_to_e4m3fnuz(
|
|
215
|
+
layer.w2_weight, layer.w2_weight_scale,
|
|
216
|
+
layer.w2_input_scale)
|
|
217
|
+
# Reset the parameter
|
|
218
|
+
layer.w13_weight = torch.nn.Parameter(w13_weight,
|
|
219
|
+
requires_grad=False)
|
|
220
|
+
layer.w13_weight_scale = torch.nn.Parameter(w13_weight_scale,
|
|
221
|
+
requires_grad=False)
|
|
222
|
+
if w13_input_scale is not None:
|
|
223
|
+
layer.w13_input_scale = torch.nn.Parameter(w13_input_scale,
|
|
224
|
+
requires_grad=False)
|
|
225
|
+
layer.w2_weight = torch.nn.Parameter(w2_weight,
|
|
226
|
+
requires_grad=False)
|
|
227
|
+
layer.w2_weight_scale = torch.nn.Parameter(w2_weight_scale,
|
|
228
|
+
requires_grad=False)
|
|
229
|
+
if w2_input_scale is not None:
|
|
230
|
+
layer.w2_input_scale = torch.nn.Parameter(w2_input_scale,
|
|
231
|
+
requires_grad=False)
|
|
232
|
+
|
|
233
|
+
# For Per-TENSOR case, Fp8 moe kernel needs single weight scale
|
|
234
|
+
# for w13 per expert. Use max then dequant and requant each expert.
|
|
235
|
+
if self.weight_quant.strategy == QuantizationStrategy.TENSOR:
|
|
236
|
+
assert layer.w13_weight_scale is not None
|
|
237
|
+
shard_size = layer.intermediate_size_per_partition
|
|
238
|
+
max_w13_scales = layer.w13_weight_scale.max(dim=1).values
|
|
239
|
+
for expert_id in range(layer.local_num_experts):
|
|
240
|
+
start = 0
|
|
241
|
+
for shard_id in range(2):
|
|
242
|
+
dq_weight = per_tensor_dequantize(
|
|
243
|
+
layer.w13_weight[expert_id][start:start +
|
|
244
|
+
shard_size, :],
|
|
245
|
+
layer.w13_weight_scale[expert_id][shard_id])
|
|
246
|
+
layer.w13_weight[expert_id][
|
|
247
|
+
start:start + shard_size, :], _ = ops.scaled_fp8_quant(
|
|
248
|
+
dq_weight, max_w13_scales[expert_id])
|
|
249
|
+
start += shard_size
|
|
250
|
+
layer.w13_weight_scale = torch.nn.Parameter(max_w13_scales,
|
|
251
|
+
requires_grad=False)
|
|
252
|
+
|
|
253
|
+
from vllm.model_executor.layers.fused_moe.rocm_aiter_fused_moe import (
|
|
254
|
+
is_rocm_aiter_moe_enabled)
|
|
255
|
+
|
|
256
|
+
# Property to determine if AITER is used
|
|
257
|
+
if is_rocm_aiter_moe_enabled():
|
|
258
|
+
from vllm.model_executor.layers.fused_moe.rocm_aiter_fused_moe import ( # noqa E501
|
|
259
|
+
rocm_aiter_fused_experts, shuffle_weights)
|
|
260
|
+
|
|
261
|
+
# reshaping weights is required for aiter moe kernel.
|
|
262
|
+
shuffled_w13, shuffled_w2 = shuffle_weights(
|
|
263
|
+
layer.w13_weight.data, layer.w2_weight.data)
|
|
264
|
+
|
|
265
|
+
layer.w13_weight = torch.nn.Parameter(shuffled_w13,
|
|
266
|
+
requires_grad=False)
|
|
267
|
+
layer.w2_weight = torch.nn.Parameter(shuffled_w2,
|
|
268
|
+
requires_grad=False)
|
|
269
|
+
|
|
270
|
+
self.fused_experts_func = rocm_aiter_fused_experts
|
|
271
|
+
else:
|
|
272
|
+
from vllm.model_executor.layers.fused_moe import fused_experts
|
|
273
|
+
self.fused_experts_func = fused_experts
|
|
274
|
+
|
|
275
|
+
def apply(
|
|
276
|
+
self,
|
|
277
|
+
layer: torch.nn.Module,
|
|
278
|
+
x: torch.Tensor,
|
|
279
|
+
router_logits: torch.Tensor,
|
|
280
|
+
top_k: int,
|
|
281
|
+
renormalize: bool,
|
|
282
|
+
use_grouped_topk: bool = False,
|
|
283
|
+
topk_group: Optional[int] = None,
|
|
284
|
+
num_expert_group: Optional[int] = None,
|
|
285
|
+
global_num_experts: int = -1,
|
|
286
|
+
expert_map: Optional[torch.Tensor] = None,
|
|
287
|
+
custom_routing_function: Optional[Callable] = None,
|
|
288
|
+
scoring_func: str = "softmax",
|
|
289
|
+
e_score_correction_bias: Optional[torch.Tensor] = None,
|
|
290
|
+
apply_router_weight_on_input: bool = False,
|
|
291
|
+
activation: str = "silu",
|
|
292
|
+
) -> torch.Tensor:
|
|
293
|
+
|
|
294
|
+
topk_weights, topk_ids = FusedMoE.select_experts(
|
|
295
|
+
hidden_states=x,
|
|
296
|
+
router_logits=router_logits,
|
|
297
|
+
use_grouped_topk=use_grouped_topk,
|
|
298
|
+
top_k=top_k,
|
|
299
|
+
renormalize=renormalize,
|
|
300
|
+
topk_group=topk_group,
|
|
301
|
+
num_expert_group=num_expert_group,
|
|
302
|
+
custom_routing_function=custom_routing_function,
|
|
303
|
+
scoring_func=scoring_func,
|
|
304
|
+
e_score_correction_bias=e_score_correction_bias)
|
|
305
|
+
|
|
306
|
+
return self.fused_experts_func(
|
|
307
|
+
hidden_states=x,
|
|
308
|
+
w1=layer.w13_weight,
|
|
309
|
+
w2=layer.w2_weight,
|
|
310
|
+
topk_weights=topk_weights,
|
|
311
|
+
topk_ids=topk_ids,
|
|
312
|
+
inplace=True,
|
|
313
|
+
activation=activation,
|
|
314
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
315
|
+
use_fp8_w8a8=True,
|
|
316
|
+
per_channel_quant=self.weight_quant.strategy ==
|
|
317
|
+
QuantizationStrategy.CHANNEL,
|
|
318
|
+
global_num_experts=global_num_experts,
|
|
319
|
+
expert_map=expert_map,
|
|
320
|
+
w1_scale=layer.w13_weight_scale,
|
|
321
|
+
w2_scale=layer.w2_weight_scale,
|
|
322
|
+
a1_scale=layer.w13_input_scale,
|
|
323
|
+
a2_scale=layer.w2_input_scale)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class CompressedTensorsW8A8Fp8MoECutlassMethod(CompressedTensorsMoEMethod):
|
|
327
|
+
|
|
328
|
+
def __init__(
|
|
329
|
+
self,
|
|
330
|
+
quant_config: "CompressedTensorsConfig" # type: ignore # noqa E501
|
|
331
|
+
):
|
|
332
|
+
self.quant_config = quant_config
|
|
333
|
+
self.weight_quant = self.quant_config.target_scheme_map["Linear"].get(
|
|
334
|
+
"weights")
|
|
335
|
+
self.input_quant = self.quant_config.target_scheme_map["Linear"].get(
|
|
336
|
+
"input_activations")
|
|
337
|
+
|
|
338
|
+
per_tensor = (self.weight_quant.strategy == QuantizationStrategy.TENSOR
|
|
339
|
+
and self.input_quant.strategy
|
|
340
|
+
== QuantizationStrategy.TENSOR)
|
|
341
|
+
per_channel = (
|
|
342
|
+
self.weight_quant.strategy == QuantizationStrategy.CHANNEL
|
|
343
|
+
and self.input_quant.strategy == QuantizationStrategy.TOKEN)
|
|
344
|
+
if not (per_tensor or per_channel):
|
|
345
|
+
raise ValueError(
|
|
346
|
+
"For FP8 Fused MoE layers, we require per tensor "
|
|
347
|
+
"or channelwise, dynamic per token quantization. Found "
|
|
348
|
+
f"{self.weight_quant}, {self.input_quant}")
|
|
349
|
+
|
|
350
|
+
self.static_input_scales = not self.input_quant.dynamic
|
|
351
|
+
if self.static_input_scales and per_channel:
|
|
352
|
+
raise ValueError(
|
|
353
|
+
"For FP8 Fused MoE layer, we require either per tensor or "
|
|
354
|
+
"channelwise, dynamic per token quantization.")
|
|
355
|
+
|
|
356
|
+
def create_weights(self, layer: torch.nn.Module, num_experts: int,
|
|
357
|
+
hidden_size: int, intermediate_size_per_partition: int,
|
|
358
|
+
params_dtype: torch.dtype, **extra_weight_attrs):
|
|
359
|
+
|
|
360
|
+
params_dtype = torch.float8_e4m3fn
|
|
361
|
+
|
|
362
|
+
# WEIGHTS
|
|
363
|
+
w13_weight = torch.nn.Parameter(torch.empty(
|
|
364
|
+
num_experts,
|
|
365
|
+
2 * intermediate_size_per_partition,
|
|
366
|
+
hidden_size,
|
|
367
|
+
dtype=params_dtype),
|
|
368
|
+
requires_grad=False)
|
|
369
|
+
layer.register_parameter("w13_weight", w13_weight)
|
|
370
|
+
set_weight_attrs(w13_weight, extra_weight_attrs)
|
|
371
|
+
|
|
372
|
+
w2_weight = torch.nn.Parameter(torch.empty(
|
|
373
|
+
num_experts,
|
|
374
|
+
hidden_size,
|
|
375
|
+
intermediate_size_per_partition,
|
|
376
|
+
dtype=params_dtype),
|
|
377
|
+
requires_grad=False)
|
|
378
|
+
layer.register_parameter("w2_weight", w2_weight)
|
|
379
|
+
set_weight_attrs(w2_weight, extra_weight_attrs)
|
|
380
|
+
|
|
381
|
+
# WEIGHT_SCALES
|
|
382
|
+
if self.weight_quant.strategy == QuantizationStrategy.TENSOR:
|
|
383
|
+
# Allocate 2 scales for w1 and w3 respectively.
|
|
384
|
+
# They are combined to a single scale after weight loading.
|
|
385
|
+
w13_weight_scale = torch.nn.Parameter(torch.ones(
|
|
386
|
+
num_experts, 2, dtype=torch.float32),
|
|
387
|
+
requires_grad=False)
|
|
388
|
+
layer.register_parameter("w13_weight_scale", w13_weight_scale)
|
|
389
|
+
w2_weight_scale = torch.nn.Parameter(torch.ones(
|
|
390
|
+
num_experts, dtype=torch.float32),
|
|
391
|
+
requires_grad=False)
|
|
392
|
+
layer.register_parameter("w2_weight_scale", w2_weight_scale)
|
|
393
|
+
# Add PER-TENSOR quantization for FusedMoE.weight_loader.
|
|
394
|
+
extra_weight_attrs.update(
|
|
395
|
+
{"quant_method": FusedMoeWeightScaleSupported.TENSOR.value})
|
|
396
|
+
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
|
|
397
|
+
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
|
|
398
|
+
|
|
399
|
+
elif self.weight_quant.strategy == QuantizationStrategy.CHANNEL:
|
|
400
|
+
w13_weight_scale = torch.nn.Parameter(torch.ones(
|
|
401
|
+
num_experts,
|
|
402
|
+
2 * intermediate_size_per_partition,
|
|
403
|
+
1,
|
|
404
|
+
dtype=torch.float32),
|
|
405
|
+
requires_grad=False)
|
|
406
|
+
layer.register_parameter("w13_weight_scale", w13_weight_scale)
|
|
407
|
+
w2_weight_scale = torch.nn.Parameter(torch.ones(
|
|
408
|
+
num_experts, hidden_size, 1, dtype=torch.float32),
|
|
409
|
+
requires_grad=False)
|
|
410
|
+
layer.register_parameter("w2_weight_scale", w2_weight_scale)
|
|
411
|
+
# Add PER-CHANNEL quantization for FusedMoE.weight_loader.
|
|
412
|
+
extra_weight_attrs.update(
|
|
413
|
+
{"quant_method": FusedMoeWeightScaleSupported.CHANNEL.value})
|
|
414
|
+
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
|
|
415
|
+
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
|
|
416
|
+
|
|
417
|
+
# INPUT_SCALES
|
|
418
|
+
if self.static_input_scales:
|
|
419
|
+
w13_input_scale = torch.nn.Parameter(torch.ones(
|
|
420
|
+
num_experts, dtype=torch.float32),
|
|
421
|
+
requires_grad=False)
|
|
422
|
+
layer.register_parameter("w13_input_scale", w13_input_scale)
|
|
423
|
+
set_weight_attrs(w13_input_scale, extra_weight_attrs)
|
|
424
|
+
|
|
425
|
+
w2_input_scale = torch.nn.Parameter(torch.ones(
|
|
426
|
+
num_experts, dtype=torch.float32),
|
|
427
|
+
requires_grad=False)
|
|
428
|
+
layer.register_parameter("w2_input_scale", w2_input_scale)
|
|
429
|
+
set_weight_attrs(w2_input_scale, extra_weight_attrs)
|
|
430
|
+
else:
|
|
431
|
+
layer.w13_input_scale = None
|
|
432
|
+
layer.w2_input_scale = None
|
|
433
|
+
|
|
434
|
+
device = w13_weight.device
|
|
435
|
+
# TODO strides can be shared across multiple layers
|
|
436
|
+
self.ab_strides1 = torch.full((num_experts, ),
|
|
437
|
+
hidden_size,
|
|
438
|
+
device=device,
|
|
439
|
+
dtype=torch.int64)
|
|
440
|
+
self.c_strides1 = torch.full((num_experts, ),
|
|
441
|
+
2 * intermediate_size_per_partition,
|
|
442
|
+
device=device,
|
|
443
|
+
dtype=torch.int64)
|
|
444
|
+
self.ab_strides2 = torch.full((num_experts, ),
|
|
445
|
+
intermediate_size_per_partition,
|
|
446
|
+
device=device,
|
|
447
|
+
dtype=torch.int64)
|
|
448
|
+
self.c_strides2 = torch.full((num_experts, ),
|
|
449
|
+
hidden_size,
|
|
450
|
+
device=device,
|
|
451
|
+
dtype=torch.int64)
|
|
452
|
+
|
|
453
|
+
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
|
|
454
|
+
# Fp8 moe kernels require a single activation scale.
|
|
455
|
+
# We take the max of all the scales in case they differ.
|
|
456
|
+
if self.static_input_scales:
|
|
457
|
+
assert self.input_quant.strategy == QuantizationStrategy.TENSOR
|
|
458
|
+
if (layer.w13_input_scale is None or layer.w2_input_scale is None):
|
|
459
|
+
raise ValueError(
|
|
460
|
+
"QuantConfig has static quantization, but found "
|
|
461
|
+
"activation scales are None.")
|
|
462
|
+
if (not all_close_1d(layer.w13_input_scale)
|
|
463
|
+
or not all_close_1d(layer.w2_input_scale)):
|
|
464
|
+
logger.warning_once(
|
|
465
|
+
"Found input_scales that are not equal for "
|
|
466
|
+
"fp8 MoE layer. Using the maximum across experts "
|
|
467
|
+
"for each layer.")
|
|
468
|
+
layer.w13_input_scale = torch.nn.Parameter(
|
|
469
|
+
layer.w13_input_scale.max(), requires_grad=False)
|
|
470
|
+
layer.w2_input_scale = torch.nn.Parameter(
|
|
471
|
+
layer.w2_input_scale.max(), requires_grad=False)
|
|
472
|
+
|
|
473
|
+
# For Per-TENSOR case, Fp8 moe kernel needs single weight scale
|
|
474
|
+
# for w13 per expert. Use max then dequant and requant each expert.
|
|
475
|
+
if self.weight_quant.strategy == QuantizationStrategy.TENSOR:
|
|
476
|
+
assert layer.w13_weight_scale is not None
|
|
477
|
+
shard_size = layer.intermediate_size_per_partition
|
|
478
|
+
max_w13_scales = layer.w13_weight_scale.max(dim=1).values
|
|
479
|
+
for expert_id in range(layer.local_num_experts):
|
|
480
|
+
start = 0
|
|
481
|
+
for shard_id in range(2):
|
|
482
|
+
dq_weight = per_tensor_dequantize(
|
|
483
|
+
layer.w13_weight[expert_id][start:start +
|
|
484
|
+
shard_size, :],
|
|
485
|
+
layer.w13_weight_scale[expert_id][shard_id])
|
|
486
|
+
layer.w13_weight[expert_id][
|
|
487
|
+
start:start + shard_size, :], _ = ops.scaled_fp8_quant(
|
|
488
|
+
dq_weight, max_w13_scales[expert_id])
|
|
489
|
+
start += shard_size
|
|
490
|
+
layer.w13_weight_scale = torch.nn.Parameter(max_w13_scales,
|
|
491
|
+
requires_grad=False)
|
|
492
|
+
|
|
493
|
+
def apply(
|
|
494
|
+
self,
|
|
495
|
+
layer: torch.nn.Module,
|
|
496
|
+
x: torch.Tensor,
|
|
497
|
+
router_logits: torch.Tensor,
|
|
498
|
+
top_k: int,
|
|
499
|
+
renormalize: bool,
|
|
500
|
+
use_grouped_topk: bool = False,
|
|
501
|
+
topk_group: Optional[int] = None,
|
|
502
|
+
num_expert_group: Optional[int] = None,
|
|
503
|
+
global_num_experts: int = -1,
|
|
504
|
+
expert_map: Optional[torch.Tensor] = None,
|
|
505
|
+
custom_routing_function: Optional[Callable] = None,
|
|
506
|
+
scoring_func: str = "softmax",
|
|
507
|
+
e_score_correction_bias: Optional[torch.Tensor] = None,
|
|
508
|
+
apply_router_weight_on_input: bool = False,
|
|
509
|
+
activation: str = "silu",
|
|
510
|
+
) -> torch.Tensor:
|
|
511
|
+
|
|
512
|
+
assert activation == "silu"
|
|
513
|
+
|
|
514
|
+
topk_weights, topk_ids = FusedMoE.select_experts(
|
|
515
|
+
hidden_states=x,
|
|
516
|
+
router_logits=router_logits,
|
|
517
|
+
use_grouped_topk=use_grouped_topk,
|
|
518
|
+
top_k=top_k,
|
|
519
|
+
renormalize=renormalize,
|
|
520
|
+
topk_group=topk_group,
|
|
521
|
+
num_expert_group=num_expert_group,
|
|
522
|
+
custom_routing_function=custom_routing_function,
|
|
523
|
+
scoring_func=scoring_func,
|
|
524
|
+
e_score_correction_bias=e_score_correction_bias)
|
|
525
|
+
|
|
526
|
+
from vllm.model_executor.layers.fused_moe import cutlass_moe_fp8
|
|
527
|
+
|
|
528
|
+
return cutlass_moe_fp8(
|
|
529
|
+
x,
|
|
530
|
+
layer.w13_weight.transpose(1, 2),
|
|
531
|
+
layer.w2_weight.transpose(1, 2),
|
|
532
|
+
layer.w13_weight_scale,
|
|
533
|
+
layer.w2_weight_scale,
|
|
534
|
+
topk_weights,
|
|
535
|
+
topk_ids,
|
|
536
|
+
self.ab_strides1,
|
|
537
|
+
self.c_strides1,
|
|
538
|
+
self.ab_strides2,
|
|
539
|
+
self.c_strides2,
|
|
540
|
+
a1_scale=layer.w13_input_scale,
|
|
541
|
+
a2_scale=layer.w2_input_scale,
|
|
542
|
+
out_dtype=x.dtype,
|
|
543
|
+
expert_map=expert_map,
|
|
544
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
class CompressedTensorsWNA16MarlinMoEMethod(CompressedTensorsMoEMethod):
|
|
549
|
+
|
|
550
|
+
def __init__(
|
|
551
|
+
self,
|
|
552
|
+
quant_config: "CompressedTensorsConfig" # type: ignore # noqa E501
|
|
553
|
+
):
|
|
554
|
+
self.quant_config = quant_config
|
|
555
|
+
# TODO: @dsikka: refactor this to use schemes as other kernels
|
|
556
|
+
# are supported + check if the layer is being ignored.
|
|
557
|
+
config = self.quant_config.target_scheme_map["Linear"].get("weights")
|
|
558
|
+
self.num_bits = config.num_bits
|
|
559
|
+
self.packed_factor = 32 // config.num_bits
|
|
560
|
+
self.strategy = config.strategy
|
|
561
|
+
self.group_size = config.group_size
|
|
562
|
+
self.actorder = config.actorder
|
|
563
|
+
assert config.symmetric, (
|
|
564
|
+
"Only symmetric quantization is supported for MoE")
|
|
565
|
+
|
|
566
|
+
if not (self.quant_config.quant_format
|
|
567
|
+
== CompressionFormat.pack_quantized.value
|
|
568
|
+
and self.num_bits in WNA16_SUPPORTED_BITS):
|
|
569
|
+
raise ValueError("For Fused MoE layers, only ",
|
|
570
|
+
f"{CompressionFormat.pack_quantized.value} ",
|
|
571
|
+
"is supported for the following bits: ",
|
|
572
|
+
f"{WNA16_SUPPORTED_BITS}")
|
|
573
|
+
|
|
574
|
+
def create_weights(self, layer: torch.nn.Module, num_experts: int,
|
|
575
|
+
hidden_size: int, intermediate_size_per_partition: int,
|
|
576
|
+
params_dtype: torch.dtype, **extra_weight_attrs):
|
|
577
|
+
|
|
578
|
+
assert params_dtype == torch.float16, (
|
|
579
|
+
"float16 is required for MoE compressed models. Set dtype=torch.float16" # noqa: E501
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
intermediate_size_full = extra_weight_attrs.pop(
|
|
583
|
+
"intermediate_size_full")
|
|
584
|
+
|
|
585
|
+
# Will transpose the loaded weight along the
|
|
586
|
+
# intermediate and hidden dim sizes. Will
|
|
587
|
+
# shard for TP along the transposed dims
|
|
588
|
+
extra_weight_attrs.update({
|
|
589
|
+
"is_transposed": True,
|
|
590
|
+
"quant_method": self.strategy
|
|
591
|
+
})
|
|
592
|
+
w13_weight = torch.nn.Parameter(torch.empty(
|
|
593
|
+
num_experts,
|
|
594
|
+
hidden_size // self.packed_factor,
|
|
595
|
+
2 * intermediate_size_per_partition,
|
|
596
|
+
dtype=torch.int32),
|
|
597
|
+
requires_grad=False)
|
|
598
|
+
layer.register_parameter("w13_weight_packed", w13_weight)
|
|
599
|
+
set_weight_attrs(w13_weight, extra_weight_attrs)
|
|
600
|
+
|
|
601
|
+
w2_weight = torch.nn.Parameter(torch.empty(
|
|
602
|
+
num_experts,
|
|
603
|
+
intermediate_size_per_partition // self.packed_factor,
|
|
604
|
+
hidden_size,
|
|
605
|
+
dtype=torch.int32),
|
|
606
|
+
requires_grad=False)
|
|
607
|
+
layer.register_parameter("w2_weight_packed", w2_weight)
|
|
608
|
+
set_weight_attrs(w2_weight, extra_weight_attrs)
|
|
609
|
+
|
|
610
|
+
# In the case where we have actorder/g_idx,
|
|
611
|
+
# we do not partition the w2 scales
|
|
612
|
+
load_full_w2 = self.actorder and self.group_size != -1
|
|
613
|
+
w2_scales_size = (intermediate_size_full
|
|
614
|
+
if load_full_w2 else intermediate_size_per_partition)
|
|
615
|
+
|
|
616
|
+
self.is_k_full = (not self.actorder) or (
|
|
617
|
+
intermediate_size_per_partition == intermediate_size_full)
|
|
618
|
+
|
|
619
|
+
if self.strategy == "channel":
|
|
620
|
+
num_groups_w2 = num_groups_w13 = 1
|
|
621
|
+
self.group_size = -1
|
|
622
|
+
else:
|
|
623
|
+
num_groups_w2 = w2_scales_size // self.group_size
|
|
624
|
+
num_groups_w13 = hidden_size // self.group_size
|
|
625
|
+
|
|
626
|
+
w13_scale = torch.nn.Parameter(torch.ones(
|
|
627
|
+
num_experts,
|
|
628
|
+
num_groups_w13,
|
|
629
|
+
2 * intermediate_size_per_partition,
|
|
630
|
+
dtype=params_dtype),
|
|
631
|
+
requires_grad=False)
|
|
632
|
+
layer.register_parameter("w13_weight_scale", w13_scale)
|
|
633
|
+
set_weight_attrs(w13_scale, extra_weight_attrs)
|
|
634
|
+
|
|
635
|
+
w2_scale = torch.nn.Parameter(torch.ones(num_experts,
|
|
636
|
+
num_groups_w2,
|
|
637
|
+
hidden_size,
|
|
638
|
+
dtype=params_dtype),
|
|
639
|
+
requires_grad=False)
|
|
640
|
+
layer.register_parameter("w2_weight_scale", w2_scale)
|
|
641
|
+
set_weight_attrs(w2_scale, extra_weight_attrs)
|
|
642
|
+
set_weight_attrs(w2_scale, {"load_full_w2": load_full_w2})
|
|
643
|
+
|
|
644
|
+
w2_weight_shape = torch.nn.Parameter(torch.empty(num_experts, 2),
|
|
645
|
+
requires_grad=False)
|
|
646
|
+
layer.register_parameter("w2_weight_shape", w2_weight_shape)
|
|
647
|
+
set_weight_attrs(w2_weight_shape, extra_weight_attrs)
|
|
648
|
+
w13_weight_shape = torch.nn.Parameter(torch.empty(num_experts, 2),
|
|
649
|
+
requires_grad=False)
|
|
650
|
+
|
|
651
|
+
layer.register_parameter("w13_weight_shape", w13_weight_shape)
|
|
652
|
+
set_weight_attrs(w13_weight_shape, extra_weight_attrs)
|
|
653
|
+
|
|
654
|
+
w13_g_idx = torch.nn.Parameter(
|
|
655
|
+
torch.empty(
|
|
656
|
+
num_experts,
|
|
657
|
+
hidden_size,
|
|
658
|
+
dtype=torch.int32,
|
|
659
|
+
),
|
|
660
|
+
requires_grad=False,
|
|
661
|
+
)
|
|
662
|
+
layer.register_parameter("w13_weight_g_idx", w13_g_idx)
|
|
663
|
+
set_weight_attrs(w13_g_idx, extra_weight_attrs)
|
|
664
|
+
|
|
665
|
+
w2_g_idx = torch.nn.Parameter(
|
|
666
|
+
torch.empty(
|
|
667
|
+
num_experts,
|
|
668
|
+
intermediate_size_per_partition,
|
|
669
|
+
dtype=torch.int32,
|
|
670
|
+
),
|
|
671
|
+
requires_grad=False,
|
|
672
|
+
)
|
|
673
|
+
layer.register_parameter("w2_weight_g_idx", w2_g_idx)
|
|
674
|
+
set_weight_attrs(w2_g_idx, extra_weight_attrs)
|
|
675
|
+
|
|
676
|
+
w13_g_idx_sort_indices = torch.nn.Parameter(
|
|
677
|
+
torch.empty(
|
|
678
|
+
num_experts,
|
|
679
|
+
hidden_size,
|
|
680
|
+
dtype=torch.int32,
|
|
681
|
+
),
|
|
682
|
+
requires_grad=False,
|
|
683
|
+
)
|
|
684
|
+
layer.register_parameter("w13_g_idx_sort_indices",
|
|
685
|
+
w13_g_idx_sort_indices)
|
|
686
|
+
set_weight_attrs(w13_g_idx_sort_indices, extra_weight_attrs)
|
|
687
|
+
|
|
688
|
+
w2_g_idx_sort_indices = torch.nn.Parameter(
|
|
689
|
+
torch.empty(
|
|
690
|
+
num_experts,
|
|
691
|
+
intermediate_size_per_partition,
|
|
692
|
+
dtype=torch.int32,
|
|
693
|
+
),
|
|
694
|
+
requires_grad=False,
|
|
695
|
+
)
|
|
696
|
+
layer.register_parameter("w2_g_idx_sort_indices",
|
|
697
|
+
w2_g_idx_sort_indices)
|
|
698
|
+
set_weight_attrs(w2_g_idx_sort_indices, extra_weight_attrs)
|
|
699
|
+
|
|
700
|
+
layer.a13_scale = None
|
|
701
|
+
layer.a2_scale = None
|
|
702
|
+
layer.marlin_state = GPTQMarlinState.REPACK
|
|
703
|
+
|
|
704
|
+
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
|
|
705
|
+
|
|
706
|
+
def replace_tensor(name, new_t):
|
|
707
|
+
# It is important to use resize_() here since it ensures
|
|
708
|
+
# the same buffer is reused
|
|
709
|
+
getattr(layer, name).resize_(new_t.shape)
|
|
710
|
+
getattr(layer, name).copy_(new_t)
|
|
711
|
+
del new_t
|
|
712
|
+
|
|
713
|
+
def get_scale_perms(num_bits: int):
|
|
714
|
+
scale_perm: List[int] = []
|
|
715
|
+
for i in range(8):
|
|
716
|
+
scale_perm.extend([i + 8 * j for j in range(8)])
|
|
717
|
+
scale_perm_single: List[int] = []
|
|
718
|
+
for i in range(4):
|
|
719
|
+
scale_perm_single.extend(
|
|
720
|
+
[2 * i + j for j in [0, 1, 8, 9, 16, 17, 24, 25]])
|
|
721
|
+
return scale_perm, scale_perm_single
|
|
722
|
+
|
|
723
|
+
def marlin_permute_scales(s: torch.Tensor, size_k: int, size_n: int,
|
|
724
|
+
group_size: int, num_bits: int):
|
|
725
|
+
scale_perm, scale_perm_single = get_scale_perms(num_bits)
|
|
726
|
+
if group_size < size_k and group_size != -1:
|
|
727
|
+
s = s.reshape((-1, len(scale_perm)))[:, scale_perm]
|
|
728
|
+
else:
|
|
729
|
+
s = s.reshape((-1, len(scale_perm_single)))[:,
|
|
730
|
+
scale_perm_single]
|
|
731
|
+
s = s.reshape((-1, size_n)).contiguous()
|
|
732
|
+
return s
|
|
733
|
+
|
|
734
|
+
def marlin_moe_permute_scales(s: torch.Tensor, size_k: int,
|
|
735
|
+
size_n: int, group_size: int,
|
|
736
|
+
num_bits: int):
|
|
737
|
+
num_experts = s.shape[0]
|
|
738
|
+
output = torch.empty((num_experts, s.shape[1], s.shape[2]),
|
|
739
|
+
device=s.device,
|
|
740
|
+
dtype=s.dtype)
|
|
741
|
+
for e in range(num_experts):
|
|
742
|
+
output[e] = marlin_permute_scales(s[e], size_k, size_n,
|
|
743
|
+
group_size, num_bits)
|
|
744
|
+
return output
|
|
745
|
+
|
|
746
|
+
size_k2 = layer.w2_weight_packed.shape[2]
|
|
747
|
+
size_k13 = layer.w13_weight_packed.shape[2]
|
|
748
|
+
|
|
749
|
+
num_experts = layer.w13_weight_g_idx.shape[0]
|
|
750
|
+
device = layer.w13_weight_g_idx.device
|
|
751
|
+
|
|
752
|
+
# when running models with grouped act order,
|
|
753
|
+
# resort to g_idx values provided in checkpoint
|
|
754
|
+
if self.actorder == "group":
|
|
755
|
+
w13_g_idx_sort_indices = torch.empty_like(layer.w13_weight_g_idx)
|
|
756
|
+
w2_g_idx_sort_indices = torch.empty_like(layer.w2_weight_g_idx)
|
|
757
|
+
w13_sorted_g_idx = torch.empty_like(layer.w13_weight_g_idx)
|
|
758
|
+
w2_sorted_g_idx = torch.empty_like(layer.w2_weight_g_idx)
|
|
759
|
+
|
|
760
|
+
for e in range(num_experts):
|
|
761
|
+
w13_g_idx_sort_indices[e] = torch.argsort(
|
|
762
|
+
layer.w13_weight_g_idx[e]).to(torch.int32)
|
|
763
|
+
w2_g_idx_sort_indices[e] = torch.argsort(
|
|
764
|
+
layer.w2_weight_g_idx[e]).to(torch.int32)
|
|
765
|
+
w13_sorted_g_idx[e] = layer.w13_weight_g_idx[e][
|
|
766
|
+
w13_g_idx_sort_indices[e]]
|
|
767
|
+
w2_sorted_g_idx[e] = layer.w2_weight_g_idx[e][
|
|
768
|
+
w2_g_idx_sort_indices[e]]
|
|
769
|
+
|
|
770
|
+
replace_parameter(layer, "w13_weight_g_idx", w13_sorted_g_idx)
|
|
771
|
+
replace_parameter(layer, "w2_weight_g_idx", w2_sorted_g_idx)
|
|
772
|
+
replace_parameter(layer, "w13_g_idx_sort_indices",
|
|
773
|
+
w13_g_idx_sort_indices)
|
|
774
|
+
replace_parameter(layer, "w2_g_idx_sort_indices",
|
|
775
|
+
w2_g_idx_sort_indices)
|
|
776
|
+
|
|
777
|
+
else:
|
|
778
|
+
layer.w13_weight_g_idx = torch.nn.Parameter(
|
|
779
|
+
torch.empty((num_experts, 0), dtype=torch.int32,
|
|
780
|
+
device=device),
|
|
781
|
+
requires_grad=False,
|
|
782
|
+
)
|
|
783
|
+
layer.w2_weight_g_idx = torch.nn.Parameter(
|
|
784
|
+
torch.empty((num_experts, 0), dtype=torch.int32,
|
|
785
|
+
device=device),
|
|
786
|
+
requires_grad=False,
|
|
787
|
+
)
|
|
788
|
+
layer.w13_g_idx_sort_indices = torch.nn.Parameter(
|
|
789
|
+
torch.empty((num_experts, 0), dtype=torch.int32,
|
|
790
|
+
device=device),
|
|
791
|
+
requires_grad=False,
|
|
792
|
+
)
|
|
793
|
+
layer.w2_g_idx_sort_indices = torch.nn.Parameter(
|
|
794
|
+
torch.empty((num_experts, 0), dtype=torch.int32,
|
|
795
|
+
device=device),
|
|
796
|
+
requires_grad=False,
|
|
797
|
+
)
|
|
798
|
+
|
|
799
|
+
marlin_w13_qweight = ops.gptq_marlin_moe_repack(
|
|
800
|
+
layer.w13_weight_packed,
|
|
801
|
+
layer.w13_g_idx_sort_indices,
|
|
802
|
+
layer.w13_weight_packed.shape[1] * self.packed_factor,
|
|
803
|
+
layer.w13_weight_packed.shape[2],
|
|
804
|
+
self.num_bits,
|
|
805
|
+
)
|
|
806
|
+
replace_tensor("w13_weight_packed", marlin_w13_qweight)
|
|
807
|
+
marlin_w2_qweight = ops.gptq_marlin_moe_repack(
|
|
808
|
+
layer.w2_weight_packed,
|
|
809
|
+
layer.w2_g_idx_sort_indices,
|
|
810
|
+
layer.w2_weight_packed.shape[1] * self.packed_factor,
|
|
811
|
+
layer.w2_weight_packed.shape[2],
|
|
812
|
+
self.num_bits,
|
|
813
|
+
)
|
|
814
|
+
replace_tensor("w2_weight_packed", marlin_w2_qweight)
|
|
815
|
+
# Repack scales
|
|
816
|
+
marlin_w13_scales = marlin_moe_permute_scales(
|
|
817
|
+
layer.w13_weight_scale,
|
|
818
|
+
size_k13,
|
|
819
|
+
layer.w13_weight_scale.shape[2],
|
|
820
|
+
self.group_size,
|
|
821
|
+
self.num_bits,
|
|
822
|
+
)
|
|
823
|
+
replace_tensor("w13_weight_scale", marlin_w13_scales)
|
|
824
|
+
marlin_w2_scales = marlin_moe_permute_scales(
|
|
825
|
+
layer.w2_weight_scale,
|
|
826
|
+
layer.w2_weight_scale.shape[1] *
|
|
827
|
+
(self.group_size if self.group_size != -1 else self.packed_factor),
|
|
828
|
+
size_k2,
|
|
829
|
+
self.group_size,
|
|
830
|
+
self.num_bits,
|
|
831
|
+
)
|
|
832
|
+
replace_tensor("w2_weight_scale", marlin_w2_scales)
|
|
833
|
+
|
|
834
|
+
def apply(
|
|
835
|
+
self,
|
|
836
|
+
layer: torch.nn.Module,
|
|
837
|
+
x: torch.Tensor,
|
|
838
|
+
router_logits: torch.Tensor,
|
|
839
|
+
top_k: int,
|
|
840
|
+
renormalize: bool,
|
|
841
|
+
use_grouped_topk: bool = False,
|
|
842
|
+
topk_group: Optional[int] = None,
|
|
843
|
+
num_expert_group: Optional[int] = None,
|
|
844
|
+
global_num_experts: int = -1,
|
|
845
|
+
expert_map: Optional[torch.Tensor] = None,
|
|
846
|
+
custom_routing_function: Optional[Callable] = None,
|
|
847
|
+
scoring_func: str = "softmax",
|
|
848
|
+
e_score_correction_bias: Optional[torch.Tensor] = None,
|
|
849
|
+
apply_router_weight_on_input: bool = False,
|
|
850
|
+
activation: str = "silu",
|
|
851
|
+
) -> torch.Tensor:
|
|
852
|
+
assert activation == "silu", "Only SiLU activation is supported."
|
|
853
|
+
if expert_map is not None:
|
|
854
|
+
raise NotImplementedError(
|
|
855
|
+
"Expert Parallelism is not supported for "
|
|
856
|
+
"fused Marlin MoE method.")
|
|
857
|
+
if apply_router_weight_on_input:
|
|
858
|
+
raise NotImplementedError(
|
|
859
|
+
"Apply router weight on input is not supported for "
|
|
860
|
+
"fused Marlin MoE method.")
|
|
861
|
+
|
|
862
|
+
topk_weights, topk_ids = FusedMoE.select_experts(
|
|
863
|
+
hidden_states=x,
|
|
864
|
+
router_logits=router_logits,
|
|
865
|
+
use_grouped_topk=use_grouped_topk,
|
|
866
|
+
top_k=top_k,
|
|
867
|
+
renormalize=renormalize,
|
|
868
|
+
topk_group=topk_group,
|
|
869
|
+
num_expert_group=num_expert_group,
|
|
870
|
+
custom_routing_function=custom_routing_function,
|
|
871
|
+
scoring_func=scoring_func,
|
|
872
|
+
e_score_correction_bias=e_score_correction_bias)
|
|
873
|
+
|
|
874
|
+
return torch.ops.vllm.fused_marlin_moe(
|
|
875
|
+
x,
|
|
876
|
+
layer.w13_weight_packed,
|
|
877
|
+
layer.w2_weight_packed,
|
|
878
|
+
layer.w13_weight_scale,
|
|
879
|
+
layer.w2_weight_scale,
|
|
880
|
+
router_logits,
|
|
881
|
+
topk_weights,
|
|
882
|
+
topk_ids,
|
|
883
|
+
g_idx1=layer.w13_weight_g_idx,
|
|
884
|
+
g_idx2=layer.w2_weight_g_idx,
|
|
885
|
+
sort_indices1=layer.w13_g_idx_sort_indices,
|
|
886
|
+
sort_indices2=layer.w2_g_idx_sort_indices,
|
|
887
|
+
num_bits=self.num_bits,
|
|
888
|
+
is_k_full=self.is_k_full)
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
class CompressedTensorsWNA16MoEMethod(CompressedTensorsMoEMethod):
|
|
892
|
+
|
|
893
|
+
def __init__(
|
|
894
|
+
self,
|
|
895
|
+
quant_config: "CompressedTensorsConfig" # type: ignore # noqa E501
|
|
896
|
+
):
|
|
897
|
+
self.quant_config = quant_config
|
|
898
|
+
# TODO: @dsikka: refactor this to use schemes as other kernels
|
|
899
|
+
# are supported + check if the layer is being ignored.
|
|
900
|
+
config = self.quant_config.target_scheme_map["Linear"].get("weights")
|
|
901
|
+
self.num_bits = config.num_bits
|
|
902
|
+
self.packed_factor = 32 // config.num_bits
|
|
903
|
+
self.strategy = config.strategy
|
|
904
|
+
# channelwise is not supported by this kernel
|
|
905
|
+
assert config.strategy == "group"
|
|
906
|
+
self.group_size = config.group_size
|
|
907
|
+
# grouped actorder isn't supported by this kernel
|
|
908
|
+
assert config.actorder != "group"
|
|
909
|
+
assert config.symmetric, (
|
|
910
|
+
"Only symmetric quantization is supported for MoE")
|
|
911
|
+
|
|
912
|
+
if not (self.quant_config.quant_format
|
|
913
|
+
== CompressionFormat.pack_quantized.value
|
|
914
|
+
and self.num_bits in WNA16_SUPPORTED_BITS):
|
|
915
|
+
raise ValueError("For Fused MoE layers, only ",
|
|
916
|
+
f"{CompressionFormat.pack_quantized.value} ",
|
|
917
|
+
"is supported for the following bits: ",
|
|
918
|
+
f"{WNA16_SUPPORTED_BITS}")
|
|
919
|
+
|
|
920
|
+
def create_weights(self, layer: torch.nn.Module, num_experts: int,
|
|
921
|
+
hidden_size: int, intermediate_size_per_partition: int,
|
|
922
|
+
params_dtype: torch.dtype, **extra_weight_attrs):
|
|
923
|
+
|
|
924
|
+
# Will transpose the loaded weight along the
|
|
925
|
+
# intermediate and hidden dim sizes. Will
|
|
926
|
+
# shard for TP along the transposed dims
|
|
927
|
+
extra_weight_attrs.update({
|
|
928
|
+
"is_transposed": True,
|
|
929
|
+
"quant_method": self.strategy
|
|
930
|
+
})
|
|
931
|
+
w13_weight = torch.nn.Parameter(torch.empty(
|
|
932
|
+
num_experts,
|
|
933
|
+
hidden_size // self.packed_factor,
|
|
934
|
+
2 * intermediate_size_per_partition,
|
|
935
|
+
dtype=torch.int32),
|
|
936
|
+
requires_grad=False)
|
|
937
|
+
layer.register_parameter("w13_weight_packed", w13_weight)
|
|
938
|
+
set_weight_attrs(w13_weight, extra_weight_attrs)
|
|
939
|
+
|
|
940
|
+
w2_weight = torch.nn.Parameter(torch.empty(
|
|
941
|
+
num_experts,
|
|
942
|
+
intermediate_size_per_partition // self.packed_factor,
|
|
943
|
+
hidden_size,
|
|
944
|
+
dtype=torch.int32),
|
|
945
|
+
requires_grad=False)
|
|
946
|
+
layer.register_parameter("w2_weight_packed", w2_weight)
|
|
947
|
+
set_weight_attrs(w2_weight, extra_weight_attrs)
|
|
948
|
+
|
|
949
|
+
w2_scales_size = intermediate_size_per_partition
|
|
950
|
+
|
|
951
|
+
if self.strategy == "channel":
|
|
952
|
+
num_groups_w2 = num_groups_w13 = 1
|
|
953
|
+
self.group_size = -1
|
|
954
|
+
else:
|
|
955
|
+
num_groups_w2 = w2_scales_size // self.group_size
|
|
956
|
+
num_groups_w13 = hidden_size // self.group_size
|
|
957
|
+
|
|
958
|
+
w13_scale = torch.nn.Parameter(torch.ones(
|
|
959
|
+
num_experts,
|
|
960
|
+
num_groups_w13,
|
|
961
|
+
2 * intermediate_size_per_partition,
|
|
962
|
+
dtype=params_dtype),
|
|
963
|
+
requires_grad=False)
|
|
964
|
+
layer.register_parameter("w13_weight_scale", w13_scale)
|
|
965
|
+
set_weight_attrs(w13_scale, extra_weight_attrs)
|
|
966
|
+
|
|
967
|
+
w2_scale = torch.nn.Parameter(torch.ones(num_experts,
|
|
968
|
+
num_groups_w2,
|
|
969
|
+
hidden_size,
|
|
970
|
+
dtype=params_dtype),
|
|
971
|
+
requires_grad=False)
|
|
972
|
+
layer.register_parameter("w2_weight_scale", w2_scale)
|
|
973
|
+
set_weight_attrs(w2_scale, extra_weight_attrs)
|
|
974
|
+
set_weight_attrs(w2_scale, {"load_full_w2": False})
|
|
975
|
+
|
|
976
|
+
w2_weight_shape = torch.nn.Parameter(torch.empty(num_experts, 2),
|
|
977
|
+
requires_grad=False)
|
|
978
|
+
layer.register_parameter("w2_weight_shape", w2_weight_shape)
|
|
979
|
+
set_weight_attrs(w2_weight_shape, extra_weight_attrs)
|
|
980
|
+
w13_weight_shape = torch.nn.Parameter(torch.empty(num_experts, 2),
|
|
981
|
+
requires_grad=False)
|
|
982
|
+
|
|
983
|
+
layer.register_parameter("w13_weight_shape", w13_weight_shape)
|
|
984
|
+
set_weight_attrs(w13_weight_shape, extra_weight_attrs)
|
|
985
|
+
|
|
986
|
+
w13_g_idx = torch.nn.Parameter(
|
|
987
|
+
torch.empty(
|
|
988
|
+
num_experts,
|
|
989
|
+
hidden_size,
|
|
990
|
+
dtype=torch.int32,
|
|
991
|
+
),
|
|
992
|
+
requires_grad=False,
|
|
993
|
+
)
|
|
994
|
+
layer.register_parameter("w13_weight_g_idx", w13_g_idx)
|
|
995
|
+
set_weight_attrs(w13_g_idx, extra_weight_attrs)
|
|
996
|
+
|
|
997
|
+
w2_g_idx = torch.nn.Parameter(
|
|
998
|
+
torch.empty(
|
|
999
|
+
num_experts,
|
|
1000
|
+
intermediate_size_per_partition,
|
|
1001
|
+
dtype=torch.int32,
|
|
1002
|
+
),
|
|
1003
|
+
requires_grad=False,
|
|
1004
|
+
)
|
|
1005
|
+
layer.register_parameter("w2_weight_g_idx", w2_g_idx)
|
|
1006
|
+
set_weight_attrs(w2_g_idx, extra_weight_attrs)
|
|
1007
|
+
|
|
1008
|
+
w13_g_idx_sort_indices = torch.nn.Parameter(
|
|
1009
|
+
torch.empty(
|
|
1010
|
+
num_experts,
|
|
1011
|
+
hidden_size,
|
|
1012
|
+
dtype=torch.int32,
|
|
1013
|
+
),
|
|
1014
|
+
requires_grad=False,
|
|
1015
|
+
)
|
|
1016
|
+
layer.register_parameter("w13_g_idx_sort_indices",
|
|
1017
|
+
w13_g_idx_sort_indices)
|
|
1018
|
+
set_weight_attrs(w13_g_idx_sort_indices, extra_weight_attrs)
|
|
1019
|
+
|
|
1020
|
+
w2_g_idx_sort_indices = torch.nn.Parameter(
|
|
1021
|
+
torch.empty(
|
|
1022
|
+
num_experts,
|
|
1023
|
+
intermediate_size_per_partition,
|
|
1024
|
+
dtype=torch.int32,
|
|
1025
|
+
),
|
|
1026
|
+
requires_grad=False,
|
|
1027
|
+
)
|
|
1028
|
+
layer.register_parameter("w2_g_idx_sort_indices",
|
|
1029
|
+
w2_g_idx_sort_indices)
|
|
1030
|
+
set_weight_attrs(w2_g_idx_sort_indices, extra_weight_attrs)
|
|
1031
|
+
|
|
1032
|
+
layer.a13_scale = None
|
|
1033
|
+
layer.a2_scale = None
|
|
1034
|
+
|
|
1035
|
+
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
|
|
1036
|
+
# Reconfigure packed weights and scales to match moe_wna16 format
|
|
1037
|
+
layer.w13_weight_packed = torch.nn.Parameter(
|
|
1038
|
+
layer.w13_weight_packed.transpose(1, 2).contiguous().view(
|
|
1039
|
+
torch.uint8),
|
|
1040
|
+
requires_grad=False)
|
|
1041
|
+
layer.w2_weight_packed = torch.nn.Parameter(
|
|
1042
|
+
layer.w2_weight_packed.transpose(1,
|
|
1043
|
+
2).contiguous().view(torch.uint8),
|
|
1044
|
+
requires_grad=False)
|
|
1045
|
+
layer.w13_weight_scale = torch.nn.Parameter(
|
|
1046
|
+
layer.w13_weight_scale.transpose(1, 2).contiguous(),
|
|
1047
|
+
requires_grad=False)
|
|
1048
|
+
layer.w2_weight_scale = torch.nn.Parameter(
|
|
1049
|
+
layer.w2_weight_scale.transpose(1, 2).contiguous(),
|
|
1050
|
+
requires_grad=False)
|
|
1051
|
+
|
|
1052
|
+
def apply(
|
|
1053
|
+
self,
|
|
1054
|
+
layer: torch.nn.Module,
|
|
1055
|
+
x: torch.Tensor,
|
|
1056
|
+
router_logits: torch.Tensor,
|
|
1057
|
+
top_k: int,
|
|
1058
|
+
renormalize: bool,
|
|
1059
|
+
use_grouped_topk: bool = False,
|
|
1060
|
+
topk_group: Optional[int] = None,
|
|
1061
|
+
num_expert_group: Optional[int] = None,
|
|
1062
|
+
global_num_experts: int = -1,
|
|
1063
|
+
expert_map: Optional[torch.Tensor] = None,
|
|
1064
|
+
custom_routing_function: Optional[Callable] = None,
|
|
1065
|
+
scoring_func: str = "softmax",
|
|
1066
|
+
e_score_correction_bias: Optional[torch.Tensor] = None,
|
|
1067
|
+
apply_router_weight_on_input: bool = False,
|
|
1068
|
+
activation: str = "silu",
|
|
1069
|
+
) -> torch.Tensor:
|
|
1070
|
+
from vllm.model_executor.layers.fused_moe import fused_experts
|
|
1071
|
+
assert activation == "silu", "Only SiLU activation is supported."
|
|
1072
|
+
topk_weights, topk_ids = FusedMoE.select_experts(
|
|
1073
|
+
hidden_states=x,
|
|
1074
|
+
router_logits=router_logits,
|
|
1075
|
+
use_grouped_topk=use_grouped_topk,
|
|
1076
|
+
top_k=top_k,
|
|
1077
|
+
renormalize=renormalize,
|
|
1078
|
+
topk_group=topk_group,
|
|
1079
|
+
num_expert_group=num_expert_group,
|
|
1080
|
+
custom_routing_function=custom_routing_function,
|
|
1081
|
+
scoring_func=scoring_func,
|
|
1082
|
+
e_score_correction_bias=e_score_correction_bias)
|
|
1083
|
+
|
|
1084
|
+
return fused_experts(
|
|
1085
|
+
x,
|
|
1086
|
+
layer.w13_weight_packed,
|
|
1087
|
+
layer.w2_weight_packed,
|
|
1088
|
+
topk_weights=topk_weights,
|
|
1089
|
+
topk_ids=topk_ids,
|
|
1090
|
+
inplace=True,
|
|
1091
|
+
use_int4_w4a16=self.num_bits == 4,
|
|
1092
|
+
use_int8_w8a16=self.num_bits == 8,
|
|
1093
|
+
global_num_experts=global_num_experts,
|
|
1094
|
+
apply_router_weight_on_input=apply_router_weight_on_input,
|
|
1095
|
+
expert_map=expert_map,
|
|
1096
|
+
w1_scale=layer.w13_weight_scale,
|
|
1097
|
+
w2_scale=layer.w2_weight_scale,
|
|
1098
|
+
w1_zp=None,
|
|
1099
|
+
w2_zp=None,
|
|
1100
|
+
block_shape=[0, self.group_size])
|