Production diagnostic: QWEN36_HOST_SAMPLE_WHY (which request/param forces host sampling; logging only) #345
No reviewers
Labels
No labels
cards:go
hermes-approved
human-approved
human-approved
iter
0
iter
1
iter
2
iter
3
prio:high
prio:low
prio:med
priority/high
state
blocked
state
doing
state
done
state
review
state
todo
x280
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack!345
Loading…
Reference in a new issue
No description provided.
Delete branch "opus/host-sample-why"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Owner-approved 2026-11-04: fix 1 of the host-sampling investigation (logging only). No speed change intended.
Why
Production logs
QWEN36_MTP_BATCH plain-decode fallback (host sampling)without naming a request or a param. Journal 10-30..11-03: 68,569 host-sampled plain steps vs 1,075,646 MTP steps (6.0% of steps; 1.2-25% per boot). The refusal incheck_perform_device_samplingis batch-wide, so every co-batched user drops to plain decode (~7-11 TG tok/s/user in those windows, vs 33-68 tok/s at B1 with MTP). vLLM does not log request params (no--enable-log-requests).What
patches/prod-local-plugin/src/vllm_tt_plugin/host_sample_why.py(new, pure Python): one line per (request, check):QWEN36_HOST_SAMPLE_WHY host sampling: req=<id> check=<check> params=<client param>=<value>Checks: greedy-only, sampling-tensors, num-reqs, device-k, top_k (>64), top_p, temperature, penalty, host-only-params (min_p / logit_bias / min_tokens / allowed_token_ids / bad_words), structured-output, logprobs. Ids and numbers/counts/kinds only; never prompt text, logit_bias keys, bad_words, token ids or grammar bodies. Rate limit 30 lines / 60 s (suppressed count carried on the next line); bounded seen-set, forgotten at request finish. A config-level refusal no request explains logs
req=-once. BannerQWEN36_HOST_SAMPLE_WHY engaged.model_runner.py: every decode-stepreturn Falseincheck_perform_device_samplinggoes through_hsw_refuse(check)(reports, returns False). Verdict unchanged; one attribute test with the flag off. The firstreturn False(prefill under decode_only) stays bare.s12-prefix-host-vsplit-sf: envQWEN36_HOST_SAMPLE_WHY=1, banner in[expect]. Nix specs regenerated (s12-prefix / s12-prefix-host-vsplit source lists too);tenstorrent-serving.nixmounts the module (list_tree rule);test_prod_matches_nixasserts the flag.Gate
The prod arm's gate stamp
cold-pp-gate-s12-prefix-host-vsplit-sf-20261103T221004Zbecomes STALE (the CI sweep warns). Not re-gated: logging only, and the sampling verdict is unchanged (tests/test_host_sample_why.pyWiring runs the served check against real torch tensors with the flag on and off).Verification
tests/test_host_sample_why.py: 20/20 (torch env), incl. no-prompt-text, rate limit, once-per-request, served-check wiringpython3 -m unittest discover -s tools/ttx/tests(ttx-test-python): 739 OKttx nix-spec --checkOK;check-gate-parity --allOK (STALE warnings);check-cited-recordsOK;overview.py --checkOK; nixfmt OKDeploy: nixos-llm pin bump after merge, outside the 01:45-05:15 CET P/D rehearsal window. Post-deploy check: banners (new + #344's), and one WHY line for a
logprobs: truesmoke.🤖 Generated with Claude Code
[ho-9c0a9487c50b] verdict: approve
tier: T1
rationale: Logging-only diagnostic, exactly as described.
host_sample_why.pyis pure Python, flag-gated (inert unlessQWEN36_HOST_SAMPLE_WHY=1), and leaks no prompt content — ids, counts, and param values only;logit_bias/allowed_token_ids/bad_words/grammar bodies are count/kind only. Every decode-stepreturn Falseincheck_perform_device_samplingroutes through_hsw_refuse(), which is try/except-wrapped and always returnsFalse, so the verdict is provably unchanged (one cheap attribute test when off). Stale gate stamp is disclosed and justified. Tests: 20/20 module + wiring (served code exec'd against real torch tensors, flag on/off), 739 ttx, nix-spec/gate-parity/nixfmt clean.concerns:
model_runner.py:_hsw_refuserebuilds the rows list frominput_batchon every refused step while the flag is on — fine for a bounded diagnostic, just plan the arm for removal (or a follow-up flag-off) once the answer is in.tests/test_host_sample_why.pySource test asserts an exactreturn Falsecount — intentionally brittle as a wiring guard; will need touching if any future refusal is added, which is the point.Cards skipped
Cards unavailable on
cfx-llm0for PR #345502d0ea22fe1c03955bfc3bd2c5cf5a1a221b864.systemctl is-active tenstorrent-serving.service=active(needinactive)67416804kB (need >= 4000000)No slot taken, no boot. This skip is green.
agent-gateway closeout (merged): cleared
agent:*labels.Hermes kanban card (if any) is left for Hermes to archive/complete.