vllm-cpu 0.12.0__cp313-cp313-manylinux_2_17_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vllm/_C.abi3.so +0 -0
- vllm/__init__.py +107 -0
- vllm/_aiter_ops.py +1018 -0
- vllm/_bc_linter.py +54 -0
- vllm/_custom_ops.py +2925 -0
- vllm/_ipex_ops.py +457 -0
- vllm/_version.py +34 -0
- vllm/assets/__init__.py +0 -0
- vllm/assets/audio.py +43 -0
- vllm/assets/base.py +40 -0
- vllm/assets/image.py +59 -0
- vllm/assets/video.py +149 -0
- vllm/attention/__init__.py +0 -0
- vllm/attention/backends/__init__.py +0 -0
- vllm/attention/backends/abstract.py +434 -0
- vllm/attention/backends/registry.py +286 -0
- vllm/attention/backends/utils.py +33 -0
- vllm/attention/layer.py +975 -0
- vllm/attention/layers/__init__.py +0 -0
- vllm/attention/layers/chunked_local_attention.py +120 -0
- vllm/attention/layers/cross_attention.py +178 -0
- vllm/attention/layers/encoder_only_attention.py +103 -0
- vllm/attention/ops/__init__.py +0 -0
- vllm/attention/ops/chunked_prefill_paged_decode.py +401 -0
- vllm/attention/ops/common.py +469 -0
- vllm/attention/ops/flashmla.py +251 -0
- vllm/attention/ops/merge_attn_states.py +47 -0
- vllm/attention/ops/paged_attn.py +51 -0
- vllm/attention/ops/pallas_kv_cache_update.py +130 -0
- vllm/attention/ops/prefix_prefill.py +814 -0
- vllm/attention/ops/rocm_aiter_mla_sparse.py +210 -0
- vllm/attention/ops/triton_decode_attention.py +712 -0
- vllm/attention/ops/triton_merge_attn_states.py +116 -0
- vllm/attention/ops/triton_reshape_and_cache_flash.py +184 -0
- vllm/attention/ops/triton_unified_attention.py +941 -0
- vllm/attention/ops/vit_attn_wrappers.py +136 -0
- vllm/attention/selector.py +268 -0
- vllm/attention/utils/__init__.py +0 -0
- vllm/attention/utils/fa_utils.py +117 -0
- vllm/attention/utils/kv_sharing_utils.py +33 -0
- vllm/attention/utils/kv_transfer_utils.py +60 -0
- vllm/beam_search.py +88 -0
- vllm/benchmarks/__init__.py +0 -0
- vllm/benchmarks/datasets.py +3222 -0
- vllm/benchmarks/latency.py +172 -0
- vllm/benchmarks/lib/__init__.py +3 -0
- vllm/benchmarks/lib/endpoint_request_func.py +777 -0
- vllm/benchmarks/lib/ready_checker.py +72 -0
- vllm/benchmarks/lib/utils.py +79 -0
- vllm/benchmarks/serve.py +1531 -0
- vllm/benchmarks/sweep/__init__.py +0 -0
- vllm/benchmarks/sweep/cli.py +41 -0
- vllm/benchmarks/sweep/param_sweep.py +91 -0
- vllm/benchmarks/sweep/plot.py +580 -0
- vllm/benchmarks/sweep/plot_pareto.py +393 -0
- vllm/benchmarks/sweep/serve.py +448 -0
- vllm/benchmarks/sweep/serve_sla.py +492 -0
- vllm/benchmarks/sweep/server.py +114 -0
- vllm/benchmarks/sweep/sla_sweep.py +132 -0
- vllm/benchmarks/sweep/utils.py +4 -0
- vllm/benchmarks/throughput.py +799 -0
- vllm/collect_env.py +857 -0
- vllm/compilation/__init__.py +0 -0
- vllm/compilation/activation_quant_fusion.py +209 -0
- vllm/compilation/backends.py +827 -0
- vllm/compilation/base_static_graph.py +57 -0
- vllm/compilation/caching.py +180 -0
- vllm/compilation/collective_fusion.py +1234 -0
- vllm/compilation/compiler_interface.py +639 -0
- vllm/compilation/counter.py +48 -0
- vllm/compilation/cuda_graph.py +208 -0
- vllm/compilation/decorators.py +614 -0
- vllm/compilation/fix_functionalization.py +253 -0
- vllm/compilation/fusion.py +374 -0
- vllm/compilation/fusion_attn.py +359 -0
- vllm/compilation/fx_utils.py +91 -0
- vllm/compilation/inductor_pass.py +133 -0
- vllm/compilation/matcher_utils.py +315 -0
- vllm/compilation/monitor.py +62 -0
- vllm/compilation/noop_elimination.py +134 -0
- vllm/compilation/partition_rules.py +72 -0
- vllm/compilation/pass_manager.py +136 -0
- vllm/compilation/piecewise_backend.py +121 -0
- vllm/compilation/post_cleanup.py +21 -0
- vllm/compilation/qk_norm_rope_fusion.py +238 -0
- vllm/compilation/sequence_parallelism.py +363 -0
- vllm/compilation/torch25_custom_graph_pass.py +44 -0
- vllm/compilation/vllm_inductor_pass.py +173 -0
- vllm/compilation/wrapper.py +260 -0
- vllm/config/__init__.py +102 -0
- vllm/config/cache.py +220 -0
- vllm/config/compilation.py +1154 -0
- vllm/config/device.py +75 -0
- vllm/config/ec_transfer.py +110 -0
- vllm/config/kv_events.py +56 -0
- vllm/config/kv_transfer.py +114 -0
- vllm/config/load.py +124 -0
- vllm/config/lora.py +96 -0
- vllm/config/model.py +2274 -0
- vllm/config/multimodal.py +247 -0
- vllm/config/observability.py +131 -0
- vllm/config/parallel.py +653 -0
- vllm/config/pooler.py +124 -0
- vllm/config/scheduler.py +297 -0
- vllm/config/speculative.py +643 -0
- vllm/config/speech_to_text.py +38 -0
- vllm/config/structured_outputs.py +94 -0
- vllm/config/utils.py +324 -0
- vllm/config/vllm.py +1353 -0
- vllm/connections.py +189 -0
- vllm/device_allocator/__init__.py +0 -0
- vllm/device_allocator/cumem.py +327 -0
- vllm/distributed/__init__.py +6 -0
- vllm/distributed/communication_op.py +43 -0
- vllm/distributed/device_communicators/__init__.py +0 -0
- vllm/distributed/device_communicators/all2all.py +490 -0
- vllm/distributed/device_communicators/all_reduce_utils.py +344 -0
- vllm/distributed/device_communicators/base_device_communicator.py +297 -0
- vllm/distributed/device_communicators/cpu_communicator.py +209 -0
- vllm/distributed/device_communicators/cuda_communicator.py +340 -0
- vllm/distributed/device_communicators/cuda_wrapper.py +216 -0
- vllm/distributed/device_communicators/custom_all_reduce.py +326 -0
- vllm/distributed/device_communicators/mnnvl_compat.py +27 -0
- vllm/distributed/device_communicators/pynccl.py +386 -0
- vllm/distributed/device_communicators/pynccl_allocator.py +191 -0
- vllm/distributed/device_communicators/pynccl_wrapper.py +564 -0
- vllm/distributed/device_communicators/quick_all_reduce.py +290 -0
- vllm/distributed/device_communicators/ray_communicator.py +259 -0
- vllm/distributed/device_communicators/shm_broadcast.py +733 -0
- vllm/distributed/device_communicators/shm_object_storage.py +697 -0
- vllm/distributed/device_communicators/symm_mem.py +156 -0
- vllm/distributed/device_communicators/tpu_communicator.py +99 -0
- vllm/distributed/device_communicators/xpu_communicator.py +95 -0
- vllm/distributed/ec_transfer/__init__.py +14 -0
- vllm/distributed/ec_transfer/ec_connector/__init__.py +0 -0
- vllm/distributed/ec_transfer/ec_connector/base.py +247 -0
- vllm/distributed/ec_transfer/ec_connector/factory.py +85 -0
- vllm/distributed/ec_transfer/ec_connector/shared_storage_connector.py +201 -0
- vllm/distributed/ec_transfer/ec_transfer_state.py +42 -0
- vllm/distributed/eplb/__init__.py +8 -0
- vllm/distributed/eplb/async_worker.py +115 -0
- vllm/distributed/eplb/eplb_state.py +1154 -0
- vllm/distributed/eplb/rebalance_algo.py +260 -0
- vllm/distributed/eplb/rebalance_execute.py +532 -0
- vllm/distributed/kv_events.py +371 -0
- vllm/distributed/kv_transfer/README.md +29 -0
- vllm/distributed/kv_transfer/__init__.py +20 -0
- vllm/distributed/kv_transfer/disagg_prefill_workflow.jpg +0 -0
- vllm/distributed/kv_transfer/kv_connector/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/base.py +10 -0
- vllm/distributed/kv_transfer/kv_connector/factory.py +192 -0
- vllm/distributed/kv_transfer/kv_connector/utils.py +268 -0
- vllm/distributed/kv_transfer/kv_connector/v1/__init__.py +19 -0
- vllm/distributed/kv_transfer/kv_connector/v1/base.py +575 -0
- vllm/distributed/kv_transfer/kv_connector/v1/decode_bench_connector.py +419 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py +216 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/__init__.py +18 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/multi_process_adapter.py +378 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py +221 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/vllm_v1_adapter.py +1411 -0
- vllm/distributed/kv_transfer/kv_connector/v1/lmcache_mp_connector.py +895 -0
- vllm/distributed/kv_transfer/kv_connector/v1/metrics.py +189 -0
- vllm/distributed/kv_transfer/kv_connector/v1/multi_connector.py +454 -0
- vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py +2480 -0
- vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py +538 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py +531 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py +632 -0
- vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py +273 -0
- vllm/distributed/kv_transfer/kv_connector/v1/shared_storage_connector.py +450 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +179 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/mooncake_store.py +164 -0
- vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +242 -0
- vllm/distributed/kv_transfer/kv_pipe/__init__.py +0 -0
- vllm/distributed/kv_transfer/kv_pipe/base.py +66 -0
- vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +295 -0
- vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +285 -0
- vllm/distributed/kv_transfer/kv_transfer_state.py +78 -0
- vllm/distributed/parallel_state.py +1790 -0
- vllm/distributed/tpu_distributed_utils.py +188 -0
- vllm/distributed/utils.py +545 -0
- vllm/engine/__init__.py +0 -0
- vllm/engine/arg_utils.py +2106 -0
- vllm/engine/async_llm_engine.py +6 -0
- vllm/engine/llm_engine.py +6 -0
- vllm/engine/protocol.py +188 -0
- vllm/entrypoints/__init__.py +0 -0
- vllm/entrypoints/anthropic/__init__.py +0 -0
- vllm/entrypoints/anthropic/protocol.py +162 -0
- vllm/entrypoints/anthropic/serving_messages.py +460 -0
- vllm/entrypoints/api_server.py +184 -0
- vllm/entrypoints/chat_utils.py +1837 -0
- vllm/entrypoints/cli/__init__.py +13 -0
- vllm/entrypoints/cli/benchmark/__init__.py +0 -0
- vllm/entrypoints/cli/benchmark/base.py +25 -0
- vllm/entrypoints/cli/benchmark/latency.py +21 -0
- vllm/entrypoints/cli/benchmark/main.py +56 -0
- vllm/entrypoints/cli/benchmark/serve.py +21 -0
- vllm/entrypoints/cli/benchmark/sweep.py +21 -0
- vllm/entrypoints/cli/benchmark/throughput.py +21 -0
- vllm/entrypoints/cli/collect_env.py +38 -0
- vllm/entrypoints/cli/main.py +79 -0
- vllm/entrypoints/cli/openai.py +256 -0
- vllm/entrypoints/cli/run_batch.py +68 -0
- vllm/entrypoints/cli/serve.py +249 -0
- vllm/entrypoints/cli/types.py +29 -0
- vllm/entrypoints/constants.py +10 -0
- vllm/entrypoints/context.py +572 -0
- vllm/entrypoints/dynamic_lora.py +57 -0
- vllm/entrypoints/harmony_utils.py +535 -0
- vllm/entrypoints/launcher.py +175 -0
- vllm/entrypoints/llm.py +1762 -0
- vllm/entrypoints/logger.py +84 -0
- vllm/entrypoints/openai/__init__.py +0 -0
- vllm/entrypoints/openai/api_server.py +1891 -0
- vllm/entrypoints/openai/cli_args.py +302 -0
- vllm/entrypoints/openai/orca_metrics.py +120 -0
- vllm/entrypoints/openai/protocol.py +2465 -0
- vllm/entrypoints/openai/run_batch.py +631 -0
- vllm/entrypoints/openai/serving_chat.py +1782 -0
- vllm/entrypoints/openai/serving_completion.py +716 -0
- vllm/entrypoints/openai/serving_engine.py +1478 -0
- vllm/entrypoints/openai/serving_models.py +304 -0
- vllm/entrypoints/openai/serving_responses.py +2032 -0
- vllm/entrypoints/openai/serving_tokenization.py +203 -0
- vllm/entrypoints/openai/serving_tokens.py +281 -0
- vllm/entrypoints/openai/serving_transcription.py +168 -0
- vllm/entrypoints/openai/speech_to_text.py +559 -0
- vllm/entrypoints/openai/tool_parsers/__init__.py +142 -0
- vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv31_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/ernie45_tool_parser.py +210 -0
- vllm/entrypoints/openai/tool_parsers/glm4_moe_tool_parser.py +200 -0
- vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +273 -0
- vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +253 -0
- vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +494 -0
- vllm/entrypoints/openai/tool_parsers/hunyuan_a13b_tool_parser.py +420 -0
- vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +227 -0
- vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +322 -0
- vllm/entrypoints/openai/tool_parsers/kimi_k2_tool_parser.py +590 -0
- vllm/entrypoints/openai/tool_parsers/llama4_pythonic_tool_parser.py +341 -0
- vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +324 -0
- vllm/entrypoints/openai/tool_parsers/longcat_tool_parser.py +37 -0
- vllm/entrypoints/openai/tool_parsers/minimax_m2_tool_parser.py +643 -0
- vllm/entrypoints/openai/tool_parsers/minimax_tool_parser.py +849 -0
- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +390 -0
- vllm/entrypoints/openai/tool_parsers/olmo3_tool_parser.py +366 -0
- vllm/entrypoints/openai/tool_parsers/openai_tool_parser.py +97 -0
- vllm/entrypoints/openai/tool_parsers/phi4mini_tool_parser.py +120 -0
- vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +332 -0
- vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py +781 -0
- vllm/entrypoints/openai/tool_parsers/qwen3xml_tool_parser.py +1316 -0
- vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py +744 -0
- vllm/entrypoints/openai/tool_parsers/step3_tool_parser.py +303 -0
- vllm/entrypoints/openai/tool_parsers/utils.py +229 -0
- vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py +556 -0
- vllm/entrypoints/openai/utils.py +49 -0
- vllm/entrypoints/pooling/__init__.py +16 -0
- vllm/entrypoints/pooling/classify/__init__.py +0 -0
- vllm/entrypoints/pooling/classify/api_router.py +50 -0
- vllm/entrypoints/pooling/classify/protocol.py +181 -0
- vllm/entrypoints/pooling/classify/serving.py +237 -0
- vllm/entrypoints/pooling/embed/__init__.py +0 -0
- vllm/entrypoints/pooling/embed/api_router.py +67 -0
- vllm/entrypoints/pooling/embed/protocol.py +208 -0
- vllm/entrypoints/pooling/embed/serving.py +697 -0
- vllm/entrypoints/pooling/pooling/__init__.py +0 -0
- vllm/entrypoints/pooling/pooling/api_router.py +63 -0
- vllm/entrypoints/pooling/pooling/protocol.py +148 -0
- vllm/entrypoints/pooling/pooling/serving.py +348 -0
- vllm/entrypoints/pooling/score/__init__.py +0 -0
- vllm/entrypoints/pooling/score/api_router.py +149 -0
- vllm/entrypoints/pooling/score/protocol.py +145 -0
- vllm/entrypoints/pooling/score/serving.py +505 -0
- vllm/entrypoints/renderer.py +409 -0
- vllm/entrypoints/responses_utils.py +148 -0
- vllm/entrypoints/sagemaker/__init__.py +4 -0
- vllm/entrypoints/sagemaker/routes.py +118 -0
- vllm/entrypoints/score_utils.py +240 -0
- vllm/entrypoints/ssl.py +78 -0
- vllm/entrypoints/tool.py +143 -0
- vllm/entrypoints/tool_server.py +234 -0
- vllm/entrypoints/utils.py +319 -0
- vllm/env_override.py +378 -0
- vllm/envs.py +1710 -0
- vllm/forward_context.py +358 -0
- vllm/inputs/__init__.py +44 -0
- vllm/inputs/data.py +359 -0
- vllm/inputs/parse.py +137 -0
- vllm/inputs/preprocess.py +716 -0
- vllm/logger.py +298 -0
- vllm/logging_utils/__init__.py +13 -0
- vllm/logging_utils/dump_input.py +83 -0
- vllm/logging_utils/formatter.py +127 -0
- vllm/logging_utils/lazy.py +20 -0
- vllm/logging_utils/log_time.py +34 -0
- vllm/logits_process.py +121 -0
- vllm/logprobs.py +206 -0
- vllm/lora/__init__.py +0 -0
- vllm/lora/layers/__init__.py +42 -0
- vllm/lora/layers/base.py +66 -0
- vllm/lora/layers/base_linear.py +165 -0
- vllm/lora/layers/column_parallel_linear.py +577 -0
- vllm/lora/layers/fused_moe.py +747 -0
- vllm/lora/layers/logits_processor.py +203 -0
- vllm/lora/layers/replicated_linear.py +70 -0
- vllm/lora/layers/row_parallel_linear.py +176 -0
- vllm/lora/layers/utils.py +74 -0
- vllm/lora/layers/vocal_parallel_embedding.py +140 -0
- vllm/lora/lora_weights.py +227 -0
- vllm/lora/models.py +903 -0
- vllm/lora/ops/__init__.py +0 -0
- vllm/lora/ops/ipex_ops/__init__.py +6 -0
- vllm/lora/ops/ipex_ops/lora_ops.py +57 -0
- vllm/lora/ops/torch_ops/__init__.py +20 -0
- vllm/lora/ops/torch_ops/lora_ops.py +128 -0
- vllm/lora/ops/triton_ops/README_TUNING.md +60 -0
- vllm/lora/ops/triton_ops/__init__.py +21 -0
- vllm/lora/ops/triton_ops/fused_moe_lora_op.py +661 -0
- vllm/lora/ops/triton_ops/kernel_utils.py +340 -0
- vllm/lora/ops/triton_ops/lora_expand_op.py +310 -0
- vllm/lora/ops/triton_ops/lora_kernel_metadata.py +154 -0
- vllm/lora/ops/triton_ops/lora_shrink_op.py +287 -0
- vllm/lora/ops/triton_ops/utils.py +295 -0
- vllm/lora/ops/xla_ops/__init__.py +6 -0
- vllm/lora/ops/xla_ops/lora_ops.py +141 -0
- vllm/lora/peft_helper.py +128 -0
- vllm/lora/punica_wrapper/__init__.py +10 -0
- vllm/lora/punica_wrapper/punica_base.py +493 -0
- vllm/lora/punica_wrapper/punica_cpu.py +351 -0
- vllm/lora/punica_wrapper/punica_gpu.py +412 -0
- vllm/lora/punica_wrapper/punica_selector.py +21 -0
- vllm/lora/punica_wrapper/punica_tpu.py +358 -0
- vllm/lora/punica_wrapper/punica_xpu.py +276 -0
- vllm/lora/punica_wrapper/utils.py +150 -0
- vllm/lora/request.py +100 -0
- vllm/lora/resolver.py +88 -0
- vllm/lora/utils.py +306 -0
- vllm/lora/worker_manager.py +268 -0
- vllm/model_executor/__init__.py +11 -0
- vllm/model_executor/custom_op.py +194 -0
- vllm/model_executor/layers/__init__.py +0 -0
- vllm/model_executor/layers/activation.py +595 -0
- vllm/model_executor/layers/attention_layer_base.py +32 -0
- vllm/model_executor/layers/batch_invariant.py +1058 -0
- vllm/model_executor/layers/conv.py +256 -0
- vllm/model_executor/layers/fla/__init__.py +8 -0
- vllm/model_executor/layers/fla/ops/__init__.py +17 -0
- vllm/model_executor/layers/fla/ops/chunk.py +240 -0
- vllm/model_executor/layers/fla/ops/chunk_delta_h.py +344 -0
- vllm/model_executor/layers/fla/ops/chunk_o.py +183 -0
- vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +154 -0
- vllm/model_executor/layers/fla/ops/cumsum.py +280 -0
- vllm/model_executor/layers/fla/ops/fused_recurrent.py +390 -0
- vllm/model_executor/layers/fla/ops/index.py +41 -0
- vllm/model_executor/layers/fla/ops/kda.py +1351 -0
- vllm/model_executor/layers/fla/ops/l2norm.py +146 -0
- vllm/model_executor/layers/fla/ops/layernorm_guard.py +396 -0
- vllm/model_executor/layers/fla/ops/op.py +60 -0
- vllm/model_executor/layers/fla/ops/solve_tril.py +556 -0
- vllm/model_executor/layers/fla/ops/utils.py +194 -0
- vllm/model_executor/layers/fla/ops/wy_fast.py +158 -0
- vllm/model_executor/layers/fused_moe/__init__.py +110 -0
- vllm/model_executor/layers/fused_moe/all2all_utils.py +171 -0
- vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py +406 -0
- vllm/model_executor/layers/fused_moe/batched_triton_or_deep_gemm_moe.py +180 -0
- vllm/model_executor/layers/fused_moe/config.py +938 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H100_80GB_HBM3.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=1,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H100,dtype=fp8_w8a8.json +123 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=1856,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=192,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=352,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +122 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=384,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=512,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=704,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +114 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=AMD_Instinct_MI308X.json +213 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=768,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_H100_80GB_HBM3.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=928,device_name=NVIDIA_L40S.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=128,N=96,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H100.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1024,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1344,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=2688,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3072,device_name=NVIDIA_H200,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3200,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +218 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=6400,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=float8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=int8_w8a16.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=16,N=800,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +130 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI300X.json +201 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=320,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI350_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=384,device_name=AMD_Instinct_MI355_OAM,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=160,N=640,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=1536,device_name=NVIDIA_RTX_PRO_6000_Blackwell_Server_Edition,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=20,N=2560,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325X,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H20-3e,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=256,N=64,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=32,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=128,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=384,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_GB200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=40,N=2560,device_name=NVIDIA_H100,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_GB200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=512,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_A100-SXM4-80GB.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_B200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H20-3e.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=1408,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=176,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=352,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=60,N=704,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=128,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=256,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=62,N=512,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1280,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1408,device_name=NVIDIA_B200.json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=2560,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=3072,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=320,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=384,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_A800-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=640,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H100_PCIe,dtype=fp8_w8a8,block_shape=[128,128].json +147 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=768,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=NVIDIA_H20.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=bf16.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=64,N=8960,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +82 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=384,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=72,N=768,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +138 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=14336,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=16384,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +154 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=2048,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-40GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_GeForce_RTX_4090,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=3584,device_name=NVIDIA_L40S.json +173 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=4096,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_A100-SXM4-80GB.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=7168,device_name=NVIDIA_H200.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI300X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8.json +164 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=AMD_Instinct_MI325X.json +200 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/E=8,N=8192,device_name=NVIDIA_H200,dtype=fp8_w8a8.json +146 -0
- vllm/model_executor/layers/fused_moe/configs/README +12 -0
- vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +292 -0
- vllm/model_executor/layers/fused_moe/cutlass_moe.py +1052 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_moe.py +387 -0
- vllm/model_executor/layers/fused_moe/deep_gemm_utils.py +416 -0
- vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py +420 -0
- vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py +434 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutedsl_moe.py +376 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_moe.py +307 -0
- vllm/model_executor/layers/fused_moe/flashinfer_cutlass_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/flashinfer_trtllm_moe.py +192 -0
- vllm/model_executor/layers/fused_moe/fused_batched_moe.py +1012 -0
- vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +821 -0
- vllm/model_executor/layers/fused_moe/fused_moe.py +2172 -0
- vllm/model_executor/layers/fused_moe/fused_moe_method_base.py +121 -0
- vllm/model_executor/layers/fused_moe/fused_moe_modular_method.py +136 -0
- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +524 -0
- vllm/model_executor/layers/fused_moe/layer.py +2152 -0
- vllm/model_executor/layers/fused_moe/modular_kernel.py +1332 -0
- vllm/model_executor/layers/fused_moe/moe_align_block_size.py +174 -0
- vllm/model_executor/layers/fused_moe/moe_pallas.py +83 -0
- vllm/model_executor/layers/fused_moe/moe_permute_unpermute.py +229 -0
- vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +60 -0
- vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py +362 -0
- vllm/model_executor/layers/fused_moe/prepare_finalize.py +78 -0
- vllm/model_executor/layers/fused_moe/rocm_aiter_fused_moe.py +265 -0
- vllm/model_executor/layers/fused_moe/routing_simulator.py +310 -0
- vllm/model_executor/layers/fused_moe/shared_fused_moe.py +96 -0
- vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py +171 -0
- vllm/model_executor/layers/fused_moe/triton_deep_gemm_moe.py +163 -0
- vllm/model_executor/layers/fused_moe/trtllm_moe.py +143 -0
- vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py +559 -0
- vllm/model_executor/layers/fused_moe/utils.py +332 -0
- vllm/model_executor/layers/kda.py +442 -0
- vllm/model_executor/layers/layernorm.py +442 -0
- vllm/model_executor/layers/lightning_attn.py +735 -0
- vllm/model_executor/layers/linear.py +1424 -0
- vllm/model_executor/layers/logits_processor.py +106 -0
- vllm/model_executor/layers/mamba/__init__.py +0 -0
- vllm/model_executor/layers/mamba/abstract.py +68 -0
- vllm/model_executor/layers/mamba/linear_attn.py +388 -0
- vllm/model_executor/layers/mamba/mamba_mixer.py +527 -0
- vllm/model_executor/layers/mamba/mamba_mixer2.py +930 -0
- vllm/model_executor/layers/mamba/mamba_utils.py +225 -0
- vllm/model_executor/layers/mamba/ops/__init__.py +0 -0
- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +1240 -0
- vllm/model_executor/layers/mamba/ops/layernorm_gated.py +172 -0
- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +478 -0
- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +211 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +456 -0
- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +700 -0
- vllm/model_executor/layers/mamba/ops/ssd_combined.py +230 -0
- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +157 -0
- vllm/model_executor/layers/mamba/short_conv.py +255 -0
- vllm/model_executor/layers/mla.py +176 -0
- vllm/model_executor/layers/pooler.py +817 -0
- vllm/model_executor/layers/quantization/__init__.py +179 -0
- vllm/model_executor/layers/quantization/auto_round.py +454 -0
- vllm/model_executor/layers/quantization/awq.py +277 -0
- vllm/model_executor/layers/quantization/awq_marlin.py +718 -0
- vllm/model_executor/layers/quantization/awq_triton.py +337 -0
- vllm/model_executor/layers/quantization/base_config.py +170 -0
- vllm/model_executor/layers/quantization/bitblas.py +502 -0
- vllm/model_executor/layers/quantization/bitsandbytes.py +644 -0
- vllm/model_executor/layers/quantization/compressed_tensors/__init__.py +3 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +963 -0
- vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +2387 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +35 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +392 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +55 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +176 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py +124 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py +218 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py +183 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py +153 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +138 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +200 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +125 -0
- vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +230 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/linear.py +260 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/module.py +173 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/__init__.py +0 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/schemes/linear_qutlass_nvfp4.py +64 -0
- vllm/model_executor/layers/quantization/compressed_tensors/transform/utils.py +13 -0
- vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +224 -0
- vllm/model_executor/layers/quantization/compressed_tensors/utils.py +216 -0
- vllm/model_executor/layers/quantization/cpu_wna16.py +625 -0
- vllm/model_executor/layers/quantization/deepspeedfp.py +218 -0
- vllm/model_executor/layers/quantization/experts_int8.py +225 -0
- vllm/model_executor/layers/quantization/fbgemm_fp8.py +195 -0
- vllm/model_executor/layers/quantization/fp8.py +1348 -0
- vllm/model_executor/layers/quantization/fp_quant.py +420 -0
- vllm/model_executor/layers/quantization/gguf.py +687 -0
- vllm/model_executor/layers/quantization/gptq.py +393 -0
- vllm/model_executor/layers/quantization/gptq_bitblas.py +482 -0
- vllm/model_executor/layers/quantization/gptq_marlin.py +842 -0
- vllm/model_executor/layers/quantization/gptq_marlin_24.py +320 -0
- vllm/model_executor/layers/quantization/hqq_marlin.py +372 -0
- vllm/model_executor/layers/quantization/inc.py +65 -0
- vllm/model_executor/layers/quantization/input_quant_fp8.py +171 -0
- vllm/model_executor/layers/quantization/ipex_quant.py +470 -0
- vllm/model_executor/layers/quantization/kernels/__init__.py +0 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +94 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +105 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/allspark.py +115 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/bitblas.py +323 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/conch.py +98 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/cutlass.py +119 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/dynamic_4bit.py +111 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +161 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +159 -0
- vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +200 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +73 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +97 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/aiter.py +120 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cpu.py +219 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +140 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +42 -0
- vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +105 -0
- vllm/model_executor/layers/quantization/kv_cache.py +146 -0
- vllm/model_executor/layers/quantization/modelopt.py +1637 -0
- vllm/model_executor/layers/quantization/moe_wna16.py +528 -0
- vllm/model_executor/layers/quantization/mxfp4.py +1175 -0
- vllm/model_executor/layers/quantization/petit.py +319 -0
- vllm/model_executor/layers/quantization/ptpc_fp8.py +136 -0
- vllm/model_executor/layers/quantization/quark/__init__.py +0 -0
- vllm/model_executor/layers/quantization/quark/quark.py +527 -0
- vllm/model_executor/layers/quantization/quark/quark_moe.py +653 -0
- vllm/model_executor/layers/quantization/quark/schemes/__init__.py +9 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_ocp_mx.py +343 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +55 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +179 -0
- vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +139 -0
- vllm/model_executor/layers/quantization/quark/utils.py +105 -0
- vllm/model_executor/layers/quantization/qutlass_utils.py +185 -0
- vllm/model_executor/layers/quantization/rtn.py +639 -0
- vllm/model_executor/layers/quantization/schema.py +90 -0
- vllm/model_executor/layers/quantization/torchao.py +380 -0
- vllm/model_executor/layers/quantization/tpu_int8.py +139 -0
- vllm/model_executor/layers/quantization/utils/__init__.py +6 -0
- vllm/model_executor/layers/quantization/utils/allspark_utils.py +67 -0
- vllm/model_executor/layers/quantization/utils/bitblas_utils.py +229 -0
- vllm/model_executor/layers/quantization/utils/configs/N=10240,K=5120,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=12288,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=1536,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=1536,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2048,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2112,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=2304,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=24576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=256,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=1536,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=3072,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=32768,K=512,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=36864,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=512,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4096,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=4608,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=512,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=5120,K=25600,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=5120,K=8192,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=51200,K=5120,device_name=NVIDIA_L40S,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +18 -0
- vllm/model_executor/layers/quantization/utils/configs/N=576,K=7168,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1024,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=1152,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=128,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=16384,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A100-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_A800-SXM4-80GB,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=18432,device_name=NVIDIA_L20Y,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2048,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H100_80GB_HBM3,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=2304,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H20,dtype=int8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_H200,dtype=fp8_w8a8,block_shape=[128,128].json +146 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=256,device_name=NVIDIA_L20,dtype=fp8_w8a8,block_shape=[128,128].json +26 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=7168,K=8192,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI300X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325X,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/N=8192,K=1536,device_name=AMD_Instinct_MI325_OAM,dtype=fp8_w8a8,block_shape=[128,128].json +164 -0
- vllm/model_executor/layers/quantization/utils/configs/README.md +3 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +333 -0
- vllm/model_executor/layers/quantization/utils/flashinfer_utils.py +311 -0
- vllm/model_executor/layers/quantization/utils/fp8_utils.py +1203 -0
- vllm/model_executor/layers/quantization/utils/gptq_utils.py +158 -0
- vllm/model_executor/layers/quantization/utils/int8_utils.py +489 -0
- vllm/model_executor/layers/quantization/utils/layer_utils.py +41 -0
- vllm/model_executor/layers/quantization/utils/machete_utils.py +56 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils.py +674 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp4.py +452 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +378 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +219 -0
- vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +467 -0
- vllm/model_executor/layers/quantization/utils/mxfp4_utils.py +183 -0
- vllm/model_executor/layers/quantization/utils/mxfp6_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/mxfp8_utils.py +24 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_emulation_utils.py +142 -0
- vllm/model_executor/layers/quantization/utils/nvfp4_moe_support.py +67 -0
- vllm/model_executor/layers/quantization/utils/ocp_mx_utils.py +51 -0
- vllm/model_executor/layers/quantization/utils/petit_utils.py +124 -0
- vllm/model_executor/layers/quantization/utils/quant_utils.py +687 -0
- vllm/model_executor/layers/quantization/utils/w8a8_utils.py +516 -0
- vllm/model_executor/layers/resampler.py +283 -0
- vllm/model_executor/layers/rotary_embedding/__init__.py +292 -0
- vllm/model_executor/layers/rotary_embedding/base.py +240 -0
- vllm/model_executor/layers/rotary_embedding/common.py +188 -0
- vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py +165 -0
- vllm/model_executor/layers/rotary_embedding/dual_chunk_rope.py +215 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_alpha_rope.py +43 -0
- vllm/model_executor/layers/rotary_embedding/dynamic_ntk_scaling_rope.py +68 -0
- vllm/model_executor/layers/rotary_embedding/ernie45_vl_rope.py +75 -0
- vllm/model_executor/layers/rotary_embedding/linear_scaling_rope.py +115 -0
- vllm/model_executor/layers/rotary_embedding/llama3_rope.py +54 -0
- vllm/model_executor/layers/rotary_embedding/llama4_vision_rope.py +80 -0
- vllm/model_executor/layers/rotary_embedding/mrope.py +397 -0
- vllm/model_executor/layers/rotary_embedding/ntk_scaling_rope.py +47 -0
- vllm/model_executor/layers/rotary_embedding/phi3_long_rope_scaled_rope.py +159 -0
- vllm/model_executor/layers/rotary_embedding/xdrope.py +102 -0
- vllm/model_executor/layers/rotary_embedding/yarn_scaling_rope.py +84 -0
- vllm/model_executor/layers/utils.py +251 -0
- vllm/model_executor/layers/vocab_parallel_embedding.py +558 -0
- vllm/model_executor/model_loader/__init__.py +150 -0
- vllm/model_executor/model_loader/base_loader.py +57 -0
- vllm/model_executor/model_loader/bitsandbytes_loader.py +822 -0
- vllm/model_executor/model_loader/default_loader.py +321 -0
- vllm/model_executor/model_loader/dummy_loader.py +28 -0
- vllm/model_executor/model_loader/gguf_loader.py +349 -0
- vllm/model_executor/model_loader/online_quantization.py +275 -0
- vllm/model_executor/model_loader/runai_streamer_loader.py +116 -0
- vllm/model_executor/model_loader/sharded_state_loader.py +214 -0
- vllm/model_executor/model_loader/tensorizer.py +790 -0
- vllm/model_executor/model_loader/tensorizer_loader.py +151 -0
- vllm/model_executor/model_loader/tpu.py +118 -0
- vllm/model_executor/model_loader/utils.py +296 -0
- vllm/model_executor/model_loader/weight_utils.py +1147 -0
- vllm/model_executor/models/__init__.py +44 -0
- vllm/model_executor/models/adapters.py +543 -0
- vllm/model_executor/models/afmoe.py +697 -0
- vllm/model_executor/models/aimv2.py +248 -0
- vllm/model_executor/models/apertus.py +569 -0
- vllm/model_executor/models/arcee.py +428 -0
- vllm/model_executor/models/arctic.py +634 -0
- vllm/model_executor/models/aria.py +655 -0
- vllm/model_executor/models/aya_vision.py +450 -0
- vllm/model_executor/models/baichuan.py +494 -0
- vllm/model_executor/models/bailing_moe.py +645 -0
- vllm/model_executor/models/bamba.py +516 -0
- vllm/model_executor/models/bee.py +157 -0
- vllm/model_executor/models/bert.py +925 -0
- vllm/model_executor/models/bert_with_rope.py +732 -0
- vllm/model_executor/models/blip.py +350 -0
- vllm/model_executor/models/blip2.py +695 -0
- vllm/model_executor/models/bloom.py +390 -0
- vllm/model_executor/models/chameleon.py +1098 -0
- vllm/model_executor/models/chatglm.py +499 -0
- vllm/model_executor/models/clip.py +1005 -0
- vllm/model_executor/models/cohere2_vision.py +472 -0
- vllm/model_executor/models/commandr.py +470 -0
- vllm/model_executor/models/config.py +510 -0
- vllm/model_executor/models/dbrx.py +485 -0
- vllm/model_executor/models/deepencoder.py +676 -0
- vllm/model_executor/models/deepseek_eagle.py +252 -0
- vllm/model_executor/models/deepseek_mtp.py +446 -0
- vllm/model_executor/models/deepseek_ocr.py +593 -0
- vllm/model_executor/models/deepseek_v2.py +1715 -0
- vllm/model_executor/models/deepseek_vl2.py +644 -0
- vllm/model_executor/models/dots1.py +566 -0
- vllm/model_executor/models/dots_ocr.py +874 -0
- vllm/model_executor/models/ernie45.py +53 -0
- vllm/model_executor/models/ernie45_moe.py +755 -0
- vllm/model_executor/models/ernie45_vl.py +1710 -0
- vllm/model_executor/models/ernie45_vl_moe.py +800 -0
- vllm/model_executor/models/ernie_mtp.py +279 -0
- vllm/model_executor/models/exaone.py +525 -0
- vllm/model_executor/models/exaone4.py +517 -0
- vllm/model_executor/models/fairseq2_llama.py +154 -0
- vllm/model_executor/models/falcon.py +544 -0
- vllm/model_executor/models/falcon_h1.py +680 -0
- vllm/model_executor/models/flex_olmo.py +155 -0
- vllm/model_executor/models/fuyu.py +373 -0
- vllm/model_executor/models/gemma.py +426 -0
- vllm/model_executor/models/gemma2.py +436 -0
- vllm/model_executor/models/gemma3.py +577 -0
- vllm/model_executor/models/gemma3_mm.py +665 -0
- vllm/model_executor/models/gemma3n.py +1167 -0
- vllm/model_executor/models/gemma3n_mm.py +811 -0
- vllm/model_executor/models/glm.py +23 -0
- vllm/model_executor/models/glm4.py +298 -0
- vllm/model_executor/models/glm4_1v.py +1854 -0
- vllm/model_executor/models/glm4_moe.py +738 -0
- vllm/model_executor/models/glm4_moe_mtp.py +359 -0
- vllm/model_executor/models/glm4v.py +785 -0
- vllm/model_executor/models/gpt2.py +397 -0
- vllm/model_executor/models/gpt_bigcode.py +339 -0
- vllm/model_executor/models/gpt_j.py +345 -0
- vllm/model_executor/models/gpt_neox.py +343 -0
- vllm/model_executor/models/gpt_oss.py +745 -0
- vllm/model_executor/models/granite.py +476 -0
- vllm/model_executor/models/granite_speech.py +913 -0
- vllm/model_executor/models/granitemoe.py +561 -0
- vllm/model_executor/models/granitemoehybrid.py +704 -0
- vllm/model_executor/models/granitemoeshared.py +328 -0
- vllm/model_executor/models/gritlm.py +245 -0
- vllm/model_executor/models/grok1.py +555 -0
- vllm/model_executor/models/h2ovl.py +554 -0
- vllm/model_executor/models/hunyuan_v1.py +1042 -0
- vllm/model_executor/models/hunyuan_vision.py +1028 -0
- vllm/model_executor/models/hyperclovax_vision.py +1166 -0
- vllm/model_executor/models/idefics2_vision_model.py +427 -0
- vllm/model_executor/models/idefics3.py +718 -0
- vllm/model_executor/models/interfaces.py +1148 -0
- vllm/model_executor/models/interfaces_base.py +243 -0
- vllm/model_executor/models/intern_vit.py +454 -0
- vllm/model_executor/models/internlm2.py +454 -0
- vllm/model_executor/models/internlm2_ve.py +139 -0
- vllm/model_executor/models/interns1.py +830 -0
- vllm/model_executor/models/interns1_vit.py +433 -0
- vllm/model_executor/models/internvl.py +1452 -0
- vllm/model_executor/models/jais.py +397 -0
- vllm/model_executor/models/jamba.py +609 -0
- vllm/model_executor/models/jina_vl.py +147 -0
- vllm/model_executor/models/keye.py +1765 -0
- vllm/model_executor/models/keye_vl1_5.py +726 -0
- vllm/model_executor/models/kimi_linear.py +658 -0
- vllm/model_executor/models/kimi_vl.py +578 -0
- vllm/model_executor/models/lfm2.py +516 -0
- vllm/model_executor/models/lfm2_moe.py +746 -0
- vllm/model_executor/models/lightonocr.py +195 -0
- vllm/model_executor/models/llama.py +704 -0
- vllm/model_executor/models/llama4.py +857 -0
- vllm/model_executor/models/llama4_eagle.py +216 -0
- vllm/model_executor/models/llama_eagle.py +213 -0
- vllm/model_executor/models/llama_eagle3.py +375 -0
- vllm/model_executor/models/llava.py +842 -0
- vllm/model_executor/models/llava_next.py +583 -0
- vllm/model_executor/models/llava_next_video.py +467 -0
- vllm/model_executor/models/llava_onevision.py +923 -0
- vllm/model_executor/models/longcat_flash.py +743 -0
- vllm/model_executor/models/longcat_flash_mtp.py +349 -0
- vllm/model_executor/models/mamba.py +276 -0
- vllm/model_executor/models/mamba2.py +288 -0
- vllm/model_executor/models/medusa.py +179 -0
- vllm/model_executor/models/midashenglm.py +828 -0
- vllm/model_executor/models/mimo.py +188 -0
- vllm/model_executor/models/mimo_mtp.py +294 -0
- vllm/model_executor/models/minicpm.py +657 -0
- vllm/model_executor/models/minicpm3.py +234 -0
- vllm/model_executor/models/minicpm_eagle.py +385 -0
- vllm/model_executor/models/minicpmo.py +768 -0
- vllm/model_executor/models/minicpmv.py +1744 -0
- vllm/model_executor/models/minimax_m2.py +546 -0
- vllm/model_executor/models/minimax_text_01.py +1010 -0
- vllm/model_executor/models/minimax_vl_01.py +396 -0
- vllm/model_executor/models/mistral3.py +637 -0
- vllm/model_executor/models/mistral_large_3.py +63 -0
- vllm/model_executor/models/mistral_large_3_eagle.py +165 -0
- vllm/model_executor/models/mixtral.py +599 -0
- vllm/model_executor/models/mllama4.py +1151 -0
- vllm/model_executor/models/mlp_speculator.py +235 -0
- vllm/model_executor/models/modernbert.py +452 -0
- vllm/model_executor/models/module_mapping.py +74 -0
- vllm/model_executor/models/molmo.py +1553 -0
- vllm/model_executor/models/moonvit.py +686 -0
- vllm/model_executor/models/mpt.py +335 -0
- vllm/model_executor/models/nano_nemotron_vl.py +1732 -0
- vllm/model_executor/models/nemotron.py +502 -0
- vllm/model_executor/models/nemotron_h.py +850 -0
- vllm/model_executor/models/nemotron_nas.py +473 -0
- vllm/model_executor/models/nemotron_vl.py +653 -0
- vllm/model_executor/models/nvlm_d.py +216 -0
- vllm/model_executor/models/olmo.py +413 -0
- vllm/model_executor/models/olmo2.py +455 -0
- vllm/model_executor/models/olmoe.py +494 -0
- vllm/model_executor/models/opencua.py +271 -0
- vllm/model_executor/models/openpangu.py +1051 -0
- vllm/model_executor/models/openpangu_mtp.py +265 -0
- vllm/model_executor/models/opt.py +426 -0
- vllm/model_executor/models/orion.py +366 -0
- vllm/model_executor/models/ouro.py +508 -0
- vllm/model_executor/models/ovis.py +559 -0
- vllm/model_executor/models/ovis2_5.py +673 -0
- vllm/model_executor/models/paddleocr_vl.py +1380 -0
- vllm/model_executor/models/paligemma.py +412 -0
- vllm/model_executor/models/persimmon.py +376 -0
- vllm/model_executor/models/phi.py +370 -0
- vllm/model_executor/models/phi3.py +18 -0
- vllm/model_executor/models/phi3v.py +737 -0
- vllm/model_executor/models/phi4_multimodal.py +1447 -0
- vllm/model_executor/models/phi4mm.py +1253 -0
- vllm/model_executor/models/phi4mm_audio.py +1296 -0
- vllm/model_executor/models/phi4mm_utils.py +1907 -0
- vllm/model_executor/models/phimoe.py +670 -0
- vllm/model_executor/models/pixtral.py +1380 -0
- vllm/model_executor/models/plamo2.py +966 -0
- vllm/model_executor/models/plamo3.py +441 -0
- vllm/model_executor/models/qwen.py +363 -0
- vllm/model_executor/models/qwen2.py +569 -0
- vllm/model_executor/models/qwen2_5_omni_thinker.py +1220 -0
- vllm/model_executor/models/qwen2_5_vl.py +1594 -0
- vllm/model_executor/models/qwen2_audio.py +473 -0
- vllm/model_executor/models/qwen2_moe.py +590 -0
- vllm/model_executor/models/qwen2_rm.py +123 -0
- vllm/model_executor/models/qwen2_vl.py +1593 -0
- vllm/model_executor/models/qwen3.py +332 -0
- vllm/model_executor/models/qwen3_moe.py +738 -0
- vllm/model_executor/models/qwen3_next.py +1390 -0
- vllm/model_executor/models/qwen3_next_mtp.py +296 -0
- vllm/model_executor/models/qwen3_omni_moe_thinker.py +1765 -0
- vllm/model_executor/models/qwen3_vl.py +1686 -0
- vllm/model_executor/models/qwen3_vl_moe.py +470 -0
- vllm/model_executor/models/qwen_vl.py +803 -0
- vllm/model_executor/models/radio.py +555 -0
- vllm/model_executor/models/registry.py +1183 -0
- vllm/model_executor/models/roberta.py +259 -0
- vllm/model_executor/models/rvl.py +107 -0
- vllm/model_executor/models/seed_oss.py +493 -0
- vllm/model_executor/models/siglip.py +1245 -0
- vllm/model_executor/models/siglip2navit.py +723 -0
- vllm/model_executor/models/skyworkr1v.py +953 -0
- vllm/model_executor/models/smolvlm.py +38 -0
- vllm/model_executor/models/solar.py +485 -0
- vllm/model_executor/models/stablelm.py +359 -0
- vllm/model_executor/models/starcoder2.py +366 -0
- vllm/model_executor/models/step3_text.py +555 -0
- vllm/model_executor/models/step3_vl.py +1149 -0
- vllm/model_executor/models/swin.py +514 -0
- vllm/model_executor/models/tarsier.py +619 -0
- vllm/model_executor/models/telechat2.py +153 -0
- vllm/model_executor/models/teleflm.py +78 -0
- vllm/model_executor/models/terratorch.py +319 -0
- vllm/model_executor/models/transformers/__init__.py +127 -0
- vllm/model_executor/models/transformers/base.py +464 -0
- vllm/model_executor/models/transformers/causal.py +65 -0
- vllm/model_executor/models/transformers/legacy.py +90 -0
- vllm/model_executor/models/transformers/moe.py +325 -0
- vllm/model_executor/models/transformers/multimodal.py +411 -0
- vllm/model_executor/models/transformers/pooling.py +119 -0
- vllm/model_executor/models/transformers/utils.py +213 -0
- vllm/model_executor/models/ultravox.py +686 -0
- vllm/model_executor/models/utils.py +832 -0
- vllm/model_executor/models/vision.py +552 -0
- vllm/model_executor/models/voxtral.py +842 -0
- vllm/model_executor/models/whisper.py +963 -0
- vllm/model_executor/models/zamba2.py +980 -0
- vllm/model_executor/parameter.py +642 -0
- vllm/model_executor/utils.py +94 -0
- vllm/model_executor/warmup/__init__.py +0 -0
- vllm/model_executor/warmup/deep_gemm_warmup.py +314 -0
- vllm/model_executor/warmup/kernel_warmup.py +98 -0
- vllm/multimodal/__init__.py +40 -0
- vllm/multimodal/audio.py +142 -0
- vllm/multimodal/base.py +26 -0
- vllm/multimodal/cache.py +830 -0
- vllm/multimodal/evs.py +294 -0
- vllm/multimodal/hasher.py +106 -0
- vllm/multimodal/image.py +130 -0
- vllm/multimodal/inputs.py +1036 -0
- vllm/multimodal/parse.py +544 -0
- vllm/multimodal/processing.py +2240 -0
- vllm/multimodal/profiling.py +369 -0
- vllm/multimodal/registry.py +357 -0
- vllm/multimodal/utils.py +523 -0
- vllm/multimodal/video.py +333 -0
- vllm/outputs.py +345 -0
- vllm/platforms/__init__.py +277 -0
- vllm/platforms/cpu.py +410 -0
- vllm/platforms/cuda.py +642 -0
- vllm/platforms/interface.py +656 -0
- vllm/platforms/rocm.py +513 -0
- vllm/platforms/tpu.py +275 -0
- vllm/platforms/xpu.py +261 -0
- vllm/plugins/__init__.py +81 -0
- vllm/plugins/io_processors/__init__.py +68 -0
- vllm/plugins/io_processors/interface.py +77 -0
- vllm/plugins/lora_resolvers/__init__.py +0 -0
- vllm/plugins/lora_resolvers/filesystem_resolver.py +52 -0
- vllm/pooling_params.py +230 -0
- vllm/profiler/__init__.py +0 -0
- vllm/profiler/gpu_profiler.py +216 -0
- vllm/profiler/layerwise_profile.py +392 -0
- vllm/profiler/utils.py +151 -0
- vllm/py.typed +2 -0
- vllm/ray/__init__.py +0 -0
- vllm/ray/lazy_utils.py +30 -0
- vllm/ray/ray_env.py +79 -0
- vllm/reasoning/__init__.py +92 -0
- vllm/reasoning/abs_reasoning_parsers.py +290 -0
- vllm/reasoning/basic_parsers.py +162 -0
- vllm/reasoning/deepseek_r1_reasoning_parser.py +67 -0
- vllm/reasoning/deepseek_v3_reasoning_parser.py +62 -0
- vllm/reasoning/ernie45_reasoning_parser.py +165 -0
- vllm/reasoning/glm4_moe_reasoning_parser.py +171 -0
- vllm/reasoning/gptoss_reasoning_parser.py +173 -0
- vllm/reasoning/granite_reasoning_parser.py +363 -0
- vllm/reasoning/hunyuan_a13b_reasoning_parser.py +237 -0
- vllm/reasoning/identity_reasoning_parser.py +58 -0
- vllm/reasoning/minimax_m2_reasoning_parser.py +67 -0
- vllm/reasoning/mistral_reasoning_parser.py +55 -0
- vllm/reasoning/olmo3_reasoning_parser.py +302 -0
- vllm/reasoning/qwen3_reasoning_parser.py +67 -0
- vllm/reasoning/seedoss_reasoning_parser.py +27 -0
- vllm/reasoning/step3_reasoning_parser.py +107 -0
- vllm/sampling_params.py +597 -0
- vllm/scalar_type.py +355 -0
- vllm/scripts.py +17 -0
- vllm/sequence.py +98 -0
- vllm/tasks.py +13 -0
- vllm/third_party/__init__.py +0 -0
- vllm/third_party/pynvml.py +6140 -0
- vllm/tokenizers/__init__.py +24 -0
- vllm/tokenizers/detokenizer_utils.py +198 -0
- vllm/tokenizers/hf.py +124 -0
- vllm/tokenizers/mistral.py +554 -0
- vllm/tokenizers/protocol.py +111 -0
- vllm/tokenizers/registry.py +233 -0
- vllm/tracing.py +135 -0
- vllm/transformers_utils/__init__.py +26 -0
- vllm/transformers_utils/chat_templates/__init__.py +5 -0
- vllm/transformers_utils/chat_templates/registry.py +73 -0
- vllm/transformers_utils/chat_templates/template_basic.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_blip2.jinja +11 -0
- vllm/transformers_utils/chat_templates/template_chatml.jinja +10 -0
- vllm/transformers_utils/chat_templates/template_deepseek_ocr.jinja +14 -0
- vllm/transformers_utils/chat_templates/template_deepseek_vl2.jinja +23 -0
- vllm/transformers_utils/chat_templates/template_fuyu.jinja +3 -0
- vllm/transformers_utils/chat_templates/template_minicpmv45.jinja +93 -0
- vllm/transformers_utils/config.py +1081 -0
- vllm/transformers_utils/config_parser_base.py +20 -0
- vllm/transformers_utils/configs/__init__.py +84 -0
- vllm/transformers_utils/configs/afmoe.py +87 -0
- vllm/transformers_utils/configs/arctic.py +216 -0
- vllm/transformers_utils/configs/chatglm.py +75 -0
- vllm/transformers_utils/configs/deepseek_vl2.py +126 -0
- vllm/transformers_utils/configs/dotsocr.py +71 -0
- vllm/transformers_utils/configs/eagle.py +90 -0
- vllm/transformers_utils/configs/falcon.py +89 -0
- vllm/transformers_utils/configs/flex_olmo.py +82 -0
- vllm/transformers_utils/configs/hunyuan_vl.py +322 -0
- vllm/transformers_utils/configs/jais.py +243 -0
- vllm/transformers_utils/configs/kimi_linear.py +148 -0
- vllm/transformers_utils/configs/kimi_vl.py +38 -0
- vllm/transformers_utils/configs/lfm2_moe.py +163 -0
- vllm/transformers_utils/configs/medusa.py +65 -0
- vllm/transformers_utils/configs/midashenglm.py +103 -0
- vllm/transformers_utils/configs/mistral.py +235 -0
- vllm/transformers_utils/configs/mlp_speculator.py +69 -0
- vllm/transformers_utils/configs/moonvit.py +33 -0
- vllm/transformers_utils/configs/nemotron.py +214 -0
- vllm/transformers_utils/configs/nemotron_h.py +282 -0
- vllm/transformers_utils/configs/olmo3.py +83 -0
- vllm/transformers_utils/configs/ovis.py +182 -0
- vllm/transformers_utils/configs/qwen3_next.py +275 -0
- vllm/transformers_utils/configs/radio.py +89 -0
- vllm/transformers_utils/configs/speculators/__init__.py +2 -0
- vllm/transformers_utils/configs/speculators/algos.py +38 -0
- vllm/transformers_utils/configs/speculators/base.py +114 -0
- vllm/transformers_utils/configs/step3_vl.py +178 -0
- vllm/transformers_utils/configs/ultravox.py +118 -0
- vllm/transformers_utils/dynamic_module.py +59 -0
- vllm/transformers_utils/gguf_utils.py +209 -0
- vllm/transformers_utils/processor.py +423 -0
- vllm/transformers_utils/processors/__init__.py +23 -0
- vllm/transformers_utils/processors/deepseek_ocr.py +438 -0
- vllm/transformers_utils/processors/deepseek_vl2.py +406 -0
- vllm/transformers_utils/processors/hunyuan_vl.py +233 -0
- vllm/transformers_utils/processors/hunyuan_vl_image.py +477 -0
- vllm/transformers_utils/processors/ovis.py +453 -0
- vllm/transformers_utils/processors/ovis2_5.py +468 -0
- vllm/transformers_utils/repo_utils.py +287 -0
- vllm/transformers_utils/runai_utils.py +104 -0
- vllm/transformers_utils/s3_utils.py +95 -0
- vllm/transformers_utils/tokenizer.py +127 -0
- vllm/transformers_utils/tokenizer_base.py +33 -0
- vllm/transformers_utils/utils.py +184 -0
- vllm/triton_utils/__init__.py +20 -0
- vllm/triton_utils/importing.py +103 -0
- vllm/usage/__init__.py +0 -0
- vllm/usage/usage_lib.py +294 -0
- vllm/utils/__init__.py +66 -0
- vllm/utils/argparse_utils.py +504 -0
- vllm/utils/async_utils.py +310 -0
- vllm/utils/cache.py +214 -0
- vllm/utils/collection_utils.py +112 -0
- vllm/utils/counter.py +45 -0
- vllm/utils/deep_gemm.py +399 -0
- vllm/utils/flashinfer.py +532 -0
- vllm/utils/func_utils.py +236 -0
- vllm/utils/gc_utils.py +151 -0
- vllm/utils/hashing.py +81 -0
- vllm/utils/import_utils.py +449 -0
- vllm/utils/jsontree.py +158 -0
- vllm/utils/math_utils.py +32 -0
- vllm/utils/mem_constants.py +13 -0
- vllm/utils/mem_utils.py +232 -0
- vllm/utils/nccl.py +64 -0
- vllm/utils/network_utils.py +331 -0
- vllm/utils/platform_utils.py +59 -0
- vllm/utils/profiling.py +56 -0
- vllm/utils/registry.py +51 -0
- vllm/utils/serial_utils.py +169 -0
- vllm/utils/system_utils.py +265 -0
- vllm/utils/tensor_schema.py +255 -0
- vllm/utils/torch_utils.py +647 -0
- vllm/v1/__init__.py +0 -0
- vllm/v1/attention/__init__.py +0 -0
- vllm/v1/attention/backends/__init__.py +0 -0
- vllm/v1/attention/backends/cpu_attn.py +497 -0
- vllm/v1/attention/backends/flash_attn.py +1050 -0
- vllm/v1/attention/backends/flashinfer.py +1572 -0
- vllm/v1/attention/backends/flex_attention.py +945 -0
- vllm/v1/attention/backends/gdn_attn.py +387 -0
- vllm/v1/attention/backends/linear_attn.py +77 -0
- vllm/v1/attention/backends/mamba1_attn.py +165 -0
- vllm/v1/attention/backends/mamba2_attn.py +354 -0
- vllm/v1/attention/backends/mamba_attn.py +117 -0
- vllm/v1/attention/backends/mla/__init__.py +0 -0
- vllm/v1/attention/backends/mla/aiter_triton_mla.py +74 -0
- vllm/v1/attention/backends/mla/common.py +2069 -0
- vllm/v1/attention/backends/mla/cutlass_mla.py +278 -0
- vllm/v1/attention/backends/mla/flashattn_mla.py +340 -0
- vllm/v1/attention/backends/mla/flashinfer_mla.py +174 -0
- vllm/v1/attention/backends/mla/flashmla.py +317 -0
- vllm/v1/attention/backends/mla/flashmla_sparse.py +551 -0
- vllm/v1/attention/backends/mla/indexer.py +369 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +275 -0
- vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py +325 -0
- vllm/v1/attention/backends/mla/triton_mla.py +171 -0
- vllm/v1/attention/backends/pallas.py +436 -0
- vllm/v1/attention/backends/rocm_aiter_fa.py +1000 -0
- vllm/v1/attention/backends/rocm_aiter_unified_attn.py +206 -0
- vllm/v1/attention/backends/rocm_attn.py +359 -0
- vllm/v1/attention/backends/short_conv_attn.py +105 -0
- vllm/v1/attention/backends/tree_attn.py +428 -0
- vllm/v1/attention/backends/triton_attn.py +377 -0
- vllm/v1/attention/backends/utils.py +1149 -0
- vllm/v1/core/__init__.py +0 -0
- vllm/v1/core/block_pool.py +466 -0
- vllm/v1/core/encoder_cache_manager.py +343 -0
- vllm/v1/core/kv_cache_coordinator.py +570 -0
- vllm/v1/core/kv_cache_manager.py +408 -0
- vllm/v1/core/kv_cache_metrics.py +96 -0
- vllm/v1/core/kv_cache_utils.py +1471 -0
- vllm/v1/core/sched/__init__.py +0 -0
- vllm/v1/core/sched/async_scheduler.py +68 -0
- vllm/v1/core/sched/interface.py +187 -0
- vllm/v1/core/sched/output.py +230 -0
- vllm/v1/core/sched/request_queue.py +217 -0
- vllm/v1/core/sched/scheduler.py +1726 -0
- vllm/v1/core/sched/utils.py +72 -0
- vllm/v1/core/single_type_kv_cache_manager.py +801 -0
- vllm/v1/cudagraph_dispatcher.py +183 -0
- vllm/v1/engine/__init__.py +214 -0
- vllm/v1/engine/async_llm.py +874 -0
- vllm/v1/engine/coordinator.py +377 -0
- vllm/v1/engine/core.py +1421 -0
- vllm/v1/engine/core_client.py +1406 -0
- vllm/v1/engine/detokenizer.py +351 -0
- vllm/v1/engine/exceptions.py +18 -0
- vllm/v1/engine/input_processor.py +636 -0
- vllm/v1/engine/llm_engine.py +416 -0
- vllm/v1/engine/logprobs.py +189 -0
- vllm/v1/engine/output_processor.py +658 -0
- vllm/v1/engine/parallel_sampling.py +145 -0
- vllm/v1/engine/processor.py +20 -0
- vllm/v1/engine/utils.py +1068 -0
- vllm/v1/executor/__init__.py +6 -0
- vllm/v1/executor/abstract.py +352 -0
- vllm/v1/executor/multiproc_executor.py +888 -0
- vllm/v1/executor/ray_distributed_executor.py +8 -0
- vllm/v1/executor/ray_executor.py +626 -0
- vllm/v1/executor/ray_utils.py +465 -0
- vllm/v1/executor/uniproc_executor.py +183 -0
- vllm/v1/kv_cache_interface.py +404 -0
- vllm/v1/kv_offload/__init__.py +0 -0
- vllm/v1/kv_offload/abstract.py +161 -0
- vllm/v1/kv_offload/arc_manager.py +237 -0
- vllm/v1/kv_offload/backend.py +97 -0
- vllm/v1/kv_offload/backends/__init__.py +0 -0
- vllm/v1/kv_offload/backends/cpu.py +62 -0
- vllm/v1/kv_offload/cpu.py +86 -0
- vllm/v1/kv_offload/factory.py +56 -0
- vllm/v1/kv_offload/lru_manager.py +139 -0
- vllm/v1/kv_offload/mediums.py +39 -0
- vllm/v1/kv_offload/spec.py +66 -0
- vllm/v1/kv_offload/worker/__init__.py +0 -0
- vllm/v1/kv_offload/worker/cpu_gpu.py +191 -0
- vllm/v1/kv_offload/worker/worker.py +144 -0
- vllm/v1/metrics/__init__.py +0 -0
- vllm/v1/metrics/loggers.py +1268 -0
- vllm/v1/metrics/prometheus.py +82 -0
- vllm/v1/metrics/ray_wrappers.py +194 -0
- vllm/v1/metrics/reader.py +257 -0
- vllm/v1/metrics/stats.py +431 -0
- vllm/v1/outputs.py +237 -0
- vllm/v1/pool/__init__.py +0 -0
- vllm/v1/pool/metadata.py +82 -0
- vllm/v1/request.py +280 -0
- vllm/v1/sample/__init__.py +0 -0
- vllm/v1/sample/logits_processor/__init__.py +352 -0
- vllm/v1/sample/logits_processor/builtin.py +278 -0
- vllm/v1/sample/logits_processor/interface.py +106 -0
- vllm/v1/sample/logits_processor/state.py +165 -0
- vllm/v1/sample/metadata.py +44 -0
- vllm/v1/sample/ops/__init__.py +0 -0
- vllm/v1/sample/ops/bad_words.py +52 -0
- vllm/v1/sample/ops/logprobs.py +25 -0
- vllm/v1/sample/ops/penalties.py +57 -0
- vllm/v1/sample/ops/topk_topp_sampler.py +384 -0
- vllm/v1/sample/rejection_sampler.py +805 -0
- vllm/v1/sample/sampler.py +319 -0
- vllm/v1/sample/tpu/__init__.py +0 -0
- vllm/v1/sample/tpu/metadata.py +120 -0
- vllm/v1/sample/tpu/sampler.py +215 -0
- vllm/v1/serial_utils.py +532 -0
- vllm/v1/spec_decode/__init__.py +0 -0
- vllm/v1/spec_decode/eagle.py +1325 -0
- vllm/v1/spec_decode/medusa.py +73 -0
- vllm/v1/spec_decode/metadata.py +66 -0
- vllm/v1/spec_decode/metrics.py +225 -0
- vllm/v1/spec_decode/ngram_proposer.py +291 -0
- vllm/v1/spec_decode/suffix_decoding.py +101 -0
- vllm/v1/spec_decode/utils.py +121 -0
- vllm/v1/structured_output/__init__.py +338 -0
- vllm/v1/structured_output/backend_guidance.py +265 -0
- vllm/v1/structured_output/backend_lm_format_enforcer.py +177 -0
- vllm/v1/structured_output/backend_outlines.py +324 -0
- vllm/v1/structured_output/backend_types.py +136 -0
- vllm/v1/structured_output/backend_xgrammar.py +362 -0
- vllm/v1/structured_output/request.py +94 -0
- vllm/v1/structured_output/utils.py +469 -0
- vllm/v1/utils.py +414 -0
- vllm/v1/worker/__init__.py +0 -0
- vllm/v1/worker/block_table.py +343 -0
- vllm/v1/worker/cpu_model_runner.py +122 -0
- vllm/v1/worker/cpu_worker.py +210 -0
- vllm/v1/worker/dp_utils.py +250 -0
- vllm/v1/worker/ec_connector_model_runner_mixin.py +87 -0
- vllm/v1/worker/gpu/README.md +4 -0
- vllm/v1/worker/gpu/__init__.py +0 -0
- vllm/v1/worker/gpu/async_utils.py +97 -0
- vllm/v1/worker/gpu/attn_utils.py +189 -0
- vllm/v1/worker/gpu/block_table.py +314 -0
- vllm/v1/worker/gpu/cudagraph_utils.py +259 -0
- vllm/v1/worker/gpu/dp_utils.py +31 -0
- vllm/v1/worker/gpu/input_batch.py +430 -0
- vllm/v1/worker/gpu/model_runner.py +1007 -0
- vllm/v1/worker/gpu/sample/__init__.py +0 -0
- vllm/v1/worker/gpu/sample/gumbel.py +101 -0
- vllm/v1/worker/gpu/sample/logprob.py +167 -0
- vllm/v1/worker/gpu/sample/metadata.py +179 -0
- vllm/v1/worker/gpu/sample/penalties.py +154 -0
- vllm/v1/worker/gpu/sample/sampler.py +75 -0
- vllm/v1/worker/gpu/spec_decode/__init__.py +18 -0
- vllm/v1/worker/gpu/spec_decode/eagle.py +565 -0
- vllm/v1/worker/gpu/spec_decode/eagle_cudagraph.py +115 -0
- vllm/v1/worker/gpu/spec_decode/rejection_sample.py +83 -0
- vllm/v1/worker/gpu/states.py +309 -0
- vllm/v1/worker/gpu/structured_outputs.py +76 -0
- vllm/v1/worker/gpu_input_batch.py +971 -0
- vllm/v1/worker/gpu_model_runner.py +5360 -0
- vllm/v1/worker/gpu_ubatch_wrapper.py +472 -0
- vllm/v1/worker/gpu_worker.py +922 -0
- vllm/v1/worker/kv_connector_model_runner_mixin.py +309 -0
- vllm/v1/worker/lora_model_runner_mixin.py +212 -0
- vllm/v1/worker/tpu_input_batch.py +583 -0
- vllm/v1/worker/tpu_model_runner.py +2196 -0
- vllm/v1/worker/tpu_worker.py +351 -0
- vllm/v1/worker/ubatch_utils.py +73 -0
- vllm/v1/worker/ubatching.py +231 -0
- vllm/v1/worker/utils.py +365 -0
- vllm/v1/worker/worker_base.py +377 -0
- vllm/v1/worker/xpu_model_runner.py +48 -0
- vllm/v1/worker/xpu_worker.py +198 -0
- vllm/version.py +39 -0
- vllm/vllm_flash_attn/.gitkeep +0 -0
- vllm_cpu-0.12.0.dist-info/METADATA +300 -0
- vllm_cpu-0.12.0.dist-info/RECORD +1600 -0
- vllm_cpu-0.12.0.dist-info/WHEEL +5 -0
- vllm_cpu-0.12.0.dist-info/entry_points.txt +5 -0
- vllm_cpu-0.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1240 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
3
|
+
|
|
4
|
+
# Copyright (c) 2024, Tri Dao.
|
|
5
|
+
# Adapted from https://github.com/Dao-AILab/causal-conv1d/blob/main/causal_conv1d/causal_conv1d_interface.py
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
import torch
|
|
10
|
+
|
|
11
|
+
from vllm.attention.backends.utils import PAD_SLOT_ID
|
|
12
|
+
from vllm.triton_utils import tl, triton
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@triton.jit()
|
|
16
|
+
def _causal_conv1d_fwd_kernel( # continuous batching
|
|
17
|
+
# Pointers to matrices
|
|
18
|
+
x_ptr, # (dim, cu_seqlen) holding `batch` of actual sequences + padded sequences
|
|
19
|
+
w_ptr, # (dim, width)
|
|
20
|
+
bias_ptr,
|
|
21
|
+
initial_states_ptr, # conv_states_ptr
|
|
22
|
+
cache_indices_ptr, # (batch, n_blocks + padding) The second dimension contains
|
|
23
|
+
# the block indices relevant for each sequence
|
|
24
|
+
# plus potential 0-padding at the beginning and at the end
|
|
25
|
+
has_initial_states_ptr,
|
|
26
|
+
query_start_loc_ptr,
|
|
27
|
+
batch_ptr,
|
|
28
|
+
token_chunk_offset_ptr,
|
|
29
|
+
block_idx_first_scheduled_token, # (batch,)
|
|
30
|
+
block_idx_last_scheduled_token, # (batch,)
|
|
31
|
+
initial_state_idx, # (batch,)
|
|
32
|
+
num_computed_tokens, # (batch,)
|
|
33
|
+
o_ptr, # (dim, seqlen) - actually pointing to x_ptr
|
|
34
|
+
# Matrix dimensions
|
|
35
|
+
dim: tl.constexpr,
|
|
36
|
+
seqlen: tl.int32, # cu_seqlen
|
|
37
|
+
num_cache_lines: tl.constexpr, # added to support vLLM larger cache lines
|
|
38
|
+
# Strides
|
|
39
|
+
stride_x_dim: tl.constexpr, # stride to get to next feature-value,
|
|
40
|
+
stride_x_token: tl.constexpr, # stride to get to next token (same feature-index, same sequence-index)
|
|
41
|
+
stride_w_dim: tl.constexpr, # stride to get to next dim-axis value
|
|
42
|
+
stride_w_width: tl.constexpr, # stride to get to next width-axis value
|
|
43
|
+
stride_istate_seq: tl.constexpr,
|
|
44
|
+
stride_istate_dim: tl.constexpr,
|
|
45
|
+
stride_istate_token: tl.constexpr,
|
|
46
|
+
stride_cache_indices: tl.constexpr,
|
|
47
|
+
stride_o_dim: tl.constexpr,
|
|
48
|
+
stride_o_token: tl.constexpr,
|
|
49
|
+
stride_block_m: tl.constexpr, # Stride block to align divided by BLOCK_M
|
|
50
|
+
# others
|
|
51
|
+
pad_slot_id: tl.constexpr,
|
|
52
|
+
# Meta-parameters
|
|
53
|
+
HAS_BIAS: tl.constexpr,
|
|
54
|
+
KERNEL_WIDTH: tl.constexpr,
|
|
55
|
+
SILU_ACTIVATION: tl.constexpr,
|
|
56
|
+
IS_APC_ENABLED: tl.constexpr,
|
|
57
|
+
USE_PAD_SLOT: tl.constexpr,
|
|
58
|
+
NP2_STATELEN: tl.constexpr,
|
|
59
|
+
BLOCK_M: tl.constexpr,
|
|
60
|
+
BLOCK_N: tl.constexpr,
|
|
61
|
+
):
|
|
62
|
+
conv_states_ptr = initial_states_ptr
|
|
63
|
+
conv_state_indices_ptr = cache_indices_ptr
|
|
64
|
+
stride_conv_state_seq = stride_istate_seq
|
|
65
|
+
stride_conv_state_dim = stride_istate_dim
|
|
66
|
+
stride_conv_state_tok = stride_istate_token
|
|
67
|
+
state_len = (
|
|
68
|
+
KERNEL_WIDTH - 1
|
|
69
|
+
) # can be passed via argument if it's not the same as this value
|
|
70
|
+
|
|
71
|
+
# one program handles one chunk in a single sequence
|
|
72
|
+
# rather than mixing sequences - to make updating initial_states across sequences efficiently
|
|
73
|
+
|
|
74
|
+
# single-sequence id
|
|
75
|
+
idx_seq = tl.load(batch_ptr + tl.program_id(0)).to(tl.int64)
|
|
76
|
+
chunk_offset = tl.load(token_chunk_offset_ptr + tl.program_id(0))
|
|
77
|
+
|
|
78
|
+
# BLOCK_N elements along the feature-dimension (channel)
|
|
79
|
+
idx_feats = tl.program_id(1) * BLOCK_N + tl.arange(0, BLOCK_N)
|
|
80
|
+
|
|
81
|
+
if idx_seq == pad_slot_id:
|
|
82
|
+
return
|
|
83
|
+
|
|
84
|
+
sequence_start_index = tl.load(query_start_loc_ptr + idx_seq)
|
|
85
|
+
sequence_end_index = tl.load(query_start_loc_ptr + idx_seq + 1)
|
|
86
|
+
# find the actual sequence length
|
|
87
|
+
seqlen = sequence_end_index - sequence_start_index
|
|
88
|
+
|
|
89
|
+
B_size: tl.constexpr = stride_block_m * BLOCK_M
|
|
90
|
+
|
|
91
|
+
if IS_APC_ENABLED:
|
|
92
|
+
# Handle the case if prefix caching is enabled.
|
|
93
|
+
# In particular, if prefix caching is enabled, the program write additional cache states to "cache_indices_ptr"
|
|
94
|
+
|
|
95
|
+
# Get the length of the completed sequence so far and compute the offset.
|
|
96
|
+
current_first_index = tl.load(block_idx_first_scheduled_token + idx_seq)
|
|
97
|
+
current_last_index = tl.load(block_idx_last_scheduled_token + idx_seq)
|
|
98
|
+
sequence_completed_index = tl.load(num_computed_tokens + idx_seq)
|
|
99
|
+
|
|
100
|
+
# Compute the offset where the first stride_block_m-aligned first full block is
|
|
101
|
+
# Value in "token-space"
|
|
102
|
+
sequence_completed_offset_token = sequence_completed_index % B_size
|
|
103
|
+
seq_completed_offset = B_size - sequence_completed_offset_token
|
|
104
|
+
seq_end_offset = (seqlen - seq_completed_offset) % B_size
|
|
105
|
+
last_full_block_token_index = sequence_end_index - seq_end_offset
|
|
106
|
+
# If the sequence without the sequence_offset_index is stride_cache_chunk-aligned, then the last full chunk is the second-to-last one
|
|
107
|
+
if seq_end_offset == 0:
|
|
108
|
+
last_full_block_token_index = last_full_block_token_index - B_size
|
|
109
|
+
|
|
110
|
+
# Get the number of blocks to be filled for the current sequence
|
|
111
|
+
# If n_block_to_fill = 0, then only the state at the sequence end is stored
|
|
112
|
+
n_block_to_fill = current_last_index - current_first_index
|
|
113
|
+
|
|
114
|
+
# Get the index of the init block
|
|
115
|
+
conv_state_init_index = tl.load(initial_state_idx + idx_seq)
|
|
116
|
+
else:
|
|
117
|
+
n_block_to_fill = 0
|
|
118
|
+
current_last_index = 0
|
|
119
|
+
conv_state_init_index = 0
|
|
120
|
+
current_first_index = 0
|
|
121
|
+
last_full_block_token_index = 0
|
|
122
|
+
|
|
123
|
+
token_offset = BLOCK_M * chunk_offset
|
|
124
|
+
segment_len = min(BLOCK_M, seqlen - token_offset)
|
|
125
|
+
|
|
126
|
+
# base of the sequence
|
|
127
|
+
x_base = (
|
|
128
|
+
x_ptr + sequence_start_index * stride_x_token + idx_feats * stride_x_dim
|
|
129
|
+
) # [BLOCK_N,]
|
|
130
|
+
|
|
131
|
+
# cache_idx
|
|
132
|
+
conv_states_input_coord = tl.load(
|
|
133
|
+
conv_state_indices_ptr + idx_seq * stride_cache_indices + conv_state_init_index
|
|
134
|
+
).to(tl.int64)
|
|
135
|
+
|
|
136
|
+
if USE_PAD_SLOT: # noqa
|
|
137
|
+
if conv_states_input_coord == pad_slot_id:
|
|
138
|
+
# not processing as this is not the actual sequence
|
|
139
|
+
return
|
|
140
|
+
conv_states_base = (
|
|
141
|
+
conv_states_ptr
|
|
142
|
+
+ (conv_states_input_coord * stride_conv_state_seq)
|
|
143
|
+
+ (idx_feats * stride_conv_state_dim)
|
|
144
|
+
) # [BLOCK_N,]
|
|
145
|
+
|
|
146
|
+
w_base = w_ptr + (idx_feats * stride_w_dim) # [BLOCK_N,]
|
|
147
|
+
|
|
148
|
+
# Does 2 things:
|
|
149
|
+
# 1. READ prior-block init-state data - [done by every Triton programs]
|
|
150
|
+
# 2. update conv_state with new data [only by the Triton program handles chunk_offset=0]
|
|
151
|
+
if chunk_offset == 0:
|
|
152
|
+
# read from conv_states
|
|
153
|
+
load_init_state = tl.load(has_initial_states_ptr + idx_seq).to(tl.int1)
|
|
154
|
+
if load_init_state:
|
|
155
|
+
# load from conv_states
|
|
156
|
+
prior_tokens = conv_states_base + (state_len - 1) * stride_conv_state_tok
|
|
157
|
+
mask_w = idx_feats < dim
|
|
158
|
+
if KERNEL_WIDTH == 2:
|
|
159
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
160
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
161
|
+
if KERNEL_WIDTH == 3:
|
|
162
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
163
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
164
|
+
conv_states_ptrs = prior_tokens - 1 * stride_conv_state_tok # [BLOCK_N]
|
|
165
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
166
|
+
if KERNEL_WIDTH == 4:
|
|
167
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
168
|
+
col2 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
169
|
+
conv_states_ptrs = prior_tokens - 1 * stride_conv_state_tok # [BLOCK_N]
|
|
170
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
171
|
+
conv_states_ptrs = prior_tokens - 2 * stride_conv_state_tok # [BLOCK_N]
|
|
172
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
173
|
+
if KERNEL_WIDTH == 5:
|
|
174
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
175
|
+
col3 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
176
|
+
conv_states_ptrs = prior_tokens - 1 * stride_conv_state_tok # [BLOCK_N]
|
|
177
|
+
col2 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
178
|
+
conv_states_ptrs = prior_tokens - 2 * stride_conv_state_tok # [BLOCK_N]
|
|
179
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
180
|
+
conv_states_ptrs = prior_tokens - 3 * stride_conv_state_tok # [BLOCK_N]
|
|
181
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
182
|
+
else:
|
|
183
|
+
# prior-tokens are zeros
|
|
184
|
+
if KERNEL_WIDTH >= 2: # STRATEGY1
|
|
185
|
+
# first chunk and does not have prior-token, so just set to 0
|
|
186
|
+
col0 = tl.zeros((BLOCK_N,), dtype=x_ptr.dtype.element_ty)
|
|
187
|
+
if KERNEL_WIDTH >= 3: # STRATEGY1
|
|
188
|
+
col1 = tl.zeros((BLOCK_N,), dtype=x_ptr.dtype.element_ty)
|
|
189
|
+
if KERNEL_WIDTH >= 4: # STRATEGY1
|
|
190
|
+
col2 = tl.zeros((BLOCK_N,), dtype=x_ptr.dtype.element_ty)
|
|
191
|
+
if KERNEL_WIDTH >= 5: # STRATEGY1
|
|
192
|
+
col3 = tl.zeros((BLOCK_N,), dtype=x_ptr.dtype.element_ty)
|
|
193
|
+
|
|
194
|
+
# STEP 2:
|
|
195
|
+
# here prepare data for updating conv_state
|
|
196
|
+
if (
|
|
197
|
+
state_len <= seqlen
|
|
198
|
+
): # SMALL_CACHE=True (only move part of 'x' into conv_state cache)
|
|
199
|
+
# just read from 'x'
|
|
200
|
+
# copy 'x' data to conv_state
|
|
201
|
+
# load only 'x' data (and set 0 before 'x' if seqlen < state_len)
|
|
202
|
+
idx_tokens_last = (seqlen - state_len) + tl.arange(
|
|
203
|
+
0, NP2_STATELEN
|
|
204
|
+
) # [BLOCK_M]
|
|
205
|
+
x_ptrs = (
|
|
206
|
+
x_ptr
|
|
207
|
+
+ ((sequence_start_index + idx_tokens_last) * stride_x_token)[:, None]
|
|
208
|
+
+ (idx_feats * stride_x_dim)[None, :]
|
|
209
|
+
) # [BLOCK_M,BLOCK_N,]
|
|
210
|
+
mask_x = (
|
|
211
|
+
(idx_tokens_last >= 0)[:, None]
|
|
212
|
+
& (idx_tokens_last < seqlen)[:, None]
|
|
213
|
+
& (idx_feats < dim)[None, :]
|
|
214
|
+
) # token-index # token-index # feature-index
|
|
215
|
+
loaded_x = tl.load(x_ptrs, mask_x, 0.0)
|
|
216
|
+
idx_tokens_conv = tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
217
|
+
|
|
218
|
+
# Compute the offset where the last block should be written in the conv_states
|
|
219
|
+
conv_states_output_coord = tl.load(
|
|
220
|
+
conv_state_indices_ptr
|
|
221
|
+
+ idx_seq * stride_cache_indices
|
|
222
|
+
+ current_last_index
|
|
223
|
+
).to(tl.int64)
|
|
224
|
+
|
|
225
|
+
conv_states_ptrs_target = (
|
|
226
|
+
conv_states_ptr
|
|
227
|
+
+ (conv_states_output_coord * stride_conv_state_seq) # Offset from seq
|
|
228
|
+
+ (idx_feats * stride_conv_state_dim)
|
|
229
|
+
)[None, :] + ( # [BLOCK_N,]
|
|
230
|
+
idx_tokens_conv * stride_conv_state_tok
|
|
231
|
+
)[:, None]
|
|
232
|
+
|
|
233
|
+
mask = (idx_tokens_conv < state_len)[:, None] & (idx_feats < dim)[None, :]
|
|
234
|
+
tl.debug_barrier() # NOTE: use this due to bug in Triton compiler
|
|
235
|
+
tl.store(conv_states_ptrs_target, loaded_x, mask)
|
|
236
|
+
|
|
237
|
+
else:
|
|
238
|
+
if load_init_state:
|
|
239
|
+
# update conv_state by shifting left, i.e. take last few cols from conv_state + cols from 'x'
|
|
240
|
+
idx_tokens_conv = tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
241
|
+
|
|
242
|
+
conv_states_ptrs_source = (
|
|
243
|
+
conv_states_ptr
|
|
244
|
+
+ (conv_states_input_coord * stride_conv_state_seq)
|
|
245
|
+
+ (idx_feats * stride_conv_state_dim)[None, :]
|
|
246
|
+
+ ((idx_tokens_conv + seqlen) * stride_conv_state_tok)[:, None]
|
|
247
|
+
) # [BLOCK_M, BLOCK_N]
|
|
248
|
+
mask = (
|
|
249
|
+
(conv_states_input_coord < num_cache_lines)
|
|
250
|
+
& ((idx_tokens_conv + seqlen) < state_len)[:, None]
|
|
251
|
+
& (idx_feats < dim)[None, :]
|
|
252
|
+
)
|
|
253
|
+
conv_state = tl.load(conv_states_ptrs_source, mask, other=0.0)
|
|
254
|
+
|
|
255
|
+
VAL = state_len - seqlen
|
|
256
|
+
|
|
257
|
+
x_ptrs = (
|
|
258
|
+
x_base[None, :]
|
|
259
|
+
+ ((idx_tokens_conv - VAL) * stride_x_token)[:, None]
|
|
260
|
+
) # [BLOCK_M, BLOCK_N]
|
|
261
|
+
|
|
262
|
+
mask_x = (
|
|
263
|
+
(idx_tokens_conv - VAL >= 0)[:, None]
|
|
264
|
+
& (idx_tokens_conv - VAL < seqlen)[:, None]
|
|
265
|
+
& (idx_feats < dim)[None, :]
|
|
266
|
+
) # token-index # token-index # feature-index
|
|
267
|
+
loaded_x = tl.load(x_ptrs, mask_x, 0.0)
|
|
268
|
+
|
|
269
|
+
tl.debug_barrier() # need this due to the bug in tl.where not enforcing this when data is the result of another tl.load
|
|
270
|
+
new_conv_state = tl.where(
|
|
271
|
+
mask, conv_state, loaded_x
|
|
272
|
+
) # BUG in 'tl.where' which requires a barrier before this
|
|
273
|
+
conv_states_ptrs_target = (
|
|
274
|
+
conv_states_base
|
|
275
|
+
+ (idx_tokens_conv * stride_conv_state_tok)[:, None]
|
|
276
|
+
) # [BLOCK_M, BLOCK_N]
|
|
277
|
+
mask = (idx_tokens_conv < state_len)[:, None] & (idx_feats < dim)[
|
|
278
|
+
None, :
|
|
279
|
+
]
|
|
280
|
+
tl.store(conv_states_ptrs_target, new_conv_state, mask)
|
|
281
|
+
else: # load_init_state == False
|
|
282
|
+
# update conv_state by shifting left, BUT
|
|
283
|
+
# set cols prior to 'x' as zeros + cols from 'x'
|
|
284
|
+
idx_tokens_conv = tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
285
|
+
|
|
286
|
+
VAL = state_len - seqlen
|
|
287
|
+
|
|
288
|
+
x_ptrs = (
|
|
289
|
+
x_base[None, :]
|
|
290
|
+
+ ((idx_tokens_conv - VAL) * stride_x_token)[:, None]
|
|
291
|
+
) # [BLOCK_M, BLOCK_N]
|
|
292
|
+
|
|
293
|
+
mask_x = (
|
|
294
|
+
(idx_tokens_conv - VAL >= 0)[:, None]
|
|
295
|
+
& (idx_tokens_conv - VAL < seqlen)[:, None]
|
|
296
|
+
& (idx_feats < dim)[None, :]
|
|
297
|
+
) # token-index # token-index # feature-index
|
|
298
|
+
new_conv_state = tl.load(x_ptrs, mask_x, 0.0)
|
|
299
|
+
|
|
300
|
+
conv_states_ptrs_target = (
|
|
301
|
+
conv_states_base
|
|
302
|
+
+ (idx_tokens_conv * stride_conv_state_tok)[:, None]
|
|
303
|
+
) # [BLOCK_M, BLOCK_N]
|
|
304
|
+
mask = (idx_tokens_conv < state_len)[:, None] & (idx_feats < dim)[
|
|
305
|
+
None, :
|
|
306
|
+
]
|
|
307
|
+
tl.store(conv_states_ptrs_target, new_conv_state, mask)
|
|
308
|
+
|
|
309
|
+
else: # chunk_offset > 0
|
|
310
|
+
# read prior-token data from `x`
|
|
311
|
+
load_init_state = True
|
|
312
|
+
prior_tokens = x_base + (token_offset - 1) * stride_x_token
|
|
313
|
+
mask_w = idx_feats < dim
|
|
314
|
+
if KERNEL_WIDTH == 2:
|
|
315
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
316
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
317
|
+
if KERNEL_WIDTH == 3:
|
|
318
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
319
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
320
|
+
conv_states_ptrs = prior_tokens - 1 * stride_x_token # [BLOCK_N]
|
|
321
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
322
|
+
if KERNEL_WIDTH == 4:
|
|
323
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
324
|
+
col2 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
325
|
+
conv_states_ptrs = prior_tokens - 1 * stride_x_token # [BLOCK_N]
|
|
326
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
327
|
+
conv_states_ptrs = prior_tokens - 2 * stride_x_token # [BLOCK_N]
|
|
328
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
329
|
+
if KERNEL_WIDTH == 5:
|
|
330
|
+
# ruff: noqa: F841
|
|
331
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
332
|
+
col3 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
333
|
+
conv_states_ptrs = prior_tokens - 1 * stride_x_token # [BLOCK_N]
|
|
334
|
+
col2 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
335
|
+
conv_states_ptrs = prior_tokens - 2 * stride_x_token # [BLOCK_N]
|
|
336
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
337
|
+
conv_states_ptrs = prior_tokens - 3 * stride_x_token # [BLOCK_N]
|
|
338
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0, cache_modifier=".ca")
|
|
339
|
+
|
|
340
|
+
# Store intermediate states aligned with stride_block_m
|
|
341
|
+
# The additional states are cached starting from the last stride_block_m.
|
|
342
|
+
# For example:
|
|
343
|
+
# If n_block_to_fill = 0, then only the state at the sequence end is cached and the process below is not involved.
|
|
344
|
+
# If n_block_to_fill > 0, then the states at the sequence end and at the n_block_to_fill-last
|
|
345
|
+
# stride_block_m are cached.
|
|
346
|
+
# For example chunk_offset = n_block_to_fill stores the state at last_full_block
|
|
347
|
+
if (chunk_offset - 1) < n_block_to_fill:
|
|
348
|
+
# Store the states at the chunk boundaries from the start of the sequence
|
|
349
|
+
idx_tokens_last = (
|
|
350
|
+
last_full_block_token_index
|
|
351
|
+
- (n_block_to_fill - chunk_offset) * B_size
|
|
352
|
+
- state_len
|
|
353
|
+
) + tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
354
|
+
x_ptrs = (
|
|
355
|
+
x_ptr
|
|
356
|
+
+ (idx_tokens_last * stride_x_token)[:, None]
|
|
357
|
+
+ (idx_feats * stride_x_dim)[None, :]
|
|
358
|
+
) # [BLOCK_M,BLOCK_N,]
|
|
359
|
+
|
|
360
|
+
mask_x = (idx_tokens_last >= 0)[:, None] & (idx_feats < dim)[
|
|
361
|
+
None, :
|
|
362
|
+
] # token-index # token-index # feature-index
|
|
363
|
+
loaded_x = tl.load(x_ptrs, mask_x, 0.0)
|
|
364
|
+
idx_tokens_conv = tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
365
|
+
|
|
366
|
+
# cache_idx
|
|
367
|
+
conv_states_output_coord = tl.load(
|
|
368
|
+
conv_state_indices_ptr
|
|
369
|
+
+ idx_seq * stride_cache_indices
|
|
370
|
+
+ current_first_index
|
|
371
|
+
+ (chunk_offset - 1)
|
|
372
|
+
).to(tl.int64)
|
|
373
|
+
|
|
374
|
+
conv_states_ptrs_target = (
|
|
375
|
+
conv_states_ptr
|
|
376
|
+
+ (conv_states_output_coord * stride_conv_state_seq) # Offset from seq
|
|
377
|
+
+ (idx_feats * stride_conv_state_dim)
|
|
378
|
+
)[None, :] + ( # [BLOCK_N,]
|
|
379
|
+
idx_tokens_conv * stride_conv_state_tok
|
|
380
|
+
)[:, None]
|
|
381
|
+
|
|
382
|
+
mask = (idx_tokens_conv < state_len)[:, None] & (idx_feats < dim)[None, :]
|
|
383
|
+
tl.debug_barrier() # NOTE: use this due to bug in Triton compiler
|
|
384
|
+
tl.store(conv_states_ptrs_target, loaded_x, mask)
|
|
385
|
+
|
|
386
|
+
if HAS_BIAS:
|
|
387
|
+
bias = bias_ptr + idx_feats
|
|
388
|
+
mask_bias = idx_feats < dim
|
|
389
|
+
acc_preload = tl.load(bias, mask=mask_bias, other=0.0).to(
|
|
390
|
+
tl.float32
|
|
391
|
+
) # [BLOCK_N]
|
|
392
|
+
else:
|
|
393
|
+
acc_preload = tl.zeros((BLOCK_N,), dtype=tl.float32)
|
|
394
|
+
|
|
395
|
+
x_base_1d = x_base + token_offset * stride_x_token # starting of chunk
|
|
396
|
+
|
|
397
|
+
# PRE-LOAD WEIGHTS
|
|
398
|
+
mask_w = idx_feats < dim
|
|
399
|
+
if KERNEL_WIDTH >= 2:
|
|
400
|
+
w_ptrs = w_base + (0 * stride_w_width) # [BLOCK_N] tensor
|
|
401
|
+
w_col0 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
402
|
+
w_ptrs = w_base + (1 * stride_w_width) # [BLOCK_N] tensor
|
|
403
|
+
w_col1 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
404
|
+
if KERNEL_WIDTH >= 3:
|
|
405
|
+
w_ptrs = w_base + (2 * stride_w_width) # [BLOCK_N] tensor
|
|
406
|
+
w_col2 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
407
|
+
if KERNEL_WIDTH >= 4:
|
|
408
|
+
w_ptrs = w_base + (3 * stride_w_width) # [BLOCK_N] tensor
|
|
409
|
+
w_col3 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
410
|
+
mask_x_1d = idx_feats < dim
|
|
411
|
+
for idx_token in range(segment_len):
|
|
412
|
+
acc = acc_preload
|
|
413
|
+
|
|
414
|
+
matrix_w = w_col0
|
|
415
|
+
matrix_x = col0
|
|
416
|
+
for j in tl.static_range(KERNEL_WIDTH):
|
|
417
|
+
if KERNEL_WIDTH == 2:
|
|
418
|
+
if j == 1: # KERNEL_WIDTH-1:
|
|
419
|
+
matrix_w = w_col1
|
|
420
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
421
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
422
|
+
elif KERNEL_WIDTH == 3:
|
|
423
|
+
if j == 1:
|
|
424
|
+
matrix_w = w_col1
|
|
425
|
+
matrix_x = col1
|
|
426
|
+
elif j == 2:
|
|
427
|
+
matrix_w = w_col2
|
|
428
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
429
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
430
|
+
elif KERNEL_WIDTH == 4:
|
|
431
|
+
if j == 1:
|
|
432
|
+
matrix_w = w_col1
|
|
433
|
+
matrix_x = col1
|
|
434
|
+
elif j == 2:
|
|
435
|
+
matrix_w = w_col2
|
|
436
|
+
matrix_x = col2
|
|
437
|
+
elif j == 3:
|
|
438
|
+
matrix_w = w_col3
|
|
439
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
440
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
441
|
+
|
|
442
|
+
acc += matrix_x * matrix_w # [BLOCK_N]
|
|
443
|
+
|
|
444
|
+
if KERNEL_WIDTH == 2:
|
|
445
|
+
col0 = matrix_x
|
|
446
|
+
elif KERNEL_WIDTH == 3:
|
|
447
|
+
col0 = col1
|
|
448
|
+
col1 = matrix_x
|
|
449
|
+
elif KERNEL_WIDTH == 4:
|
|
450
|
+
col0 = col1
|
|
451
|
+
col1 = col2
|
|
452
|
+
col2 = matrix_x
|
|
453
|
+
|
|
454
|
+
if SILU_ACTIVATION:
|
|
455
|
+
acc = acc / (1 + tl.exp(-acc))
|
|
456
|
+
mask_1d = (idx_token < segment_len) & (
|
|
457
|
+
idx_feats < dim
|
|
458
|
+
) # token-index # feature-index
|
|
459
|
+
o_ptrs = (
|
|
460
|
+
o_ptr
|
|
461
|
+
+ (sequence_start_index + token_offset + idx_token) * stride_o_token
|
|
462
|
+
+ (idx_feats * stride_o_dim)
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
tl.store(o_ptrs, acc, mask=mask_1d)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
def causal_conv1d_fn(
|
|
469
|
+
x: torch.Tensor,
|
|
470
|
+
weight: torch.Tensor,
|
|
471
|
+
bias: torch.Tensor | None,
|
|
472
|
+
conv_states: torch.Tensor,
|
|
473
|
+
query_start_loc: torch.Tensor,
|
|
474
|
+
cache_indices: torch.Tensor | None = None,
|
|
475
|
+
has_initial_state: torch.Tensor | None = None,
|
|
476
|
+
activation: str | None = "silu",
|
|
477
|
+
pad_slot_id: int = PAD_SLOT_ID,
|
|
478
|
+
block_idx_first_scheduled_token: torch.Tensor | None = None,
|
|
479
|
+
block_idx_last_scheduled_token: torch.Tensor | None = None,
|
|
480
|
+
initial_state_idx: torch.Tensor | None = None,
|
|
481
|
+
num_computed_tokens: torch.Tensor | None = None,
|
|
482
|
+
block_size_to_align=0,
|
|
483
|
+
metadata=None,
|
|
484
|
+
validate_data=False,
|
|
485
|
+
):
|
|
486
|
+
"""support varlen + continuous batching when x is 2D tensor
|
|
487
|
+
|
|
488
|
+
x: (dim,cu_seq_len)
|
|
489
|
+
cu_seq_len = total tokens of all seqs in that batch
|
|
490
|
+
sequences are concatenated from left to right for varlen
|
|
491
|
+
weight: (dim, width)
|
|
492
|
+
conv_states: (...,dim,width - 1) itype
|
|
493
|
+
updated inplace if cache_indices are not provided
|
|
494
|
+
[it use `cache_indices` to get the index to the cache of conv_state for that sequence
|
|
495
|
+
|
|
496
|
+
conv_state[cache_indices[i]] for seq-i - to be used as initial_state when has_initial_state[i] = True
|
|
497
|
+
and after that conv_state[cache_indices[i]] need to be shift-left and updated with values from 'x'
|
|
498
|
+
]
|
|
499
|
+
query_start_loc: (batch + 1) int32
|
|
500
|
+
The cumulative sequence lengths of the sequences in
|
|
501
|
+
the batch, used to index into sequence. prepended by 0.
|
|
502
|
+
if
|
|
503
|
+
x = [5, 1, 1, 1] <- continuous batching (batch=4)
|
|
504
|
+
then
|
|
505
|
+
query_start_loc = [0, 5, 6, 7, 8] <- the starting index of the next sequence; while the last value is
|
|
506
|
+
the ending index of the last sequence
|
|
507
|
+
[length(query_start_loc)-1 == batch]
|
|
508
|
+
for example: query_start_loc = torch.Tensor([0,10,16,17]),
|
|
509
|
+
x.shape=(dim,17)
|
|
510
|
+
cache_indices: (batch) int32
|
|
511
|
+
indicates the corresponding state index,
|
|
512
|
+
like so: conv_state = conv_states[cache_indices[batch_id]]
|
|
513
|
+
has_initial_state: (batch) bool
|
|
514
|
+
indicates whether should the kernel take the current state as initial
|
|
515
|
+
state for the calculations
|
|
516
|
+
[single boolean for each sequence in the batch: True or False]
|
|
517
|
+
bias: (dim,)
|
|
518
|
+
activation: either None or "silu" or "swish" or True
|
|
519
|
+
pad_slot_id: int
|
|
520
|
+
if cache_indices is passed, lets the kernel identify padded
|
|
521
|
+
entries that will not be processed,
|
|
522
|
+
for example: cache_indices = [pad_slot_id, 1, 20, pad_slot_id]
|
|
523
|
+
in this case, the kernel will not process entries at
|
|
524
|
+
indices 0 and 3
|
|
525
|
+
block_idx_first_scheduled_token: (batch,), dtype int32
|
|
526
|
+
The pointer into cache_indices, where the first cache block to be filled is located.
|
|
527
|
+
block_idx_last_scheduled_token: (batch,), dtype int32
|
|
528
|
+
The pointer into cache_indices, where the last cache block to be filled is located.
|
|
529
|
+
initial_state_idx: (batch,), dtype int32
|
|
530
|
+
The pointer into cache_indices, where the cache block containing the initial state is located.
|
|
531
|
+
num_computed_tokens: (batch,), dtype int32
|
|
532
|
+
The number of tokens already completed for each sequence
|
|
533
|
+
block_size_to_align: int
|
|
534
|
+
The block size to align the cached states to
|
|
535
|
+
out: same shape as `x`
|
|
536
|
+
"""
|
|
537
|
+
if isinstance(activation, bool) and activation:
|
|
538
|
+
activation = "silu"
|
|
539
|
+
|
|
540
|
+
args = None
|
|
541
|
+
# Store original dtype to cast back at the end
|
|
542
|
+
original_x_dtype = x.dtype
|
|
543
|
+
x = x.to(conv_states.dtype)
|
|
544
|
+
out = torch.empty_like(x)
|
|
545
|
+
if metadata is not None:
|
|
546
|
+
nums_dict = metadata.nums_dict
|
|
547
|
+
args = nums_dict
|
|
548
|
+
batch_ptr = metadata.batch_ptr
|
|
549
|
+
token_chunk_offset_ptr = metadata.token_chunk_offset_ptr
|
|
550
|
+
else:
|
|
551
|
+
seqlens = query_start_loc.diff().to("cpu")
|
|
552
|
+
args = seqlens
|
|
553
|
+
MAX_NUM_PROGRAMS = 1024
|
|
554
|
+
|
|
555
|
+
batch_ptr = torch.full(
|
|
556
|
+
(MAX_NUM_PROGRAMS,), PAD_SLOT_ID, dtype=torch.int32, device=x.device
|
|
557
|
+
) # tracking which seq-idx the Triton program is handling
|
|
558
|
+
token_chunk_offset_ptr = torch.full(
|
|
559
|
+
(MAX_NUM_PROGRAMS,), PAD_SLOT_ID, dtype=torch.int32, device=x.device
|
|
560
|
+
) # tracking BLOCK_M-based index in the sequence the Triton program is handling
|
|
561
|
+
|
|
562
|
+
is_channel_last = (x.stride(0) == 1) & (x.stride(1) > 1)
|
|
563
|
+
dim, cu_seqlen = x.shape
|
|
564
|
+
_, width = weight.shape
|
|
565
|
+
state_len = width - 1
|
|
566
|
+
np2_statelen = triton.next_power_of_2(state_len)
|
|
567
|
+
|
|
568
|
+
padded_batch = query_start_loc.size(0) - 1
|
|
569
|
+
stride_x_dim = x.stride(0)
|
|
570
|
+
stride_x_token = x.stride(1)
|
|
571
|
+
stride_w_dim = weight.stride(0)
|
|
572
|
+
stride_w_width = weight.stride(1)
|
|
573
|
+
stride_istate_seq = 0
|
|
574
|
+
stride_istate_dim = 0
|
|
575
|
+
stride_istate_token = 0
|
|
576
|
+
num_cache_lines = 0
|
|
577
|
+
BLOCK_M = 8
|
|
578
|
+
if conv_states is not None:
|
|
579
|
+
# extensions to support vLLM:
|
|
580
|
+
# 1. conv_states is used to replaced initial_states
|
|
581
|
+
# 2. conv_states serve as a cache with num cache lines can be larger than batch size
|
|
582
|
+
# 3. mapping from sequence x[idx] to a cache line at index as specified via cache_indices[idx]
|
|
583
|
+
# 4. computation can be skipped if cache_indices[idx] == pad_slot_id
|
|
584
|
+
num_cache_lines = conv_states.size(0)
|
|
585
|
+
assert (
|
|
586
|
+
num_cache_lines == conv_states.shape[0]
|
|
587
|
+
and dim == conv_states.shape[1]
|
|
588
|
+
and width - 1 <= conv_states.shape[2]
|
|
589
|
+
)
|
|
590
|
+
stride_istate_seq = conv_states.stride(0)
|
|
591
|
+
stride_istate_dim = conv_states.stride(1)
|
|
592
|
+
stride_istate_token = conv_states.stride(2)
|
|
593
|
+
assert stride_istate_dim == 1
|
|
594
|
+
if out.dim() == 2:
|
|
595
|
+
stride_o_dim = out.stride(0)
|
|
596
|
+
stride_o_token = out.stride(1)
|
|
597
|
+
else:
|
|
598
|
+
stride_o_dim = out.stride(1)
|
|
599
|
+
stride_o_token = out.stride(2)
|
|
600
|
+
stride_cache_indices = cache_indices.stride(0) if cache_indices is not None else 0
|
|
601
|
+
|
|
602
|
+
if validate_data:
|
|
603
|
+
assert x.dim() == 2
|
|
604
|
+
assert query_start_loc is not None
|
|
605
|
+
assert query_start_loc.dim() == 1
|
|
606
|
+
assert x.stride(0) == 1 or x.stride(1) == 1
|
|
607
|
+
if bias is not None:
|
|
608
|
+
assert bias.dim() == 1
|
|
609
|
+
assert dim == bias.size(0)
|
|
610
|
+
if cache_indices is not None:
|
|
611
|
+
assert cache_indices.dim() == 1
|
|
612
|
+
assert padded_batch == cache_indices.size(0)
|
|
613
|
+
if has_initial_state is not None:
|
|
614
|
+
assert has_initial_state.size() == (padded_batch,)
|
|
615
|
+
assert conv_states is not None, (
|
|
616
|
+
"ERROR: `has_initial_state` is used, which needs also `conv_states`"
|
|
617
|
+
)
|
|
618
|
+
assert weight.stride(1) == 1
|
|
619
|
+
assert (dim, width) == weight.shape
|
|
620
|
+
assert is_channel_last, "Need to run in channel-last layout"
|
|
621
|
+
if block_size_to_align is not None and block_size_to_align > 0:
|
|
622
|
+
assert (block_size_to_align % BLOCK_M) == 0, (
|
|
623
|
+
"The mamba block size needs to be divisible by the BLOCK_M"
|
|
624
|
+
)
|
|
625
|
+
else:
|
|
626
|
+
block_size_to_align = BLOCK_M
|
|
627
|
+
|
|
628
|
+
if metadata is None:
|
|
629
|
+
|
|
630
|
+
def num_program(META, seqlens):
|
|
631
|
+
tot = 0
|
|
632
|
+
|
|
633
|
+
mlist = []
|
|
634
|
+
offsetlist = [] # type: ignore
|
|
635
|
+
|
|
636
|
+
nums = -(-seqlens // META["BLOCK_M"])
|
|
637
|
+
|
|
638
|
+
tot = nums.sum().item()
|
|
639
|
+
mlist = np.repeat(np.arange(len(nums)), nums)
|
|
640
|
+
for idx, num in enumerate(nums):
|
|
641
|
+
offsetlist.extend(
|
|
642
|
+
range(num)
|
|
643
|
+
) # chunk-idx if a sequence is split into multiple chunks
|
|
644
|
+
|
|
645
|
+
if META["batch_ptr"].nelement() < len(mlist):
|
|
646
|
+
newlen = len(mlist) + 1
|
|
647
|
+
META["batch_ptr"].resize_(newlen).fill_(PAD_SLOT_ID)
|
|
648
|
+
META["token_chunk_offset_ptr"].resize_(newlen).fill_(PAD_SLOT_ID)
|
|
649
|
+
|
|
650
|
+
if META["batch_ptr"].nelement() >= len(mlist):
|
|
651
|
+
META["batch_ptr"][0 : len(mlist)].copy_(
|
|
652
|
+
torch.from_numpy(np.array(mlist))
|
|
653
|
+
)
|
|
654
|
+
META["token_chunk_offset_ptr"][0 : len(mlist)].copy_(
|
|
655
|
+
torch.from_numpy(np.array(offsetlist))
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
META["batch_ptr"] = META["batch_ptr"].to(META["x_ptr"].device)
|
|
659
|
+
META["token_chunk_offset_ptr"] = META["token_chunk_offset_ptr"].to(
|
|
660
|
+
META["x_ptr"].device
|
|
661
|
+
)
|
|
662
|
+
return tot
|
|
663
|
+
else:
|
|
664
|
+
|
|
665
|
+
def num_program(META, nums_dict):
|
|
666
|
+
tot = nums_dict[META["BLOCK_M"]]["tot"]
|
|
667
|
+
|
|
668
|
+
mlist = nums_dict[META["BLOCK_M"]]["mlist"]
|
|
669
|
+
mlist_len = nums_dict[META["BLOCK_M"]]["mlist_len"]
|
|
670
|
+
|
|
671
|
+
offsetlist = nums_dict[META["BLOCK_M"]]["offsetlist"]
|
|
672
|
+
|
|
673
|
+
if nums_dict[META["BLOCK_M"]]["batch_ptr"] is not None:
|
|
674
|
+
META["batch_ptr"] = nums_dict[META["BLOCK_M"]]["batch_ptr"]
|
|
675
|
+
META["token_chunk_offset_ptr"] = nums_dict[META["BLOCK_M"]][
|
|
676
|
+
"token_chunk_offset_ptr"
|
|
677
|
+
]
|
|
678
|
+
else:
|
|
679
|
+
if META["batch_ptr"].nelement() < mlist_len:
|
|
680
|
+
newlen = mlist_len + 1
|
|
681
|
+
META["batch_ptr"].resize_(newlen).fill_(PAD_SLOT_ID)
|
|
682
|
+
META["token_chunk_offset_ptr"].resize_(newlen).fill_(PAD_SLOT_ID)
|
|
683
|
+
|
|
684
|
+
if META["batch_ptr"].nelement() >= mlist_len:
|
|
685
|
+
META["batch_ptr"][0:mlist_len].copy_(mlist)
|
|
686
|
+
META["token_chunk_offset_ptr"][0:mlist_len].copy_(offsetlist)
|
|
687
|
+
return tot
|
|
688
|
+
|
|
689
|
+
def grid(META):
|
|
690
|
+
return (
|
|
691
|
+
num_program(META, args),
|
|
692
|
+
triton.cdiv(dim, META["BLOCK_N"]),
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
if batch_ptr.device != x.device:
|
|
696
|
+
batch_ptr = batch_ptr.to(x.device)
|
|
697
|
+
token_chunk_offset_ptr = token_chunk_offset_ptr.to(x.device)
|
|
698
|
+
|
|
699
|
+
_causal_conv1d_fwd_kernel[grid](
|
|
700
|
+
# Pointers to matrices
|
|
701
|
+
x,
|
|
702
|
+
weight,
|
|
703
|
+
bias,
|
|
704
|
+
conv_states,
|
|
705
|
+
cache_indices,
|
|
706
|
+
has_initial_state,
|
|
707
|
+
query_start_loc,
|
|
708
|
+
batch_ptr,
|
|
709
|
+
token_chunk_offset_ptr,
|
|
710
|
+
block_idx_first_scheduled_token,
|
|
711
|
+
block_idx_last_scheduled_token,
|
|
712
|
+
initial_state_idx,
|
|
713
|
+
num_computed_tokens,
|
|
714
|
+
out,
|
|
715
|
+
# Matrix dimensions
|
|
716
|
+
dim,
|
|
717
|
+
cu_seqlen,
|
|
718
|
+
num_cache_lines,
|
|
719
|
+
# stride
|
|
720
|
+
stride_x_dim,
|
|
721
|
+
stride_x_token,
|
|
722
|
+
stride_w_dim,
|
|
723
|
+
stride_w_width,
|
|
724
|
+
stride_istate_seq,
|
|
725
|
+
stride_istate_dim,
|
|
726
|
+
stride_istate_token,
|
|
727
|
+
stride_cache_indices,
|
|
728
|
+
stride_o_dim,
|
|
729
|
+
stride_o_token,
|
|
730
|
+
block_size_to_align // BLOCK_M,
|
|
731
|
+
# others
|
|
732
|
+
pad_slot_id,
|
|
733
|
+
# META
|
|
734
|
+
HAS_BIAS=bias is not None,
|
|
735
|
+
KERNEL_WIDTH=width,
|
|
736
|
+
SILU_ACTIVATION=activation in ["silu", "swish"],
|
|
737
|
+
IS_APC_ENABLED=block_idx_last_scheduled_token is not None,
|
|
738
|
+
USE_PAD_SLOT=pad_slot_id is not None,
|
|
739
|
+
NP2_STATELEN=np2_statelen,
|
|
740
|
+
# launch_cooperative_grid=True
|
|
741
|
+
BLOCK_M=BLOCK_M,
|
|
742
|
+
BLOCK_N=256,
|
|
743
|
+
num_stages=2,
|
|
744
|
+
)
|
|
745
|
+
return out.to(original_x_dtype)
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
@triton.jit()
|
|
749
|
+
def _causal_conv1d_update_kernel(
|
|
750
|
+
# Pointers to matrices
|
|
751
|
+
x_ptr, # (batch, dim, seqlen)
|
|
752
|
+
w_ptr, # (dim, width)
|
|
753
|
+
bias_ptr,
|
|
754
|
+
conv_state_ptr,
|
|
755
|
+
conv_state_indices_ptr,
|
|
756
|
+
num_accepted_tokens_ptr,
|
|
757
|
+
query_start_loc_ptr, # (batch + 1)
|
|
758
|
+
block_idx_last_scheduled_token, # (batch,)
|
|
759
|
+
initial_state_idx, # (batch,)
|
|
760
|
+
o_ptr, # (batch, dim, seqlen)
|
|
761
|
+
# Matrix dimensions
|
|
762
|
+
batch: int,
|
|
763
|
+
dim: tl.constexpr,
|
|
764
|
+
seqlen: tl.constexpr,
|
|
765
|
+
state_len: tl.constexpr,
|
|
766
|
+
num_cache_lines: tl.constexpr, # added to support vLLM larger cache lines
|
|
767
|
+
# Strides
|
|
768
|
+
stride_x_seq: tl.constexpr,
|
|
769
|
+
stride_x_dim: tl.constexpr,
|
|
770
|
+
stride_x_token: tl.constexpr,
|
|
771
|
+
stride_w_dim: tl.constexpr,
|
|
772
|
+
stride_w_width: tl.constexpr,
|
|
773
|
+
stride_conv_state_seq: tl.constexpr,
|
|
774
|
+
stride_conv_state_dim: tl.constexpr,
|
|
775
|
+
stride_conv_state_tok: tl.constexpr,
|
|
776
|
+
stride_state_indices: tl.constexpr,
|
|
777
|
+
stride_o_seq: tl.constexpr,
|
|
778
|
+
stride_o_dim: tl.constexpr,
|
|
779
|
+
stride_o_token: tl.constexpr,
|
|
780
|
+
# others
|
|
781
|
+
pad_slot_id: tl.constexpr,
|
|
782
|
+
# Meta-parameters
|
|
783
|
+
HAS_BIAS: tl.constexpr,
|
|
784
|
+
KERNEL_WIDTH: tl.constexpr,
|
|
785
|
+
SILU_ACTIVATION: tl.constexpr,
|
|
786
|
+
IS_VARLEN: tl.constexpr,
|
|
787
|
+
IS_APC_ENABLED: tl.constexpr,
|
|
788
|
+
IS_SPEC_DECODING: tl.constexpr,
|
|
789
|
+
NP2_STATELEN: tl.constexpr,
|
|
790
|
+
USE_PAD_SLOT: tl.constexpr,
|
|
791
|
+
BLOCK_N: tl.constexpr,
|
|
792
|
+
):
|
|
793
|
+
# ruff: noqa: E501
|
|
794
|
+
idx_seq = tl.program_id(0)
|
|
795
|
+
if idx_seq >= batch:
|
|
796
|
+
return
|
|
797
|
+
|
|
798
|
+
# [BLOCK_N,] elements along the feature-dimension (channel)
|
|
799
|
+
idx_feats = tl.program_id(1) * BLOCK_N + tl.arange(0, BLOCK_N)
|
|
800
|
+
|
|
801
|
+
if IS_APC_ENABLED:
|
|
802
|
+
# Get the state from the initial_state_idx
|
|
803
|
+
conv_state_init = tl.load(initial_state_idx + idx_seq)
|
|
804
|
+
current_last_index = tl.load(block_idx_last_scheduled_token + idx_seq)
|
|
805
|
+
else:
|
|
806
|
+
conv_state_init = 0
|
|
807
|
+
current_last_index = 0
|
|
808
|
+
|
|
809
|
+
# cache_idx
|
|
810
|
+
conv_states_input_coord = tl.load(
|
|
811
|
+
conv_state_indices_ptr + idx_seq * stride_state_indices + conv_state_init
|
|
812
|
+
).to(tl.int64)
|
|
813
|
+
|
|
814
|
+
if USE_PAD_SLOT: # noqa
|
|
815
|
+
if conv_states_input_coord == pad_slot_id:
|
|
816
|
+
# not processing as this is not the actual sequence
|
|
817
|
+
return
|
|
818
|
+
|
|
819
|
+
if IS_VARLEN:
|
|
820
|
+
query_start_index = tl.load(query_start_loc_ptr + idx_seq).to(tl.int64)
|
|
821
|
+
query_end_index = tl.load(query_start_loc_ptr + (idx_seq + 1)).to(tl.int64)
|
|
822
|
+
# revise state_len and seqlen
|
|
823
|
+
state_len = state_len - (seqlen - (query_end_index - query_start_index))
|
|
824
|
+
seqlen = query_end_index - query_start_index
|
|
825
|
+
x_offset = query_start_index * stride_x_token
|
|
826
|
+
o_offset = query_start_index * stride_o_token
|
|
827
|
+
else:
|
|
828
|
+
query_start_index = idx_seq * seqlen
|
|
829
|
+
query_end_index = query_start_index + seqlen
|
|
830
|
+
x_offset = idx_seq * stride_x_seq
|
|
831
|
+
o_offset = idx_seq * stride_o_seq
|
|
832
|
+
|
|
833
|
+
if query_start_index == query_end_index:
|
|
834
|
+
return
|
|
835
|
+
|
|
836
|
+
if IS_SPEC_DECODING:
|
|
837
|
+
# The rolling of conv state:
|
|
838
|
+
#
|
|
839
|
+
# Before forward, the conv_state is:
|
|
840
|
+
# [history1, history2, ..., historyM].
|
|
841
|
+
#
|
|
842
|
+
# After forward, the conv_state becomes:
|
|
843
|
+
# [history2, ..., historyM, draft1, draft2, ..., draftN].
|
|
844
|
+
#
|
|
845
|
+
# After acceptance, it becomes:
|
|
846
|
+
#
|
|
847
|
+
# - accept 1 tokens: [history2, ..., historyM, draft1]
|
|
848
|
+
# - accept 2 tokens: [history3, ..., historyM, draft1, draft2]
|
|
849
|
+
# - and so on.
|
|
850
|
+
conv_state_token_offset = (
|
|
851
|
+
tl.load(num_accepted_tokens_ptr + idx_seq).to(tl.int64) - 1
|
|
852
|
+
)
|
|
853
|
+
else:
|
|
854
|
+
conv_state_token_offset = 0
|
|
855
|
+
|
|
856
|
+
# STEP 1: READ init_state data
|
|
857
|
+
conv_states_base = (
|
|
858
|
+
conv_state_ptr
|
|
859
|
+
+ (conv_states_input_coord * stride_conv_state_seq)
|
|
860
|
+
+ (idx_feats * stride_conv_state_dim)
|
|
861
|
+
)
|
|
862
|
+
mask_w = idx_feats < dim
|
|
863
|
+
|
|
864
|
+
prior_tokens = conv_states_base + conv_state_token_offset * stride_conv_state_tok
|
|
865
|
+
if KERNEL_WIDTH >= 2:
|
|
866
|
+
conv_states_ptrs = prior_tokens # [BLOCK_N]
|
|
867
|
+
col0 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
868
|
+
if KERNEL_WIDTH >= 3:
|
|
869
|
+
conv_states_ptrs = prior_tokens + 1 * stride_conv_state_tok # [BLOCK_N]
|
|
870
|
+
col1 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
871
|
+
if KERNEL_WIDTH >= 4:
|
|
872
|
+
conv_states_ptrs = prior_tokens + 2 * stride_conv_state_tok # [BLOCK_N]
|
|
873
|
+
col2 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
874
|
+
if KERNEL_WIDTH >= 5:
|
|
875
|
+
conv_states_ptrs = prior_tokens + 3 * stride_conv_state_tok # [BLOCK_N]
|
|
876
|
+
col3 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
877
|
+
if KERNEL_WIDTH >= 6:
|
|
878
|
+
conv_states_ptrs = prior_tokens + 4 * stride_conv_state_tok # [BLOCK_N]
|
|
879
|
+
col4 = tl.load(conv_states_ptrs, mask_w, 0.0)
|
|
880
|
+
|
|
881
|
+
# STEP 2: assume state_len > seqlen
|
|
882
|
+
idx_tokens = tl.arange(0, NP2_STATELEN) # [BLOCK_M]
|
|
883
|
+
|
|
884
|
+
# With speculative decoding, the conv_state updates works in a sliding
|
|
885
|
+
# window manner, at each forward pass, the tokens are shift by 1, so we
|
|
886
|
+
# load since idx_tokens + 1.
|
|
887
|
+
conv_state_ptrs_source = (
|
|
888
|
+
conv_state_ptr
|
|
889
|
+
+ (conv_states_input_coord * stride_conv_state_seq)
|
|
890
|
+
+ conv_state_token_offset * stride_conv_state_tok
|
|
891
|
+
+ (idx_feats * stride_conv_state_dim)[None, :]
|
|
892
|
+
+ ((idx_tokens + (1 if IS_SPEC_DECODING else seqlen)) * stride_conv_state_tok)[
|
|
893
|
+
:, None
|
|
894
|
+
]
|
|
895
|
+
) # [BLOCK_M, BLOCK_N]
|
|
896
|
+
mask = (
|
|
897
|
+
(conv_states_input_coord < num_cache_lines)
|
|
898
|
+
& ((idx_tokens + seqlen) < state_len)[:, None]
|
|
899
|
+
& (idx_feats < dim)[None, :]
|
|
900
|
+
)
|
|
901
|
+
conv_state = tl.load(conv_state_ptrs_source, mask, other=0.0)
|
|
902
|
+
|
|
903
|
+
VAL = state_len - seqlen
|
|
904
|
+
x_base = x_ptr + x_offset + (idx_feats * stride_x_dim) # [BLOCK_N]
|
|
905
|
+
|
|
906
|
+
x_ptrs = (
|
|
907
|
+
x_base[None, :] + ((idx_tokens - VAL) * stride_x_token)[:, None]
|
|
908
|
+
) # [BLOCK_M, BLOCK_N]
|
|
909
|
+
|
|
910
|
+
mask_x = (
|
|
911
|
+
(idx_tokens - VAL >= 0)[:, None]
|
|
912
|
+
& (idx_tokens - VAL < seqlen)[:, None]
|
|
913
|
+
& (idx_feats < dim)[None, :]
|
|
914
|
+
) # token-index # token-index # feature-index
|
|
915
|
+
loaded_x = tl.load(x_ptrs, mask_x, 0.0)
|
|
916
|
+
tl.debug_barrier()
|
|
917
|
+
|
|
918
|
+
new_conv_state = tl.where(mask, conv_state, loaded_x)
|
|
919
|
+
|
|
920
|
+
# Get the state from the initial_state_idx
|
|
921
|
+
# cache_idx
|
|
922
|
+
conv_states_offset = tl.load(
|
|
923
|
+
conv_state_indices_ptr + idx_seq * stride_state_indices + current_last_index
|
|
924
|
+
).to(tl.int64)
|
|
925
|
+
conv_state_ptrs_target = (
|
|
926
|
+
conv_state_ptr
|
|
927
|
+
+ (conv_states_offset * stride_conv_state_seq) # Offset from seq
|
|
928
|
+
+ (idx_feats * stride_conv_state_dim)
|
|
929
|
+
)[None, :] + ( # [BLOCK_N,]
|
|
930
|
+
idx_tokens * stride_conv_state_tok
|
|
931
|
+
)[:, None]
|
|
932
|
+
mask = (idx_tokens < state_len)[:, None] & (idx_feats < dim)[None, :]
|
|
933
|
+
tl.store(conv_state_ptrs_target, new_conv_state, mask)
|
|
934
|
+
|
|
935
|
+
# STEP 3: init accumulator
|
|
936
|
+
if HAS_BIAS:
|
|
937
|
+
bias = bias_ptr + idx_feats
|
|
938
|
+
mask_bias = idx_feats < dim
|
|
939
|
+
acc_preload = tl.load(bias, mask=mask_bias, other=0.0).to(
|
|
940
|
+
tl.float32
|
|
941
|
+
) # [BLOCK_N]
|
|
942
|
+
else:
|
|
943
|
+
acc_preload = tl.zeros((BLOCK_N,), dtype=tl.float32)
|
|
944
|
+
|
|
945
|
+
# STEP 4:
|
|
946
|
+
# PRE-LOAD WEIGHTS
|
|
947
|
+
# first kernel column, configured for weights to handle BLOCK_N features in range
|
|
948
|
+
w_base = w_ptr + (idx_feats * stride_w_dim) # [BLOCK_N,]
|
|
949
|
+
mask_w = idx_feats < dim
|
|
950
|
+
if KERNEL_WIDTH >= 2:
|
|
951
|
+
w_ptrs = w_base + (0 * stride_w_width) # [BLOCK_N] tensor
|
|
952
|
+
w_col0 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
953
|
+
w_ptrs = w_base + (1 * stride_w_width) # [BLOCK_N] tensor
|
|
954
|
+
w_col1 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
955
|
+
if KERNEL_WIDTH >= 3:
|
|
956
|
+
w_ptrs = w_base + (2 * stride_w_width) # [BLOCK_N] tensor
|
|
957
|
+
w_col2 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
958
|
+
if KERNEL_WIDTH >= 4:
|
|
959
|
+
w_ptrs = w_base + (3 * stride_w_width) # [BLOCK_N] tensor
|
|
960
|
+
w_col3 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
961
|
+
if KERNEL_WIDTH >= 5:
|
|
962
|
+
w_ptrs = w_base + (4 * stride_w_width) # [BLOCK_N] tensor
|
|
963
|
+
w_col4 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
964
|
+
if KERNEL_WIDTH >= 6:
|
|
965
|
+
w_ptrs = w_base + (5 * stride_w_width) # [BLOCK_N] tensor
|
|
966
|
+
w_col5 = tl.load(w_ptrs, mask_w, other=0.0)
|
|
967
|
+
|
|
968
|
+
x_base_1d = x_base # starting of chunk [BLOCK_N]
|
|
969
|
+
mask_x_1d = idx_feats < dim
|
|
970
|
+
|
|
971
|
+
# STEP 5: compute each token
|
|
972
|
+
for idx_token in tl.range(seqlen):
|
|
973
|
+
acc = acc_preload
|
|
974
|
+
|
|
975
|
+
matrix_w = w_col0
|
|
976
|
+
matrix_x = col0
|
|
977
|
+
for j in tl.static_range(KERNEL_WIDTH):
|
|
978
|
+
if KERNEL_WIDTH == 2:
|
|
979
|
+
if j == 1: # KERNEL_WIDTH-1:
|
|
980
|
+
matrix_w = w_col1
|
|
981
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
982
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
983
|
+
elif KERNEL_WIDTH == 3:
|
|
984
|
+
if j == 1:
|
|
985
|
+
matrix_w = w_col1
|
|
986
|
+
matrix_x = col1
|
|
987
|
+
elif j == 2:
|
|
988
|
+
matrix_w = w_col2
|
|
989
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
990
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
991
|
+
elif KERNEL_WIDTH == 4:
|
|
992
|
+
if j == 1:
|
|
993
|
+
matrix_w = w_col1
|
|
994
|
+
matrix_x = col1
|
|
995
|
+
elif j == 2:
|
|
996
|
+
matrix_w = w_col2
|
|
997
|
+
matrix_x = col2
|
|
998
|
+
elif j == 3:
|
|
999
|
+
matrix_w = w_col3
|
|
1000
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
1001
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
1002
|
+
elif KERNEL_WIDTH == 5:
|
|
1003
|
+
if j == 1:
|
|
1004
|
+
matrix_w = w_col1
|
|
1005
|
+
matrix_x = col1
|
|
1006
|
+
elif j == 2:
|
|
1007
|
+
matrix_w = w_col2
|
|
1008
|
+
matrix_x = col2
|
|
1009
|
+
elif j == 3:
|
|
1010
|
+
matrix_w = w_col3
|
|
1011
|
+
matrix_x = col3
|
|
1012
|
+
elif j == 4:
|
|
1013
|
+
matrix_w = w_col4
|
|
1014
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
1015
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
1016
|
+
elif KERNEL_WIDTH == 6:
|
|
1017
|
+
if j == 1:
|
|
1018
|
+
matrix_w = w_col1
|
|
1019
|
+
matrix_x = col1
|
|
1020
|
+
elif j == 2:
|
|
1021
|
+
matrix_w = w_col2
|
|
1022
|
+
matrix_x = col2
|
|
1023
|
+
elif j == 3:
|
|
1024
|
+
matrix_w = w_col3
|
|
1025
|
+
matrix_x = col3
|
|
1026
|
+
elif j == 4:
|
|
1027
|
+
matrix_w = w_col4
|
|
1028
|
+
matrix_x = col4
|
|
1029
|
+
elif j == 5:
|
|
1030
|
+
matrix_w = w_col5
|
|
1031
|
+
x_ptrs_1d = x_base_1d + idx_token * stride_x_token # [BLOCK_N]
|
|
1032
|
+
matrix_x = tl.load(x_ptrs_1d, mask=mask_x_1d)
|
|
1033
|
+
|
|
1034
|
+
acc += matrix_x * matrix_w # [BLOCK_N]
|
|
1035
|
+
|
|
1036
|
+
if KERNEL_WIDTH == 2:
|
|
1037
|
+
col0 = matrix_x
|
|
1038
|
+
elif KERNEL_WIDTH == 3:
|
|
1039
|
+
col0 = col1
|
|
1040
|
+
col1 = matrix_x
|
|
1041
|
+
elif KERNEL_WIDTH == 4:
|
|
1042
|
+
col0 = col1
|
|
1043
|
+
col1 = col2
|
|
1044
|
+
col2 = matrix_x
|
|
1045
|
+
elif KERNEL_WIDTH == 5:
|
|
1046
|
+
col0 = col1
|
|
1047
|
+
col1 = col2
|
|
1048
|
+
col2 = col3
|
|
1049
|
+
col3 = matrix_x
|
|
1050
|
+
elif KERNEL_WIDTH == 6:
|
|
1051
|
+
col0 = col1
|
|
1052
|
+
col1 = col2
|
|
1053
|
+
col2 = col3
|
|
1054
|
+
col3 = col4
|
|
1055
|
+
col4 = matrix_x
|
|
1056
|
+
|
|
1057
|
+
if SILU_ACTIVATION:
|
|
1058
|
+
acc = acc / (1 + tl.exp(-acc))
|
|
1059
|
+
mask_1d = (idx_token < seqlen) & (
|
|
1060
|
+
idx_feats < dim
|
|
1061
|
+
) # token-index # feature-index
|
|
1062
|
+
o_ptrs = (
|
|
1063
|
+
o_ptr + o_offset + idx_token * stride_o_token + (idx_feats * stride_o_dim)
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
tl.store(o_ptrs, acc, mask=mask_1d)
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
def causal_conv1d_update(
|
|
1070
|
+
x: torch.Tensor,
|
|
1071
|
+
conv_state: torch.Tensor,
|
|
1072
|
+
weight: torch.Tensor,
|
|
1073
|
+
bias: torch.Tensor | None = None,
|
|
1074
|
+
activation: bool | str | None = None,
|
|
1075
|
+
conv_state_indices: torch.Tensor | None = None,
|
|
1076
|
+
num_accepted_tokens: torch.Tensor | None = None,
|
|
1077
|
+
query_start_loc: torch.Tensor | None = None,
|
|
1078
|
+
max_query_len: int = -1,
|
|
1079
|
+
pad_slot_id: int = PAD_SLOT_ID,
|
|
1080
|
+
block_idx_last_scheduled_token: torch.Tensor | None = None,
|
|
1081
|
+
initial_state_idx: torch.Tensor | None = None,
|
|
1082
|
+
validate_data=False,
|
|
1083
|
+
):
|
|
1084
|
+
"""
|
|
1085
|
+
x: Input tensor which can take the following shapes:
|
|
1086
|
+
|
|
1087
|
+
- `[batch, dim]` - single token prediction
|
|
1088
|
+
- `[batch, dim, seqlen]` - single or multiple tokens prediction
|
|
1089
|
+
- `[num_tokens, dim]` - continuous batching, where num_tokens is
|
|
1090
|
+
the total tokens of all sequences in that batch
|
|
1091
|
+
|
|
1092
|
+
conv_state: (..., dim, state_len), where state_len >= width - 1
|
|
1093
|
+
weight: (dim, width)
|
|
1094
|
+
bias: (dim,)
|
|
1095
|
+
conv_state_indices: (batch,), dtype int32
|
|
1096
|
+
If not None, the conv_state is a larger tensor along the batch dim,
|
|
1097
|
+
and we are selecting the batch coords specified by conv_state_indices.
|
|
1098
|
+
Useful for a continuous batching scenario.
|
|
1099
|
+
block_idx_last_scheduled_token: (batch,), dtype int32
|
|
1100
|
+
The pointer into conv_state_indices, where the last cache block to be filled is located.
|
|
1101
|
+
initial_state_idx: (batch,), dtype int32
|
|
1102
|
+
The pointer into conv_state_indices, where the cache block containing the initial state is located.
|
|
1103
|
+
num_accepted_tokens: (batch,), dtype int32
|
|
1104
|
+
If not None, it indicates the number of accepted tokens for each
|
|
1105
|
+
sequence in the batch.
|
|
1106
|
+
This is used in speculative decoding, where the conv_state is updated
|
|
1107
|
+
in a sliding window manner.
|
|
1108
|
+
query_start_loc: (batch + 1,) int32
|
|
1109
|
+
If not None, the inputs is given in a varlen fashion and this indicates
|
|
1110
|
+
the starting index of each sequence in the batch.
|
|
1111
|
+
max_query_len: int
|
|
1112
|
+
If query_start_loc is not None, this indicates the maximum query
|
|
1113
|
+
length in the batch.
|
|
1114
|
+
pad_slot_id: int
|
|
1115
|
+
if conv_state_indices is passed, lets the kernel identify padded
|
|
1116
|
+
entries that will not be processed,
|
|
1117
|
+
for example: conv_state_indices = [pad_slot_id, 1 ,20 ,pad_slot_id]
|
|
1118
|
+
in this case, the kernel will not process entries at
|
|
1119
|
+
indices 0 and 3
|
|
1120
|
+
out: (batch, dim) or (batch, dim, seqlen) or (num_tokens, dim), same shape as `x`
|
|
1121
|
+
"""
|
|
1122
|
+
if validate_data:
|
|
1123
|
+
assert pad_slot_id is not None
|
|
1124
|
+
assert x.stride(1) == 1
|
|
1125
|
+
if isinstance(activation, bool):
|
|
1126
|
+
activation = "silu" if activation is True else None
|
|
1127
|
+
elif activation is not None:
|
|
1128
|
+
assert activation in ["silu", "swish"]
|
|
1129
|
+
|
|
1130
|
+
original_x_dtype = x.dtype
|
|
1131
|
+
x = x.to(conv_state.dtype)
|
|
1132
|
+
unsqueeze = query_start_loc is None and x.dim() == 2
|
|
1133
|
+
if unsqueeze:
|
|
1134
|
+
# make it (batch, dim, seqlen) with seqlen == 1
|
|
1135
|
+
x = x.unsqueeze(-1)
|
|
1136
|
+
if query_start_loc is None:
|
|
1137
|
+
batch, dim, seqlen = x.shape
|
|
1138
|
+
else:
|
|
1139
|
+
assert conv_state_indices is not None
|
|
1140
|
+
batch = conv_state_indices.size(0)
|
|
1141
|
+
dim = x.size(1)
|
|
1142
|
+
seqlen = max_query_len
|
|
1143
|
+
_, width = weight.shape
|
|
1144
|
+
# conv_state: (..., dim, state_len), where state_len >= width - 1
|
|
1145
|
+
num_cache_lines, _, state_len = conv_state.size()
|
|
1146
|
+
|
|
1147
|
+
if validate_data:
|
|
1148
|
+
assert dim == weight.size(0)
|
|
1149
|
+
assert conv_state.stride(-2) == 1, (
|
|
1150
|
+
f"ERROR: expect contiguous along feat-dim of conv_state (currently stride={conv_state.stride()})"
|
|
1151
|
+
)
|
|
1152
|
+
assert state_len >= width - 1
|
|
1153
|
+
# when above happens, we don't shift-left to keep any records in conv_state
|
|
1154
|
+
assert dim == conv_state.size(1)
|
|
1155
|
+
if conv_state_indices is None:
|
|
1156
|
+
assert conv_state.size(0) >= batch
|
|
1157
|
+
else:
|
|
1158
|
+
assert (batch,) == conv_state_indices.shape
|
|
1159
|
+
|
|
1160
|
+
assert num_cache_lines >= batch
|
|
1161
|
+
assert weight.stride(1) == 1 # Need this
|
|
1162
|
+
|
|
1163
|
+
# adopt the strategy in vLLM that overwrite on 'x' directly, rather than creating a new tensor 'o'
|
|
1164
|
+
out = x
|
|
1165
|
+
stride_w_dim, stride_w_width = weight.stride()
|
|
1166
|
+
|
|
1167
|
+
if query_start_loc is None:
|
|
1168
|
+
# X (batch, dim, seqlen)
|
|
1169
|
+
stride_x_seq, stride_x_dim, stride_x_token = x.stride()
|
|
1170
|
+
stride_o_seq, stride_o_dim, stride_o_token = out.stride()
|
|
1171
|
+
else:
|
|
1172
|
+
# X (dim, cu_seqlen)
|
|
1173
|
+
stride_x_token, stride_x_dim = x.stride()
|
|
1174
|
+
stride_x_seq = 0
|
|
1175
|
+
stride_o_token, stride_o_dim = out.stride()
|
|
1176
|
+
stride_o_seq = 0
|
|
1177
|
+
|
|
1178
|
+
stride_istate_seq, stride_istate_dim, stride_istate_token = conv_state.stride()
|
|
1179
|
+
stride_state_indices = (
|
|
1180
|
+
conv_state_indices.stride(0) if conv_state_indices is not None else 0
|
|
1181
|
+
)
|
|
1182
|
+
if num_accepted_tokens is not None:
|
|
1183
|
+
state_len = width - 1 + (seqlen - 1) # effective state_len needed
|
|
1184
|
+
else:
|
|
1185
|
+
state_len = width - 1
|
|
1186
|
+
np2_statelen = triton.next_power_of_2(state_len)
|
|
1187
|
+
|
|
1188
|
+
def grid(META):
|
|
1189
|
+
return (
|
|
1190
|
+
batch,
|
|
1191
|
+
triton.cdiv(dim, META["BLOCK_N"]),
|
|
1192
|
+
)
|
|
1193
|
+
|
|
1194
|
+
_causal_conv1d_update_kernel[grid](
|
|
1195
|
+
# Pointers to matrices
|
|
1196
|
+
x,
|
|
1197
|
+
weight,
|
|
1198
|
+
bias,
|
|
1199
|
+
conv_state,
|
|
1200
|
+
conv_state_indices,
|
|
1201
|
+
num_accepted_tokens,
|
|
1202
|
+
query_start_loc,
|
|
1203
|
+
block_idx_last_scheduled_token,
|
|
1204
|
+
initial_state_idx,
|
|
1205
|
+
out,
|
|
1206
|
+
# Matrix dimensions
|
|
1207
|
+
batch,
|
|
1208
|
+
dim,
|
|
1209
|
+
seqlen,
|
|
1210
|
+
state_len,
|
|
1211
|
+
num_cache_lines,
|
|
1212
|
+
# stride
|
|
1213
|
+
stride_x_seq,
|
|
1214
|
+
stride_x_dim,
|
|
1215
|
+
stride_x_token,
|
|
1216
|
+
stride_w_dim,
|
|
1217
|
+
stride_w_width,
|
|
1218
|
+
stride_istate_seq,
|
|
1219
|
+
stride_istate_dim,
|
|
1220
|
+
stride_istate_token,
|
|
1221
|
+
stride_state_indices,
|
|
1222
|
+
stride_o_seq,
|
|
1223
|
+
stride_o_dim,
|
|
1224
|
+
stride_o_token,
|
|
1225
|
+
# others
|
|
1226
|
+
pad_slot_id,
|
|
1227
|
+
# META
|
|
1228
|
+
HAS_BIAS=bias is not None,
|
|
1229
|
+
KERNEL_WIDTH=width,
|
|
1230
|
+
SILU_ACTIVATION=activation in ["silu", "swish"],
|
|
1231
|
+
IS_VARLEN=query_start_loc is not None,
|
|
1232
|
+
IS_APC_ENABLED=block_idx_last_scheduled_token is not None,
|
|
1233
|
+
IS_SPEC_DECODING=num_accepted_tokens is not None,
|
|
1234
|
+
NP2_STATELEN=np2_statelen,
|
|
1235
|
+
USE_PAD_SLOT=pad_slot_id is not None,
|
|
1236
|
+
BLOCK_N=256,
|
|
1237
|
+
)
|
|
1238
|
+
if unsqueeze:
|
|
1239
|
+
out = out.squeeze(-1)
|
|
1240
|
+
return out.to(original_x_dtype)
|