Repository navigation
server: split Inkling 2 replies into reasoning, text and tool calls - #4124
ajensenwaud wants to merge 13 commits into
Conversation
|
Thanks @ajensenwaud for the Inkling 2 series (#4124 to #4128). Before we review it, one housekeeping ask that applies to all five: the commits' authors use your GitHub noreply address, but their committer is a personal email address. Our landing checks only accept noreply identities in a commit's history, so please rewrite the committer on each branch, for example with
|
f6ce80c to
2aec728
Compare
|
Done: all five heads are rewritten with the noreply address as committer and force-pushed. The kernel PRs also now use the common CUDA helpers, which fixes the |
883d011 to
5f93ca1
Compare
|
@ajensenwaud @ashhart I checked the three Inkling route regressions from a clean checkout of
The suite includes whole and streamed call parsing, suppression of the tool block header as text, and the request-specific call IDs. The fixture supplies scripted tokens and checks the route output. My test merge against Igor Lessio - AIFLOW LABS |
5f93ca1 to
f97e7f8
Compare
|
Follow-up on the new public head I also applied the filters Rechecked the rebase at I checked the committer requirement on the four still-open Inkling heads, #4124 and #4126 through #4128. Every commit ahead of main on these branches now uses a GitHub noreply committer. #4125 has already landed. Igor Lessio - AIFLOW LABS |
|
Shared-core review at Copies of server code
Behaviour
Nit
|
|
Thanks @ajensenwaud. Splitting Inkling 2 replies into reasoning, text and tool calls is the right shape, and it follows main's other reply parsers. Before it lands, it needs to match what those parsers already do in six places:
A host test for each would be ideal. We'll rebase it onto main for you afterwards if main has moved.
|
52bf7dc to
c8f1556
Compare
|
Thanks, Ash, and thanks @jschmied for the earlier read. Both reviews are answered in
From @jschmied's review, Kimi and Inkling now share one
|
|
@ajensenwaud, I checked
|
|
I tested On M5 Max with Zig 0.17.0, the combined tree passed 1,870 tests with 19 skips and compiled the native Linux ARM64 CUDA target. zig build test-server-cpu test-inkling2-host test-inkling2-cuda-host \
test-gradient-serving check-native-cuda-host \
-Dcpu=apple_m1 -Doptimize=ReleaseSafe -j2 --summary allThis checks the server parser, family code and serving pins together. GPU inference and the release checkpoint were outside the run. Igor Lessio - AIFLOW LABS |
…eplies Inkling replies now read a call's args and a cut call's name through the member scanner in tool_json_cut.zig, so the server keeps one copy of that code.
Kimi's stream now hands its reasoning and content to one emitDeltas function, and the Inkling stream calls the same function.
…stop Raw /v1/completions replies on an Inkling 2 tokenizer now come back as the model wrote them, markers included. A reply that a stop string ended keeps no tool calls, as Kimi's does. A route test covers each case.
Usage now reports the tokens inside thinking blocks as reasoning tokens, read from the marker token ids. It reported 0 before.
Each stream step now feeds only the newly decoded text to a split kept across steps, instead of decoding and splitting the whole reply again. A test feeds a reply one byte at a time and checks every prefix against the whole split.
The tokenizer is checked once for Inkling 2's markers when it opens, so each step reads the format instead of looking up two tokens, as Kimi replies already do.
A tool block whose JSON does not parse, or that names no tool, used to become a call with an empty name. It now stays in the reply's content.
A call is resolved against the request's tools, which tool_choice has already narrowed, with the spelling rules tool_parse.zig uses. A call to any other name stays in the reply's content.
c8f1556 to
55c307b
Compare
… does to them - A reply puts the raw string in content as well and reasoning_tokens is 0; ashhart#4124 merged into this branch fixes both.
|
I rechecked the new On that exact main SHA, One behavior from this PR still differs: main's native Inkling route test expects Igor Lessio - AIFLOW LABS |
What this changes
Inkling 2 replies are typed blocks of reasoning, text and tool calls. The server now splits them by the state table of vLLM's Inkling parser, gives each tool call the request's keyed id, and holds a streamed block header back until the block names its kind.
Without the last two, agents looped: every call came back as
call_0, and streamed tool names built up in the history until the model wrote them as prose. Only tokenizers with Inkling's markers take this path.cc645a54b.atc overlap --json: incomplete (ATC's limits). Conflicts only inCHANGELOG.mdand one import line inzig/src/server/root.zig, with idol: the octree and Gaussian decoders on Metal, to the 3DGS PLY (stacked on #1766) #1773, idol: the octree and Gaussian decoders on CUDA (stacked on #1773, #1767; not yet run on a GPU) #1858, lanes: LFM3's row draw and Flash Next's host reference draw use core's sampling_row (#2460 item 3, step 2) #2679 and server: --vision-image-share fixed gives every image the same share of the visual-token budget (#2510) #2717.Checks on this head
c8f1556b1; lean checker 165 on the base, 165 on this head, 0 new.zig build test-server-cpu -Dfixed-cpu: 1,804 of 1,819 tests, 15 skipped, on main8ca30f3f9with the same code as this head;zig build test: 9,802 of 9,882, 80 skipped.zig fmt --check build.zig zigandgit diff --check: clean. CI: pending.Receipt
n/a: no family on main serves Inkling 2. Kimi writes its own call ids, so it keeps the old path.
Served probe, two GB10s
A two-turn agent chat with one shell tool, served by the family stack with this parser on 19 November:
call_3841ff1feb3b791e5b054bbb, and no content.call_04810c8943136edb2aebd90b.call_0and the stream sentrun_shellas text.