[Frontend] [Bugfix] Refactor tool parsers and simplify the tool parsing interface.#16096
[Frontend] [Bugfix] Refactor tool parsers and simplify the tool parsing interface.#16096paolovic wants to merge 10 commits intovllm-project:mainfrom
Conversation
Co-authored-by: elementary-particle Signed-off-by: paolovic <paul-philipp.luley@uzh.ch>
|
👋 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 🚀 |
Co-authored-by: elementary-particle Signed-off-by: paolovic <paul-philipp.luley@uzh.ch>
|
Hi @marcelodiaz558, hi @Endebert, Thank you and best regards, |
|
Just chiming in, there is also a problem with the llama 3 tool parser where it cant generate non ascii characters |
|
@paolovic Thanks for doing this. I can confirm my issues with streamed function calling are resolved with this PR. |
|
Hi @PedroF43 , Thank you and best regards, |
yes you are correct, i thought that by your title you intended to go trough all the available tool parsers |
|
cc @K-Mistele |
|
This pull request has merge conflicts that must be resolved before it can be |
Co-authored-by: elementary-particle Signed-off-by: paolovic <paul-philipp.luley@uzh.ch>
|
Hi @K-Mistele could you have a look, please? |
merge main into feature
Co-authored-by: elementary-particle Signed-off-by: paolovic <paul-philipp.luley@uzh.ch>
|
Hi @Endebert , |
@paolovic Yes, sorry about that. Turned out it was a bug in our code, which appended arguments objects if multiple functions were called during the same streaming response. |
Easy, no problem, thanks for letting me know! |
git merge main
merge main to fix ci
|
This pull request has merge conflicts that must be resolved before it can be |
Co-authored-by: elementary-particle Signed-off-by: paolovic <paul-philipp.luley@uzh.ch>
|
@aarnphm can you help review this? |
aarnphm
left a comment
There was a problem hiding this comment.
Hi there, thanks for your contribution.
I want to propose that we pause refactoring effort on tool calling atm, given that xgrammar has recently shared with us their plans to add function calling to structural tags (will share more on this).
I'm writing a RFC for tool calling, but the basic idea is that if we can reliably enforce structural tags, the parsing logic can be simplified. This would in hands address partial JSON issue without having to introduce another library to parse this.
|
@aarnphm Do you have an ETA regarding your alternative route? Because we need these changes for production use. It's fine I guess to stay on this fork and rebase + manually build it occasionally, but it's still an inconvenience. |
I would want to have this ready before 0.10.0, which will be in around 4-6 weeks. fwiw we might want to just merge all of the implementations/fix right now to make sure that it will still work for 0.9.x, but for 0.10.x, i would be more lenient for a RFC for redesigning the parser. |
|
This pull request has merge conflicts that must be resolved before it can be |
|
This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you! |
|
This pull request has been automatically closed due to inactivity. Please feel free to reopen if you intend to continue working on it. Thank you! |
Co-authored-by: elementary-particle
Completed the following, stale PR:
"This is the PR for the RFC #11522. Currently we are building a draft of simpler tool parsers using streaming JSON parsing libraries to reduce overhead and avoid bugs. Tests and commits will be added gradually.
FIX #11392 ."