[Bug]: guided response_format is silently ignored without guided_decoding_backend
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Inizia da BaseLLM._check_arguments() e leggi gli helper correlati in tests/unittest/llmapi/test_sampling_params.py. Esegui prima il test di regressione indicato, quindi usa i casi di controllo riportati per verificare che il guided decoding attivo senza guided_decoding_backend venga rifiutato, mentre le richieste no-op e quelle con un backend configurato mantengano il loro comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
System Info
TensorRT-LLM commit:
c76f4a856447820aa1f994b053da7580d69b657d
Container:
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc29.dev202609250232
Container environment:
- NVIDIA Release 26.08
- PyTorch 2.14.0a0+4fdf77b
- Python 3.12
Host:
- Linux x86_64
- Docker 29.1.3
- CPU-only host for the regression test
The container reports the same TRT_LLM_GIT_COMMIT as the source revision above.
Who can help?
No response
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
I ran into the remaining missing-backend case from NVIDIA/TensorRT#4855 and reproduced it against current TensorRT-LLM main:
c76f4a856447820aa1f994b053da7580d69b657d
I reduced the issue to the request-vs-engine validation path in BaseLLM._check_arguments().
The regression test I used is:
def test_check_arguments_rejects_guided_decoding_without_backend() -> None:
llm = _TestLLM(guided_decoding_backend=None)
sampling_params = SamplingParams(
guided_decoding=GuidedDecodingParams(
json={"type": "object"}
)
)
with pytest.raises(ValueError, match="guided_decoding_backend"):
llm._check_arguments(
prompt_len=1,
sampling_params=sampling_params,
is_gen_only=False,
)
This test lives in:
tests/unittest/llmapi/test_sampling_params.py
Against unmodified current main, the regression test fails with:
Failed: DID NOT RAISE <class 'ValueError'>
The request contains an active guided-decoding constraint, but the missing backend is not rejected before execution.
I also traced the request path and confirmed that guided decoding is only installed when guided_decoding_backend is configured. Without a backend configured, the request can continue without the requested constraint being enforced.
I did not run full GPU inference locally because this host does not have an NVIDIA GPU. I ran the regression test inside NVIDIA's TensorRT-LLM release container built from the exact same source commit.
Container used:
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc29.dev202609250232
Expected behavior
If a request includes an active guided-decoding constraint but the LLM/server was started without guided_decoding_backend, the request should be rejected before executor submission with a clear validation error.
Requests that do not use guided decoding should continue to work normally.
An empty/no-op GuidedDecodingParams() should also keep its current behavior and should not be rejected.
actual behavior
The request is currently accepted even when guided_decoding_backend=None.
BaseLLM._check_arguments() does not reject the mismatch, so an active guided-decoding constraint can continue toward execution even though no guided decoder was configured.
On unmodified current main, the regression test fails with:
Failed: DID NOT RAISE <class 'ValueError'>
This means the structured-output request is not being rejected at the request-vs-engine validation boundary when the required backend capability is missing.
additional notes
I tested a small fix locally in BaseLLM._check_arguments() that rejects an active guided-decoding request when no guided_decoding_backend is configured.
The check reuses the existing SamplingParams._get_guided_decoding_params() behavior instead of duplicating guide detection. That keeps the current behavior for:
- normal requests with no guided-decoding constraint
- empty/no-op
GuidedDecodingParams() - requests where a guided-decoding backend is configured
Validation on the patch:
- regression + control cases: 4 passed
- full
tests/unittest/llmapi/test_sampling_params.py: 56 passed - TensorRT-LLM pre-commit checks: passed
The separate OpenAI json_schema wrapper issue mentioned in NVIDIA/TensorRT#4855 is already fixed on current TensorRT-LLM main, so this issue is only about the missing-backend case.
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
- Lingua principale
- Python
- Stelle
- 14.9k
- Fork
- 2.8k
- Merge medio
- 3g 4h
- PR unite (30g)
- 477
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/TensorRT-LLM
-
[Doc]: Online benchmark server limit is smaller than the sample workloadForse già presa @git-jxj l’ha presa 3 giorni fa. ApertaDoc
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
NVIDIA/TensorRT-LLM#20875 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
LLM API
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NVIDIA/TensorRT-LLM#20647 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: trtllm-gen FMHA CudaArchDecl.h numbers Sm107a as 4, but the prebuilt libTrtLlmGen archives use 4 for 105a and 5 for 107aForse già presa @lucifer1004 l’ha presa 8 giorni fa. ApertaCustomized kernels
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NVIDIA/TensorRT-LLM#20507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Performance]: Beam search re-materializes Result.output_token_ids from pybind once per beamForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaGeneral perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/TensorRT-LLM#20236 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Static disaggregated worker addresses cannot round trip bracketed IPv6Forse già presa @bojiang-li l’ha presa 14 giorni fa. ApertaDisaggregated serving
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/TensorRT-LLM#20126 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/TensorRT-LLM
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
UKGovernmentBEIS/optstop#10 ·
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pollen-robotics/reachy_mini#1508 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] `cloud-keys.env` values retain enclosing quotes causing 401 Unauthorized, and missing utf-8 encoding crashes on WindowsForse già presa @divyanshu07-code l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
open-jarvis/OpenJarvis#1192 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sylvainmetayer/homelab#851 ·
I maintainer di solito rispondono entro 1 giorno