Skip to content

feat(demo): stream_client.py warmup mode - #179

Merged
solderzzc merged 1 commit into
mainfrom
chore/demo-client-warmup
Sep 25, 2026
Merged

solderzzc merged 1 commit into
mainfrom
chore/demo-client-warmup

Conversation

@solderzzc

Copy link
Copy Markdown
Member

Small demo-tooling PR: adds a warmup mode to scripts/demo/stream_client.py.

Why

The first request after a model loads pays one-off Metal pipeline and compile costs. On a base Mac mini M6 (32 GB), Qwen3.6-35B-A3B decoded the same prompt at 39.7 tok/s cold vs 44.5 tok/s warm. For terminal recordings we want neither a misleading cold number nor a warm-up done off screen. With this mode the recording shows both requests as separate, labelled steps:

python3 scripts/demo/stream_client.py warmup   # first request after load (warm-up)
python3 scripts/demo/stream_client.py short    # measured request

This is the sequence in the Qwen3.6-35B GIF attached to the M6 launch post (https://x.com/Simba_Zhang/status/2103293610670297167), so anyone can reproduce that exact recording.

Changes

  • warmup: a short "Count from 1 to 8" request, max_tokens 24.
  • The prompt … tok · prefill … tok/s stat now prints only for long, where the prompt is big enough for it to mean something. (For warmup it printed prefill 8 tok/s on an 18-token prompt.)

No server changes.

🤖 Generated with Claude Code

…bers

The first request after a model loads pays one-off Metal pipeline and
compile costs. On a Mac mini M6, Qwen3.6-35B-A3B decoded at 39.7 tok/s
cold vs 44.5 tok/s warm on the same prompt. `stream_client.py warmup`
sends a short "count from 1 to 8" request so recordings can show the
warm-up and the measured request as two visible, separate steps rather
than quoting a cold number or hiding the warm-up. The prompt-token/prefill
stat now only prints for `long`, where it's meaningful.

Used for the Qwen3.6-35B recording linked from the M6 launch post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solderzzc

Copy link
Copy Markdown
Member Author

Reviewed (code-review skill, M5 agent): no issues found. The warmup mode is fine, and kind == "long" correctly keeps the prefill stat off both warmup and short runs. Merging.

@solderzzc
solderzzc merged commit 323bd6b into main Sep 25, 2026
14 checks passed
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.

1 participant