[Mini-VLLM] Cut non-OpenAI surfaces, dead kernels, Mistral stack

- Remove Anthropic, Cohere, SageMaker, decisions, structured-decisions,
  rl, render-launcher and batch entrypoints; keep scale-out token routes
- Drop the Swagger static bundle and the /docs, /redoc routes
- Delete device-keyed tuning configs for fused_moe, quant utils, mamba
  select-state and helion; no sm86 entry ever existed for any of them
- Remove ten unused rope variants plus the fbgemm_fp8 and fp_quant
  quantizers and their config, metrics and loader plumbing
- Cut the CPU device build: csrc/cpu, cpu_extension.cmake, cpu
  requirements and the setup.py cpu target path
- Delete 29 environment variables nothing reads and 14 chat-template
  fallbacks for models this fork no longer registers
- Remove nine dead CUDA ops (deepseek_v4, kimi_k3, minimax, muse_spark,
  dsv3 gemm) with their kernels, bindings, wrappers and CMake entries
- Delete the connector test suites that targeted removed connectors
- Cut the Mistral tokenizer and parser stack, its tests, and the
  mistral_common and ijson dependency pins
- Restore the Qwen4Exp registry rows and nvidia/mtp.py that an earlier
  cut deleted while keeping the model tree

Co-authored-by: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-19 17:10:56 +07:00
co-authored by Hinata
parent bd70a61c20
commit 2066d3143f
1086 changed files with 122 additions and 291919 deletions
+9
View File
@@ -70,6 +70,10 @@ logger = init_logger(__name__)
_TEXT_GENERATION_MODELS = {
"Qwen3NextForCausalLM": ("qwen3_next", "Qwen3NextForCausalLM"),
"Qwen4ExpForCausalLM": (
"vllm.models.qwen4_exp",
"Qwen4ExpForCausalLM",
),
"Qwen2ForCausalLM": ("qwen2", "Qwen2ForCausalLM"),
"Qwen2MoeForCausalLM": ("qwen2_moe", "Qwen2MoeForCausalLM"),
"Qwen3ForCausalLM": ("qwen3", "Qwen3ForCausalLM"),
@@ -105,12 +109,17 @@ _MULTIMODAL_MODELS = {
"qwen3_5",
"Qwen3_5MoeForConditionalGeneration",
),
"Qwen4ExpForConditionalGeneration": (
"vllm.models.qwen4_exp",
"Qwen4ExpForConditionalGeneration",
),
}
_SPECULATIVE_DECODING_MODELS = {
"DFlashDraftModel": ("qwen3_dflash", "DFlashQwen3ForCausalLM"),
"MuseGlimmerAssistantModel": ("qwen3_dflash", "DFlashQwen3ForCausalLM"),
"DFlashMuseGlimmerAssistantModel": ("qwen3_dflash", "DFlashQwen3ForCausalLM"),
"Qwen4ExpMTP": ("vllm.models.qwen4_exp", "Qwen4ExpMTP"),
"Qwen3_5MTP": ("qwen3_5_mtp", "Qwen3_5MTP"),
"Qwen3_5MoeMTP": ("qwen3_5_mtp", "Qwen3_5MoeMTP"),
}
+1 -62
View File
@@ -3,12 +3,10 @@
import itertools
import math
from abc import ABC, abstractmethod
from collections.abc import Callable
from typing import Generic, Literal, Protocol, TypeAlias, TypeVar
from typing import Literal, TypeAlias
import torch
from transformers import PreTrainedConfig
from vllm.config import MultiModalConfig, get_current_vllm_config_or_none
from vllm.distributed import (
@@ -23,65 +21,6 @@ from vllm.v1.attention.backends.registry import AttentionBackendEnum
logger = init_logger(__name__)
_C = TypeVar("_C", bound=PreTrainedConfig)
_C_co = TypeVar("_C_co", bound=PreTrainedConfig, covariant=True)
class _RootConfig(Protocol[_C_co]):
@property
def vision_config(self) -> _C_co: ...
class VisionEncoderInfo(ABC, Generic[_C]):
def __init__(self, hf_config: _RootConfig[_C]) -> None:
super().__init__()
self.hf_config = hf_config
self.vision_config = hf_config.vision_config
@abstractmethod
def get_num_image_tokens(
self,
*,
image_width: int,
image_height: int,
) -> int:
raise NotImplementedError
@abstractmethod
def get_image_size(self) -> int:
raise NotImplementedError
@abstractmethod
def get_patch_size(self) -> int:
raise NotImplementedError
@abstractmethod
def get_patch_grid_length(self) -> int:
raise NotImplementedError
class VisionLanguageConfig(Protocol):
@property
def vision_config(self) -> PreTrainedConfig: ...
def get_vision_encoder_info(hf_config: VisionLanguageConfig) -> VisionEncoderInfo:
# Avoid circular imports
from .clip import CLIPEncoderInfo, CLIPVisionConfig
from .pixtral import PixtralHFEncoderInfo, PixtralVisionConfig
from .siglip import SiglipEncoderInfo, SiglipVisionConfig
if isinstance(hf_config.vision_config, CLIPVisionConfig):
return CLIPEncoderInfo(hf_config)
if isinstance(hf_config.vision_config, PixtralVisionConfig):
return PixtralHFEncoderInfo(hf_config)
if isinstance(hf_config.vision_config, SiglipVisionConfig):
return SiglipEncoderInfo(hf_config)
msg = f"Unsupported vision config: {type(hf_config.vision_config)}"
raise NotImplementedError(msg)
def _get_vit_attn_backend(
head_size: int,