serving: recommended sampling defaults (off), and the device-sampler validation tooling #286
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack!286
Loading…
Reference in a new issue
No description provided.
Delete branch "serve/sampling-defaults"
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?
Serving defaults for the recommended sampling settings, plus the bench tooling to validate the device sampler at those settings. Production is not changed: the default unit (ExecStart and readiness probe) evaluates to the same drv as master's (
unit-tenstorrent-serving.service.drvdsk2hhfg…). Deploying is the owner's call.What today actually does
--generation-config, so vLLM usesautoand applies the checkpoint'sgeneration_config.json: T=1.0, top_k 20, top_p 0.95. This is the same for Qwen3.8-27B-FP8, ThinkingCap and packed-G2.temperature: 0and are unaffected.docs/analysis/agentic-ideas-20261020.md).Changes
modules/tenstorrent-serving.nixsamplingDefaults(defaultnull): renders--override-generation-config '<json>', e.g.{ temperature = 1.0; top_p = 0.95; top_k = 20; min_p = 0.0; }(D-2026-10-20-serve-recommended).extraEnv.QWEN36_DEVICE_SAMPLE = "1"or an explicitsamplingDefaultsOnHost = true.QWEN36_DEVICE_SAMPLE=1and noQWEN36_DEVICE_SAMPLE self-test exactbanner, so it fails closed on a tree without the sampler, which is master today.docs/SERVING.md§7a: today's behaviour, the recommended settings, and how they pair with the device sampler.tools/ttx/tests/test_sampling_tooling.py(30 tests):gsm8k.py,kv-accuracy.pyandserving-bench.py:--temperature/--top-p/--top-k/--server-defaults/--seed-base, threaded throughttx run/ab/resident. At their defaults they send exactly{"temperature": 0}as before.ttx abwith a gate suite now passes gate options; it was silently dropping them. Its--tokensdefault isNone, but--controlmode still uses 1024, and CI and mkqueue are unaffected (checked by review with mocks).batch-equiv-bench.py --sampled-companions N: T>0 streams share decode steps with the T=0 streams under test.bench/sampling-dist-check.py(ref | sample | compare | --self-test): exact vLLM 0.26apply_top_k_top_ptarget from raw logprobs; per-cell TV distance, chi-square and Fisher; hard fail on any out-of-support sample; detects a shared unseeded seed; includes a decode-step cell, becausedecode_onlyhost-samples the first token.bench/agentic-pi/: the 10-20 8-agent pi bench as a repeatable harness.pi_provider.pywith no--samplingsends server defaults.Validation
bash -non the probe.nix build .#checks.x86_64-linux.tenstorrent-servingpasses.tools/ttx/tests: 678 run. The 1 error istest_seed_symlink(no pytest here), which also errors on master.sampling-dist-check.py --self-testOK.run.shsmoke-tested against a stub server: cleanup verified.d751206a, except that the VM test still covers only the default render.The CI card run this PR triggers (S5 vs S5 for tooling paths) carries no ship decision and will be cancelled.
🤖 Generated with Claude Code
A request that omits sampling fields is not served greedy, as had been assumed. vLLM's default --generation-config auto applies the checkpoint's {T 1.0, top_k 20, top_p 0.95}, and the server log warns about it. Such requests therefore already run host-sampled with MTP off. That path costs 6.4 vs 66.6 tok/s/user at B=8 (agentic pi bench, r2 vs r3). The recommended T=0.6/top_p 0.95/top_k 20 defaults are wired as an option. A non-greedy default is asserted to pair with QWEN36_DEVICE_SAMPLE, or with an explicit samplingDefaultsOnHost. With null (the default), the unit script renders byte-identical to production's (checked by eval), and the VM test asserts that no override is rendered. Deploying it is the owner's call. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Cancelled CI run #9708. Its only card work would be S5 vs S5, for tooling paths: no ship decision, and it would hold the mesh ahead of the acc-curve/screen queues. The host-module checks it would have run are unchanged: the default unit drv is identical to master's (dsk2hhfg…), and
nix build .#checks.x86_64-linux.tenstorrent-servingpassed locally on this branch before the probe hunk (the probe hunk is a no-op at the default). tools/ttx/tests: 678 run, only the pre-existing pytest-import error.verdict: approve
tier: T1 (module + bench/ttx tooling; no production change — deploy is the owner's call)
rationale: Off-by-default, additive.
samplingDefaults = nullrenders the unit script byte-identical to production's (flag inserted inline before--additional-config, empty string when null; the probe's new QWEN36_DEVICE_SAMPLE block is a''}-joined no-op when the env is unset), so nothing ships on merge. Benches keep the historical argv:sampling_params.pydefaults send exactly{"temperature": 0}; all new flags are default-empty with explicit refusals for impossible combinations (--server-defaults+ explicit fields, T<0, top_p out of (0,1], top_k < -1). The two new module assertions (non-greedy default needs the device-sampler lever or explicit on-host acceptance; QWEN36_DEVICE_SAMPLE needs mounted prod sources) fail closed and only fire when the owner opts in. The paired-control sampling-mismatch warning and per-recordsampling/seedfields are sound;--sampled-companionscompanions are never captured/compared and a companion error fails the run (correct: it is a server fault). Verified in-kernel on the head tree: 21/30 of the newtest_sampling_tooling.pypass; the 9 errors are environmental (my partial scratch tree lacks thepatches/prod-local-metaloverlay, soA.load(ARM)refuses before any new code runs) — none indicate a defect.concerns:
tools/ttx/ttxlib/cli.py—ttx ab --tokensdefault moved 1024 → None (falls back to 1024 incmd_ab): byte-identical behavior, but it is a shared-tooling default change; keep it deliberate.tools/ttx/testssuite (678) has no green run on this head; my in-kernel check of the 30 new tests is the only independent test evidence here.samplingDefaults) — the PR body already notes this; a follow-up test when the s-sample4 validation queue lands would close it.The exact speculative-sampling rule is selected per request via vllm_xargs {"tt_spec_rule": ...}. To run the distribution check under each rule on one boot, every sample request must carry that field. The value is recorded in the samples config. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>3d572a42e4eee9a816beagent-gateway closeout (merged): cleared
agent:*labels.Hermes kanban card (if any) is left for Hermes to archive/complete.