Repository navigation
Stream auto tool calls while they are generated and seed content for plain Qwen prompt tails #1549
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
102835b
Stream auto tool calls and seed content for plain Qwen prompt tails
Gajesh2007 3dc0e96
Stream only Gemma marker strings early and scan end tags linearly
Gajesh2007 65af6e2
Test a streamed Gemma call that leaves the strict grammar
Gajesh2007 a062dfb
Document streamed tool_calls fragments in inference_response_chunk
Gajesh2007 bb313ec
Pin the SDK streamer cleanup and correct tool-stream comments
Gajesh2007 07c1233
Re-pin libs/mlx-swift-lm to the merged SDK change (#332)
Gajesh2007 bfcbd71
Merge master into ttft/stream-auto-tool-calls
Gajesh2007 4b372c5
Re-pin libs/mlx-swift-lm to SDK main f77b384c (#333)
Gajesh2007 e5c2c68
Seed content for plain prompt tails only on Qwen3-VL
Gajesh2007 d696e17
End a streamed call cut off by max_tokens with length, even if diverged
Gajesh2007 da617fc
Describe the Qwen3-VL-only plain-tail seed and restamp changed docs
Gajesh2007 5deb039
Tighten plain-tail seed and truncation wording; count completed Flint…
Gajesh2007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ### Tool calls stream while they are generated | ||
|
|
||
| Chat streams now send `tool_choice: "auto"` calls from Gemma 4, Qwen 3.5, 3.6 | ||
| and 3.8, GPT-OSS and framed-JSON models as OpenAI `tool_calls` fragments while | ||
| the model generates them. The call's `id`, `type` and function name arrive as | ||
| soon as the name is generated, followed by argument fragments. A response that | ||
| started with a tool call previously had no content until the whole call and the | ||
| end of generation were produced, so its time to first token included the | ||
| entire call. Each call is still validated against its declared tool and schema | ||
| when it completes. Required and named tool choices keep validating before | ||
| anything is shown. | ||
|
|
||
| Long tool calls in the Gemma, GPT-OSS and framed-JSON formats no longer cost | ||
| provider CPU time that grows with the square of their length: parsing a 64 KB | ||
| Gemma file write took about 20 s of CPU and now takes about 0.1 s. | ||
|
|
||
| Qwen3-VL Instruct, whose generation prompt carries no think marker, now | ||
| streams its answer instead of buffering it until the end. | ||
| `DARKBLOOM_TTFT_STREAM_TOOL_CALLS=0` and `DARKBLOOM_TTFT_THINK_CONTENT_SEED=0` | ||
| restore the previous behaviors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mlx-swift-lm
updated
21 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.