Repository navigation
feat: add sampling-path and temperature=0 diagnostics - #4
Merged
Merged
Conversation
… diff, and sibyl-audit - Add ledger/sampling.py to classify greedy vs. stochastic sampling kernels, detect lm_head + logits-sized DtoH host-fallback sampling, compare sampling modes across captures, and audit Sibyl deployment profile sampling_policy. - Wire sampling diagnostics and ## Sampling into ledger analyze (and ensure zero-ms Findings notes render even when no >0.5 ms timing finding exists). - Flag greedy vs. stochastic or temperature mismatches in ledger diff. - Add --profile and --fail-on-sampling to ledger sibyl-audit to catch sampling_default_temperature=0 / sampling_thinking_temperature=0 and profile-vs-kernel mismatches. - Add --temperature / --top-p flags and run.json recording to ledger profile, examples/vllm_decode.py, and ledger ascend-import. - Add tests/test_sampling.py covering all diagnostic paths.
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.
Summary
ledger/sampling.pyto classify greedy vs. stochastic sampling kernels (excluding MoE routing top-k), detectlm_head+ logits-sizedDtoH(>= 256 KiB) host-fallback sampling, compare sampling modes across captures, and audit Sibyl deploymentprofile.jsonsampling_policy.## Samplingintoledger/analyze.py, flagging silenttemp=0fallback (declaredtemperature > 0with only greedy kernels), host-fallbackDtoHsampling, and greedytemperature=0decode captures (also ensuring zero-msFindingsnotes render when no >0.5 ms timing finding exists).ledger/diff.py.--profile(with co-located auto-detection) and--fail-on-samplingtoledger/sibyl_audit.pyto catchsampling_default_temperature=0,sampling_thinking_temperature=0, and profile-vs-kernel mismatches.--temperature/--top-pflags andrun.jsonrecording toledger/profile.py,examples/vllm_decode.py, andledger/ascend_import.py.tests/test_sampling.py.Verification
pytest tests: 62/62 passed.