[Misc] Unify tokenizer registration (#29767)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-12-01 19:34:58 +08:00
committed by GitHub
parent 86e178f7c4
commit f0a28bf661
14 changed files with 237 additions and 183 deletions

View File

@@ -4,7 +4,7 @@
import json
from enum import Enum
from typing import TYPE_CHECKING, Any
from typing import Any
import jsonschema
import pytest
@@ -24,11 +24,6 @@ from vllm.sampling_params import (
StructuredOutputsParams,
)
if TYPE_CHECKING:
from vllm.config.model import TokenizerMode
else:
TokenizerMode = str
NGRAM_SPEC_CONFIG = {
"model": "[ngram]",
"num_speculative_tokens": 5,
@@ -627,7 +622,7 @@ Make the response as short as possible.
)
def test_structured_output_with_reasoning_matrices(
backend: str,
tokenizer_mode: TokenizerMode,
tokenizer_mode: str,
reasoning_parser: str,
model_name: str,
speculative_config: dict[str, Any] | None,