[Mini-VLLM] Remove LoRA, plugins, speech-to-text and scale-out surfaces

Production runs one static model behind the OpenAI-compatible API. Every
adapter path and non-OpenAI HTTP surface is unreachable there.

- Delete the LoRA stack: vllm/lora, LoRARequest on the engine wire, the
  scheduler, worker, cudagraph and MoE plumbing, LoRA metrics, the lora
  CLI group, and the LoRA tests.
- Drop the plugin loader in vllm/plugins. Platform resolution is now
  CUDA-only and the general/stat-logger plugin hooks are gone.
- Delete the speech-to-text and realtime entrypoints, the scale-out
  render routes, and vllm/config/speech_to_text.py. GenerationTask is
  generate-only.
- Cut DecodeBenchConnector and the disagg-prefill doc and image. The
  Multi, Offloading and Example connectors stay; production uses the
  CPU KV offload tier.
- Delete the ROCm-only fused KDA chunk kernel (2346 lines) with its CMake
  arch gate, declarations and op registrations. The CUDA build never
  defined the guard and no Python caller existed.
- Delete the orphan Mistral and Pixtral chat fixtures and examples/.
- Fix _check_model: removing the LoRA early return made every request
  fail with "The model ... does not exist. Valid aliases: ...".

Verified on an RTX 3090: import sweep reports 1242 modules with 7 known
optional-dependency failures; a live server answers chat, completions,
responses, tokenize and detokenize with zero log errors and 404 for the
removed surfaces; collection yields 8558 tests with the 3 pre-existing
errors; ruff adds no new finding; the incremental _C build succeeds.

Co-authored-by: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-19 21:06:19 +07:00
co-authored by Hinata
parent 5f3c7bd8ab
commit 5aa2ac64f8
269 changed files with 417 additions and 29932 deletions
@@ -240,7 +240,7 @@ QWEN4_EXP_SM121_GEMM_PLANS: dict[tuple[int, int], dict[int, SkinnyGemmConfig]] =
8: SkinnyGemmConfig(8, 128, 1, vector_width=2, static_k=6144),
16: SkinnyGemmConfig(16, 32, 1, static_k=6144),
},
# QSA fused QKV/gate projection, TP=2 (LoRA keeps the indexer projection separate).
# QSA fused QKV/gate projection, TP=2.
(6656, 2560): {
1: SkinnyGemmConfig(1, 128, 4, k_unroll=2, vector_width=4, static_k=2560),
2: SkinnyGemmConfig(2, 128, 4, k_unroll=2, vector_width=4, static_k=2560),
-14
View File
@@ -40,7 +40,6 @@ from vllm.model_executor.models.interfaces import (
MixtureOfExperts,
MultiModalEmbeddings,
SupportsHCSP,
SupportsLoRA,
SupportsMRoPE,
SupportsPP,
SupportsReplaySSM,
@@ -676,7 +675,6 @@ class Qwen4ExpForCausalLM(
nn.Module,
HasInnerState,
SupportsHCSP,
SupportsLoRA,
SupportsMRoPE,
SupportsPP,
Qwen4ExpMixtureOfExperts,
@@ -703,12 +701,6 @@ class Qwen4ExpForCausalLM(
def __init__(self, *, vllm_config: VllmConfig, prefix: str = "") -> None:
super().__init__()
config: Qwen4ExpTextConfig = vllm_config.model_config.hf_text_config
if vllm_config.lora_config is not None:
# LoRA does not support the merged QKV/indexer projection, so its
# packed mapping must keep the indexer separate.
self.packed_modules_mapping = self.packed_modules_mapping | {
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
}
self.vllm_config = vllm_config
self.model_config = vllm_config.model_config
self.quant_config = vllm_config.quant_config
@@ -984,12 +976,6 @@ class Qwen4ExpForConditionalGeneration(
def __init__(self, *, vllm_config: VllmConfig, prefix: str = "model") -> None:
nn.Module.__init__(self)
config: Qwen4ExpConfig = vllm_config.model_config.hf_config
if vllm_config.lora_config is not None:
# LoRA does not support the merged QKV/indexer projection, so its
# packed mapping must keep the indexer separate.
self.packed_modules_mapping = self.packed_modules_mapping | {
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
}
quant_config = vllm_config.quant_config
multimodal_config = vllm_config.model_config.multimodal_config
if multimodal_config is None:
+16 -23
View File
@@ -505,15 +505,13 @@ class Qwen4ExpQSAAttention(Qwen3NextAttention, AttentionLayerBase):
or current_platform.has_device_capability(89)
)
)
self.fuse_indexer_projection = vllm_config.lora_config is None
if self.fuse_indexer_projection:
self.index_qk_size = self.indexer.index_qk_proj.output_size
self.qkv_proj = Qwen4ExpQSAQKVIndexerLinear(
self.qkv_proj,
self.index_qk_size,
model.without_modelopt_fp4(quant_config),
)
del self.indexer.index_qk_proj
self.index_qk_size = self.indexer.index_qk_proj.output_size
self.qkv_proj = Qwen4ExpQSAQKVIndexerLinear(
self.qkv_proj,
self.index_qk_size,
model.without_modelopt_fp4(quant_config),
)
del self.indexer.index_qk_proj
max_tokens = vllm_config.scheduler_config.max_num_batched_tokens
# PACKED selection buffer: the trailing column holds each row's
@@ -537,13 +535,11 @@ class Qwen4ExpQSAAttention(Qwen3NextAttention, AttentionLayerBase):
static_context[self.layer_name] = self
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
mapper = None
if self.fuse_indexer_projection:
mapper = WeightsMapper(
orig_to_new_stacked={
"indexer.index_qk_proj.": ("qkv_proj.", 3),
}
)
mapper = WeightsMapper(
orig_to_new_stacked={
"indexer.index_qk_proj.": ("qkv_proj.", 3),
}
)
return AutoWeightsLoader(self).load_weights(weights, mapper=mapper)
def get_attn_backend(self) -> type[AttentionBackend]:
@@ -631,13 +627,10 @@ class Qwen4ExpQSAAttention(Qwen3NextAttention, AttentionLayerBase):
positions: torch.Tensor,
hidden_states: torch.Tensor,
) -> torch.Tensor:
qkv, _ = self.qkv_proj(hidden_states)
if self.fuse_indexer_projection:
qkv, projected_qk = qkv.split(
[2 * self.q_size + 2 * self.kv_size, self.index_qk_size], dim=-1
)
else:
projected_qk, _ = self.indexer.index_qk_proj(hidden_states)
merged_qkv, _ = self.qkv_proj(hidden_states)
qkv, projected_qk = merged_qkv.split(
[2 * self.q_size + 2 * self.kv_size, self.index_qk_size], dim=-1
)
num_tokens = hidden_states.shape[0]
if not self.use_fused_qsa_prepare:
q, k, v, gate = self._project_qkv_gate(qkv, positions)