Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
80cf80b
[Refactor] Separate out `RendererConfig` from ModelConfig`
DarkLight1337 Dec 5, 2025
5d7b31e
Also move `media_io_kwargs`
DarkLight1337 Dec 5, 2025
34f6d8c
Fix
DarkLight1337 Dec 5, 2025
33e0d97
Fix
DarkLight1337 Dec 5, 2025
cd3fa6f
Fix
DarkLight1337 Dec 5, 2025
4fe9c07
Fixes
DarkLight1337 Dec 5, 2025
9eb6d28
Fixes
DarkLight1337 Dec 5, 2025
b88ad60
Skip validation to pass doc build
DarkLight1337 Dec 5, 2025
da64ef3
Typo
DarkLight1337 Dec 5, 2025
9bff3a0
Fix arg
DarkLight1337 Dec 5, 2025
e46256e
Fix
DarkLight1337 Dec 5, 2025
468274f
Fix protocol
DarkLight1337 Dec 5, 2025
916b051
Fix
DarkLight1337 Dec 5, 2025
578527a
Typo
DarkLight1337 Dec 5, 2025
b299583
Update
DarkLight1337 Dec 5, 2025
713a0c6
Improve type annotation
DarkLight1337 Dec 5, 2025
e4df022
Merge branch 'main' into renderer-config
DarkLight1337 Dec 5, 2025
bee2e25
Merge branch 'main' into renderer-config
DarkLight1337 Dec 6, 2025
7c2913d
Fix intialization for tests
DarkLight1337 Dec 6, 2025
2055a7f
Fix
DarkLight1337 Dec 6, 2025
fbc6e71
Fix
DarkLight1337 Dec 6, 2025
7498f24
Avoid breaking compat with lm-eval
DarkLight1337 Dec 6, 2025
6879564
Merge branch 'main' into renderer-config
DarkLight1337 Dec 6, 2025
423b2ca
Fixes
DarkLight1337 Dec 6, 2025
e1e05d4
Fix mutable default
DarkLight1337 Dec 6, 2025
9382291
Fix
DarkLight1337 Dec 6, 2025
b94a407
Fix
DarkLight1337 Dec 6, 2025
ee458d6
Fix entrypoints test
DarkLight1337 Dec 6, 2025
c1db821
Merge branch 'main' into renderer-config
DarkLight1337 Dec 6, 2025
b20a2aa
Merge branch 'main' into renderer-config
DarkLight1337 Dec 6, 2025
1d3ca9b
Fix
DarkLight1337 Dec 6, 2025
5da9f1a
Pass the test
DarkLight1337 Dec 6, 2025
3e9e9cf
Fix
DarkLight1337 Dec 6, 2025
78b918b
Fix wrong model ID
DarkLight1337 Dec 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/contributing/model/transcription.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Declare supported languages and capabilities:
import torch
from torch import nn

from vllm.config import ModelConfig, SpeechToTextConfig
from vllm.config import RendererConfig, SpeechToTextConfig
from vllm.inputs.data import PromptType
from vllm.model_executor.models.interfaces import SupportsTranscription

Expand Down Expand Up @@ -52,7 +52,7 @@ This is for controlling general behavior of the API when serving your model:
@classmethod
def get_speech_to_text_config(
cls,
model_config: ModelConfig,
renderer_config: RendererConfig,
task_type: Literal["transcribe", "translate"],
) -> SpeechToTextConfig:
return SpeechToTextConfig(
Expand Down Expand Up @@ -83,7 +83,7 @@ Return a dict containing `multi_modal_data` with the audio, and either a `prompt
cls,
audio: np.ndarray,
stt_config: SpeechToTextConfig,
model_config: ModelConfig,
renderer_config: RendererConfig,
language: str | None,
task_type: Literal["transcribe", "translate"],
request_prompt: str,
Expand Down Expand Up @@ -120,7 +120,7 @@ Return a dict with separate `encoder_prompt` and `decoder_prompt` entries:
cls,
audio: np.ndarray,
stt_config: SpeechToTextConfig,
model_config: ModelConfig,
renderer_config: RendererConfig,
language: str | None,
task_type: Literal["transcribe", "translate"],
request_prompt: str,
Expand Down Expand Up @@ -183,7 +183,7 @@ Provide a fast duration→token estimate to improve streaming usage statistics:
cls,
audio_duration_s: float,
stt_config: SpeechToTextConfig,
model_config: ModelConfig,
renderer_config: renderer_config,
) -> int | None:
# Return None if unknown; otherwise return an estimate.
return int(audio_duration_s * stt_config.sample_rate // 320) # example
Expand Down
22 changes: 4 additions & 18 deletions tests/entrypoints/openai/test_chat_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest

from vllm.config import ModelConfig
from vllm.entrypoints.chat_utils import apply_hf_chat_template, load_chat_template
from vllm.entrypoints.openai.protocol import ChatCompletionRequest
from vllm.tokenizers import get_tokenizer
Expand Down Expand Up @@ -107,24 +106,11 @@ def test_get_gen_prompt(
model_info = HF_EXAMPLE_MODELS.find_hf_info(model)
model_info.check_available_online(on_fail="skip")

model_config = ModelConfig(
model,
tokenizer=model_info.tokenizer or model,
tokenizer_mode=model_info.tokenizer_mode,
trust_remote_code=model_info.trust_remote_code,
revision=model_info.revision,
hf_overrides=model_info.hf_overrides,
skip_tokenizer_init=model_info.require_embed_inputs,
enable_prompt_embeds=model_info.require_embed_inputs,
enable_mm_embeds=model_info.require_embed_inputs,
enforce_eager=model_info.enforce_eager,
dtype=model_info.dtype,
)
renderer_config = model_info.build_renderer_config()

# Initialize the tokenizer
tokenizer = get_tokenizer(
tokenizer_name=model_config.tokenizer,
trust_remote_code=model_config.trust_remote_code,
renderer_config.tokenizer,
trust_remote_code=renderer_config.trust_remote_code,
)
template_content = load_chat_template(chat_template=template)

Expand All @@ -143,7 +129,7 @@ def test_get_gen_prompt(
tokenizer=tokenizer,
conversation=mock_request.messages,
chat_template=mock_request.chat_template or template_content,
model_config=model_config,
renderer_config=renderer_config,
tools=None,
add_generation_prompt=mock_request.add_generation_prompt,
continue_final_message=mock_request.continue_final_message,
Expand Down
2 changes: 1 addition & 1 deletion tests/entrypoints/openai/test_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_hf_prompt_tokens(model_name, content, image_url):
image = image.media
images = [image]

prompt = processor.tokenizer.apply_chat_template(
prompt = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = processor(prompt, images, return_tensors="pt")
Expand Down
Loading
Loading