[Bug]: CoVoST 2 truncates translations containing a literal language label

Aperta
#23,264 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@JunkaiWang-TheoPhy ci sta già lavorando.

Dal 2/12/2026.

  • #23265 di @JunkaiWang-TheoPhy — aperta

Valutazione

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

Direzione di ricerca

Start with CoVoST2._extract_translation in tensorrt_llm.evaluate.covost2 and reproduce the supplied example on CPU. Check how label matching handles line starts and multiple sections; the open linked pull request indicates work is already underway. Done means the extracted prediction retains the literal German: inside the translated sentence.

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

Descrizione

System Info

TensorRT-LLM main at f06c84da4cad0814ab0bfa0b154187a325cb9f5d. Reproduced with Python 3.12 and SacreBLEU 2.6.0 on CPU. The affected score calculation does not require a GPU or model weights.

Reproduction
from tensorrt_llm.evaluate.covost2 import CoVoST2

response = (
    "The sign says to go this way.\n"
    "German: Das Schild trägt die Aufschrift German: bitte hier entlang."
)
print(CoVoST2._extract_translation(response, "German"))
Expected behavior

The prediction passed to BLEU is Das Schild trägt die Aufschrift German: bitte hier entlang.. The first German: is the section label and the second is part of the translated sentence. The Gemma speech-translation prompt places the label at the beginning of the line after the transcription.

Actual behavior

The prediction is truncated to bitte hier entlang.. With the full sentence as the reference, this single synthetic response scores 17.38 corpus BLEU even though the translation matches the reference exactly. Unstructured responses with an inline label also lose everything before that label.

Additional notes

The scoring helper uses rfind() over the full response. A line-start match would distinguish actual section labels from mentions in the transcript or translation. The last genuine label can still be used when several sections exist.

Lingua principale
Python
Stelle
15.2k
Fork
3k
Merge medio
2g 21h
PR unite (30g)
477

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 NVIDIA/TensorRT-LLM

Tutte le issue di NVIDIA/TensorRT-LLM

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.