-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[Core][V0] Add guidance backend for structured output #14589
base: main
Are you sure you want to change the base?
Conversation
👋 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 🚀 |
This pull request has merge conflicts that must be resolved before it can be |
5244b7f
to
2db1a0e
Compare
Hey @russellb this looks fantastic! On point 3 -- is it possible to share an example of a workload where TPOT is reducing vs. xgrammar? I don't typically see this in JSON schemas so it'd be a helpful case to look for performance improvements. |
I'm using these changes to the benchmark suite on top of this PR: #14567 I'm running the following command, changing the structured output backend to python3 benchmarks/benchmark_serving_structured_output.py --port 8432 --model meta-llama/Llama-3.1-8B-Instruct --dataset json-unique --structured-output-ratio 1.0 --structured-output-backend guidance --output-len 300 --num-prompts 90 --request-rate 1 |
This commit is based on the PR vllm-project#10217. It is updated to be compatible with `main`. Signed-off-by: Russell Bryant <rbryant@redhat.com> Co-authored-by: Loc Huynh <lohuynh@microsoft.com> Co-authored-by: Michal Moskal <michal@moskal.me>
2db1a0e
to
d66d439
Compare
This has been merged and I rebased this branch on top of |
This commit is based on the PR #10217. It is updated to be compatible
with
main
.Signed-off-by: Russell Bryant rbryant@redhat.com
Co-authored-by: Loc Huynh lohuynh@microsoft.com
Co-authored-by: Michal Moskal michal@moskal.me
I started looking at this after talking to @joerunde about some performance issues observed in production. While the ultimate goal is to get everyone to V1 where we expect to provide more drastic improvements, I wanted to see if we could do something to help in V0 in the meantime.
In my testing, the behavior I see is roughly:
xgrammar is still fastest, but has more limited jsonschema support, so it doesn't solve the challenge here.
guidance provides a signiificant improvement to TTFT, which is the biggest concern here. They observed large and complex jsonschemas taking down the server for an excessively long time.
guidance is showing a hit to TPOT for structured output requests.
I'm posting here so further testing can be done to validate whether the performance characteristics provide enough short term benefit to justify including this in tree.