Allow no-timestamp Whisper decoding beyond 224 tokens

Aperta Adatta ai principianti
#2,074 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Emre-Akgul ci sta già lavorando.

Dal 11/7/2026.

  • #2075 di @Emre-Akgul — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
cpp

Direzione di ricerca

Inizia da WhisperReplica::generate e verifica come viene calcolato decoding_options.max_length a partire da task prompt e start_step. Riproduci il caso con la decodifica senza timestamp e verifica che i prompt che terminano con <|notimestamps|> possano usare il contesto di testo rimanente, mentre la decodifica con timestamp mantenga il limite esistente pari a metà del contesto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

WhisperReplica::generate currently limits decoding with:

decoding_options.max_length = std::min(total_max_length / 2, total_max_length - start_step);

This applies the original 224-token sampling limit even when the prompt ends in <|notimestamps|>. For languages that rely heavily on Whisper's byte-level fallback, 224 tokens can be exhausted by a short audio clip even though the model has a 448-position text context.

Reproduction

Using faster-whisper with large-v3, vad_filter=False, and without_timestamps=True, both an Armenian and a Georgian sample stopped at exactly 224 re-tokenized visible-text tokens. One output ended with the Unicode replacement character because generation stopped mid-byte sequence.

The same audio with timestamp decoding used more than 224 visible-text tokens because timestamp boundaries allow faster-whisper to continue the transcription loop, but disabling timestamps produces one decode for the complete audio window.

Proposed behavior

When the task prompt ends with <|notimestamps|>, allow decoding to use the remaining text context:

total_max_length - start_step

Keep the existing half-context limit for timestamped decoding. This preserves the standard timestamp path while allowing explicit no-timestamp callers to use the model's remaining decoder positions.

Lingua principale
C++
Stelle
4.8k
Fork
557
Merge medio
1g 6h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenNMT/CTranslate2

Tutte le issue di OpenNMT/CTranslate2

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.