feat(bench): SPEED-Bench task splits + speculative spec/quant warnings (v0.28.0) - #19
Merged
Merged
Conversation
β¦s (v0.28.0) New kairu/speed_bench.py runs the benchmark across named semantic task splits (SPEED-Bench methodology) because speculative speedup and early-exit savings are strongly task-dependent. run_speed_bench -> SpeedBenchReport reports per-split throughput plus a throughput coefficient of variation that quantifies task-sensitivity (0 -> uniform). Six DEFAULT_SPLITS (translation, summarization, qa, code, dialogue, math), each with a deterministic prompt so MockModel runs offline. BenchmarkRunner gains an optional prompt arg to drive the splits. auto_profile: DecoderProfile.warnings + recommend(quant=, draft_kind=) flag speculative configs that erode the expected speedup -- a 4-bit draft (tanks draft-target acceptance) and a tree-structured draft (the sequential verifier cannot exploit it). Empty unless the hints are supplied, so existing recommendations are unchanged. New tests/test_speed_bench.py (100% module) + 5 warning tests. Suite: 746 passed, 4 HF-gated skipped. Version 0.27.0 -> 0.28.0. Closes the session's Discovery sweep. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmSqgYqcYfzPnkpDVR5vdw
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.
Konjo sprint β v0.28.0
Fifth and final sprint from this session's Discovery sweep (#15 CyclicJudge, #16 reliability, #17 KV eviction/quant, #18 adaptive early exit β all merged). The Medium/Low closer.
Why
Speculative-decoding speedup and early-exit savings are strongly task-dependent β a model drafts structured code or repetitive text far more predictably than open-ended dialogue β so a single aggregate latency number hides the variance that actually matters at deploy time. Separately,
AutoProfilehappily recommended speculative decoding without flagging configurations (4-bit drafts, tree drafts) that quietly erode the very speedup it promises.What
New
kairu/speed_bench.pyβ SPEED-Bench semantic task splits (pure stdlib +kairu.bench):run_speed_bench(model, splits=None, β¦)βSpeedBenchReportruns the benchmark across named task splits and reports per-split throughput plus a throughput coefficient of variation β one number quantifying how task-sensitive the configuration is (0.0β uniform across tasks).TaskSplit+ sixDEFAULT_SPLITS(translation, summarization, qa, code, dialogue, math), each with a deterministic integer prompt soMockModelruns fully offline; real tokenised prompts plug in behind the same contract.SplitResult/SpeedBenchReportexposeas_dict()for JSON transport.kairu/bench.pyβBenchmarkRunnergains an optionalpromptarg (defaults to the fixed class prompt) so SPEED-Bench drives distinct splits through the same runner. Existing behaviour unchanged.kairu/auto_profile.pyβ speculative spec/quant warnings:DecoderProfilegainswarnings: tuple[str, ...] = ().recommend(β¦, quant=None, draft_kind=None)flags a 4-bit draft (int4/4bit/nf4/fp4β tanks draftβtarget acceptance) and a tree-structured draft (the sequential verifier here cannot exploit it). Case-insensitive; empty unless the hints are supplied, so existing recommendations are byte-identical.Quality gates
tests/test_speed_bench.py(9 tests) at 100% module coverage;auto_profile.pystays 100% (+5 warning tests).speed_bench.py149 lines,bench.py443 (both < 500);recommendstays grade C cc=15 (the warning helper added zero branches to it β all logic lives in_speculative_warnings).Reuse note
run_speed_benchcomposes the existingBenchmarkRunnerper split rather than duplicating the timing loop; the split logic lives in its own module to keepbench.pyunder the 500-line gate. No HF/torch βMockModelexercises every path offline.π€ Generated with Claude Code
https://claude.ai/code/session_01TmSqgYqcYfzPnkpDVR5vdw
Generated by Claude Code