[Misc] Replace TODO in serving transcription (#18895)

Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
Nicolò Lucchesi 2025-05-29 11:58:14 +02:00 committed by GitHub
parent 7fcfd954ff
commit 24d0ef8970
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -278,7 +278,9 @@ class OpenAIServingTranscription(OpenAIServing):
result_generator: Optional[AsyncGenerator[RequestOutput, None]] = None
try:
# TODO(rob): subtract len of tokenized prompt.
# Unlike most decoder-only models, whisper generation length is not
# constrained by the size of the input audio, which is mapped to a
# fixed-size log-mel-spectogram.
default_max_tokens = self.model_config.max_model_len
sampling_params = request.to_sampling_params(
default_max_tokens, self.default_sampling_params)