[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
+8 -55
View File
@@ -20,7 +20,6 @@ from vllm.config import ModelConfig, SpeculativeConfig, StructuredOutputsConfig
from vllm.exceptions import VLLMValidationError
from vllm.logger import init_logger
from vllm.tokenizers import TokenizerLike
from vllm.utils.mistral import is_mistral_tokenizer
from vllm.utils.torch_utils import make_ndarray_with_pad
from vllm.v1.serial_utils import PydanticMsgspecMixin
@@ -260,14 +259,6 @@ def check_json_nesting(
)
def _is_non_tekken_mistral(tokenizer: TokenizerLike) -> bool:
return is_mistral_tokenizer(tokenizer) and not tokenizer.is_tekken
def _get_llg_tokenizer(tokenizer: TokenizerLike) -> Any:
return tokenizer.llg_tokenizer if is_mistral_tokenizer(tokenizer) else None
class SamplingParams(
PydanticMsgspecMixin,
msgspec.Struct,
@@ -1331,62 +1322,28 @@ class SamplingParams(
validate_structured_output_request_outlines,
)
from vllm.v1.structured_output.backend_xgrammar import validate_xgrammar_grammar
from vllm.v1.structured_output.utils import grammar_is_likely_lark
if backend.startswith("xgrammar"):
# xgrammar with no fallback
validate_xgrammar_grammar(self)
elif backend.startswith("guidance"):
if _is_non_tekken_mistral(tokenizer=tokenizer):
raise VLLMValidationError(
"Non-tekken Mistral tokenizers are not supported for the 'guidance'"
" structured output backend. Please either use a more recent "
"Mistral model, the ['xgrammar', 'outlines'] "
"backends or tokenizer_mode='hf' instead."
)
if not GuidanceBackend.is_tokenizer_supported(tokenizer):
raise VLLMValidationError(
"The 'guidance' structured output backend only supports fast "
"Hugging Face tokenizers and Tekken-based Mistral tokenizers. "
"Please use the 'xgrammar' backend or configure a fast "
"tokenizer instead."
"Hugging Face tokenizers. Please use the 'xgrammar' backend "
"or configure a fast tokenizer instead."
)
# TODO: ideally we would have the LLTokenizer here as Lark syntax
# allows <|special_token|> and similar, see
# https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md#special-tokens
# Without tokenizer these are disallowed in grammars.
validate_guidance_grammar(
self,
tokenizer=_get_llg_tokenizer(tokenizer),
)
validate_guidance_grammar(self)
elif backend == "outlines":
# outlines backend
validate_structured_output_request_outlines(self)
elif backend == "lm-format-enforcer":
# lm format enforcer backend
if is_mistral_tokenizer(tokenizer):
raise VLLMValidationError(
"Mistral tokenizer is not supported for the 'lm-format-enforcer' "
"structured output backend. Please use ['xgrammar', 'outlines'] "
"backends or tokenizer_mode='hf' instead."
)
validate_structured_output_request_lm_format_enforcer(self)
elif (
backend == "auto"
and is_mistral_tokenizer(tokenizer)
and tokenizer.is_tekken
and self.structured_outputs.grammar
and grammar_is_likely_lark(self.structured_outputs.grammar)
):
# Lark grammars for Tekken Mistral tokenizers, including the ones
# the Mistral tool parser generates, go to guidance. llguidance
# takes the tokenizer from mistral-common and never lets a regex
# match a special token. The xgrammar backend declares no special
# tokens for Mistral tokenizers, so a regex like `.` can match
# `[TOOL_CALLS]` or `[INST]` as plain text.
validate_guidance_grammar(self, tokenizer=_get_llg_tokenizer(tokenizer))
self.structured_outputs._backend = "guidance"
self.structured_outputs._backend_was_auto = True
else:
# NOTE: backend must be "auto" here, because we have
# checked supported_backends above.
@@ -1401,12 +1358,11 @@ class SamplingParams(
# The request either failed validation
# or includes some jsonschema feature(s) that
# are not supported in xgrammar.
skip_guidance = _is_non_tekken_mistral(tokenizer)
skip_guidance = False
# Check if schema has features unsupported by guidance
so_params = self.structured_outputs
if not skip_guidance and so_params.json:
if so_params.json:
if isinstance(so_params.json, str):
try:
schema = json_mod.loads(so_params.json)
@@ -1419,8 +1375,8 @@ class SamplingParams(
skip_guidance = has_guidance_unsupported_json_features(schema)
if skip_guidance:
# Fall back to outlines for non-Tekken Mistral tokenizers or
# schemas containing features unsupported by guidance.
# Fall back to outlines for schemas containing features
# unsupported by guidance.
validate_structured_output_request_outlines(self)
self.structured_outputs._backend = "outlines"
else:
@@ -1432,10 +1388,7 @@ class SamplingParams(
"Guidance does not support this tokenizer. Configure a "
"fast tokenizer or select a compatible backend explicitly."
) from None
validate_guidance_grammar(
self,
tokenizer=_get_llg_tokenizer(tokenizer),
)
validate_guidance_grammar(self)
self.structured_outputs._backend = "guidance"
# Remember that this backend was set automatically
self.structured_outputs._backend_was_auto = True