Repository navigation
Conversation
Adopt the independent default-off slice from #6065. Keep the existing arithmetic and strict output checks; device compilation, exactness and performance qualification remain separate.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts part of #6065 by @jojomondag: the startup probe cache from its warm start, as a default-off switch. The commit keeps their authorship.
What it does
TF_X_PROBE_CACHE=1lets native Qwen3.5/3.8 on CUDA reuse its startup probe record instead of probing again. The record's key binds the code, checkpoint, device and process settings, the resolved kept-state policy, and the drafter actually declared through the API (its config, index and shard identity), so callers that do not name the drafter on the command line are covered. The record's magic, key, checksum and a finite positive rate must all check out before reuse; anything else runs the original probe.TF_X_PROBE_CACHE=verifyruns the fresh probe, logs a comparison and uses the fresh result.TF_X_PROBE_CACHE_DIRoptionally sets the cache directory.Default and exactness
Off by default;
0,1andverifyare accepted, anything else is refused at startup. Unset, nothing changes. On, a reused record holds the values the probe stored for the same identity, so tokens should be the same; the device run below has to confirm that skipping the probe's prefill and warmup leaves tokens and kept states unchanged.Checked (host only)
zig build test-qwen35-probe-cache-host: 20/20 pass. Covered: fresh, cold and warm identity and rate bytes with a recording probe; changed keys; corruption;verifyreturning fresh values; a changed declared drafter, config or policy; and compiling the real native Qwen caller.zig build test-environment-host44/44, andpython3 tools/zig/env_names.py --checkreports no problems.Still needed before it can be turned on
A CUDA device run, which we do ourselves:
verify, an unchanged restart and a changed drafter, config or policy, with fresh and cached probe state equal and fresh and restored tokens and logits equal;No speed is claimed here.