Skip to content

Server: the prompt-chunk startup line prints a 128-token prefill step as 128, not 0,128 - #526

Closed
BobClawblaw wants to merge 1 commit into
ashhart:mainfrom
BobClawblaw:server-prefill-step-log
Closed

BobClawblaw wants to merge 1 commit into
ashhart:mainfrom
BobClawblaw:server-prefill-step-log

Conversation

@BobClawblaw

Copy link
Copy Markdown
Contributor

Spotted in jkuepker's receipt on #520 (#520 (comment)), and present on main: server.zig:105 printed the prefill step as {d},{d:0>3} of the thousands and the remainder, which assumes a step of 1,000 or more. Nemotron and GLM meet that; the Qwen3.5 family's 128-token step came out as prompt chunks of up to 0,128 tokens.

What changes

  • zig/src/server/live.zig: the status line's comma grouping splits into a public commas(buf, n: u64) for integers of any size; grouped keeps the half-to-even rounding and calls it. A commas test covers 0, 128, 1,000, 2,048 and 1,234,567.
  • zig/src/server/server.zig: the startup line formats the step with commas, so 128 prints as 128 and 2,048 still prints as 2,048.

Checks

zig build test: 91 of 91 steps, all tests pass. zig build: compiles. zig fmt --check on both files: clean.

Independent of #520; only the two server files.

🤖 Generated with Claude Code

…tep as 128, not 0,128

The startup line split the prefill step into thousands and a zero-padded
remainder, which assumed a step of 1,000 or more. Nemotron and GLM meet
that; the Qwen3.5 family's 128-token step printed as "0,128". The status
line's comma grouping in live.zig becomes a public `commas` for integers
of any size, and the startup line uses it. Seen in the receipt on ashhart#520.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ashhart

ashhart commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Thank you, @BobClawblaw, for catching the 128-token startup label. The formatter now prints 128 as 128 and keeps comma grouping for larger steps, with all five examples covered by the CPU test. It landed on main under your authorship with the extra co-author trailer removed, so GitHub shows this PR as Closed rather than Merged.

@ashhart ashhart closed this Oct 9, 2026
@BobClawblaw
BobClawblaw deleted the server-prefill-step-log branch October 15, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants