[codex] Preserve SPEC-028 benchmark evidence#402
Draft
Augustas11 wants to merge 1 commit into
Draft
Conversation
Constraint: Local 32GB Apple Silicon could validate small and 7B/1.5B pairs but not complete 32B/7B measurement. Rejected: Enable speculative decoding by default | Qwen 7B/1.5B improves throughput but regresses p95 TTFT, and 32B/7B still needs high-memory Apple Silicon validation. Confidence: medium Scope-risk: moderate Directive: Keep SPEC-028 disabled by default until rented Apple Silicon matrix proves model-pair and RAM-tier gates. Tested: swift test --package-path phase3-binary --filter Spec028PlumbingTests/testTokenizerArtifactFingerprintBindsTokenizerFiles --filter Spec028PlumbingTests/testSpec028BenchmarkEvaluationGatesTTFTRegression; swift build --package-path phase3-binary -c release --product macprovider-cli Not-tested: 32B/7B full benchmark on 128GB+ Apple Silicon; generic VPS/NVIDIA paths intentionally not used because they do not validate MLX/Metal.
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
This is a handoff PR for SPEC-028 after local hardware testing showed that we need larger Apple Silicon infra before making an enablement call.
It intentionally does not enable speculative decoding by default. SPEC-028 remains operator-gated by
draft_model; if no draft model is configured,macprovider-clikeeps using the existing target-only path.What changed
macprovider-cli spec028-benchmarkto measure baseline vs speculative decoding on the actual macprovider/MLX/Metal runtime path.chat_templateintokenizer_config.jsontokenizer.jsonexists, ignore redundantvocab.json/merges.txtpackaging differencestokenizer.jsonis absent, keepvocab.json/merges.txtbinding for slow-tokenizer layoutsspecs/SPEC-028-BENCHMARK-HANDOFF.mdwith findings, commands, test evidence, and the rented Mac validation plan.Local findings
Local host: Apple Silicon M5, 32 GB unified memory, release
macprovider-cli, context cap 8192 tokens.Completed matrix:
spec028-small-air-short-chat-v1spec028-small-air-streaming-check-v1spec028-code-iso8601-v1Qwen2.5-Coder 7B / 1.5B showed real throughput lift and high acceptance, but failed the first-token latency gate:
tpsRatio: 1.2698843002639708sustainedRatio: 1.3220061447492875acceptanceRate: 0.9645390070921985p95LatencyRatio: 0.7948502457691152ttftP95Ratio: 1.5052631578947369recommendEnable: falsep95 TTFT ratio 1.505 > 1.00032B / 7B findings
The original
draft_model_tokenizer_mismatchon Qwen2.5-Coder 32B / 7B was our policy being too strict, not a real tokenizer vocabulary mismatch. The snapshots matched ontokenizer.json,vocab.json,added_tokens.json, andspecial_tokens_map.json; the difference was redundantmerges.txtpackaging in the 7B snapshot.After the tokenizer policy fix, 32B / 7B no longer failed immediately, but it did not complete on the 32 GB local host. A 16-token smoke was also stopped after several minutes with an empty output file.
Observed local footprint:
Conclusion: 32B / 7B is not a measured loss. It is not locally benchmarkable on this 32 GB host without narrower diagnostics or more unified memory.
Rented infra plan
Generic VPS/Linux/NVIDIA cloud is not sufficient for the main product decision because this implementation is specifically
mlx-swift+ Metal on Apple Silicon. It can validate a different algorithmic stack, but not the live macprovider runtime path.Use rented Apple Silicon instead:
Required rented-host matrix:
Suggested command shape is in
specs/SPEC-028-BENCHMARK-HANDOFF.md.Tests run
swift test --package-path phase3-binary \ --filter Spec028PlumbingTests/testTokenizerArtifactFingerprintBindsTokenizerFiles \ --filter Spec028PlumbingTests/testSpec028BenchmarkEvaluationGatesTTFTRegressionResult: passed, 2 tests, 0 failures.
Result: passed. Existing Swift concurrency/deprecation warnings remain.
Follow-up recommendation
Keep SPEC-028 disabled by default until rented Apple Silicon testing proves a positive matrix by model pair and RAM tier. If Qwen2.5-Coder 7B / 1.5B keeps the throughput win but TTFT still fails, test first-token mitigation next: warm draft/target prefill, defer speculative decoding until after token 1, and cache/reuse prompt preparation where safe.