Repository navigation
test: compare Kolibri-1 with an F32 KV cache, no flash attention - #479
Conversation
The Publish run on main (37548623206) failed all three macOS arm64 jobs on Kolibri1.RenormalizedRoutingMatchesTheReference: 0.00628 against a tolerance of 0.00622. Not a defect of patch 0016 -- the test loaded the model with the default F16 KV cache and F16 flash attention, which round by up to ~1e-3 relative, as much as the tolerance. Measured on x86-64 the same three comparisons sat at 0.0034/0.0251/0.0055 against 0.0059/ 0.0359/0.0065; Apple silicon tipped one over. The reference is double precision and the test is about the graph's math, so the context now uses an F32 cache, no flash attention and no op offload (a Metal build stays on the CPU). The deviation drops to under 1e-6 relative, so the tolerance is tightened from 1e-3 to 1e-4 and still keeps a margin above 150x. 598/598 C++ tests locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
|
Two checks are red on this PR, and neither is caused by its change:
Why: both jobs declare This is expected: What follows:
Generated by Claude Code |
Code Review: test_kolibri1 Precision FixSummaryThis PR tightens the Kolibri-1 numerical test by using F32 KV cache instead of F16 to match the double-precision reference implementation, eliminating precision-induced test failures on macOS. Positive Findings ✅
Verification Notes
No Issues FoundNo security concerns, build issues, or code quality problems detected. This PR fixes a transient test flake on Apple Silicon without introducing unnecessary loosening of test tolerances. Ready to merge. |
|



Summary
main(37548623206) failed all three macOS arm64 jobs in "Run C++ unit tests". The one log read (macOS 15 Metal) showsKolibri1.RenormalizedRoutingMatchesTheReferenceat 0.00628 against a tolerance of 0.00622.0016. The test loaded the model with the default F16 KV cache and F16 flash attention, which round by up to ~1e-3 relative, as much as the tolerance.llama/src/test/cpp/test_kolibri1.cppchanges.Test plan
Related issues / PRs
Follow-up to #478.
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdtest_kolibri1:, rather than atest:type)🤖 Generated with Claude Code
https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
Generated by Claude Code