- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
[Structured Output] Make the output of structured output example more complete #22481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses an issue where the structured output example could produce incomplete results. By introducing a MAX_TOKENS constant and applying it to the sampling parameters for regex, JSON, and grammar-guided decoding, the change ensures that the generated outputs are complete. The implementation is clean and effectively solves the problem described. The code looks good, and I have no further comments.
| 👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run  Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add  🚀 | 
Signed-off-by: shen-shanshan <467638484@qq.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com> Signed-off-by: Yiwen Chen <yiwen66@berkeley.edu>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com> Signed-off-by: Duncan Moss <djm.moss@gmail.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
… complete (vllm-project#22481) Signed-off-by: shen-shanshan <467638484@qq.com>
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.Purpose
Currently, the default length of the output in structured output example is short and the result can be incomplete.
Add
max_tokenstosampling_paramsto make the output more complete:Test Plan
Test Result
(Optional) Documentation Update