[Bug]: min_tokens not work
System Info
GPU A100 docker: 1.1.0 rc4
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
In my requests, I used min_tokens, but the number of output tokens was less than min_tokens.
trtllm-serve /app/data/gemma-3-4b-it/model --max_batch_size 128 --host 0.0.0.0 \
--kv_cache_free_gpu_memory_fraction 0.3
Expected behavior
.
actual behavior
.
additional notes
.
Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
We don't actually support min_tokens yet. @dcampora could you take a look at this?
@evezhier could you please look into this? Thanks a lot!
Fixed by #7808. However, this specific model has two EOS tokens, TRT-LLM doesn't support it just yet, so the output might still contain one of these tokens and appear shorter in the detokenized form in certain cases. The number of generated tokens will nevertheless be correct.
Closing the bug, as the actual issue is resolved