Repository navigation
feat(kv): default the Hadamard rotation on for packed INT4 (#61) - #74
Merged
Merged
Conversation
INT4-without-rotation is a real quality cliff (KL 0.0127 vs 0.0086 with rotation, ~6x INT8 vs ~4x) and the rotation is ~free — even net-faster than plain INT8 at long context. Make GEIST_KV_INT4 rotate by default; GEIST_KV_ROT=0 opts out. Plain INT8 stays opt-in (unchanged).
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.
Restores a commit that was intended for #65 but did not make it into the squash merge (the squash was computed from an earlier state of the branch), so main currently ships packed INT4 with rotation opt-in only — i.e.
GEIST_KV_INT4=1alone hits the quality cliff.INT4-without-rotation is a real quality regression: KL(fp32) 0.0127 vs 0.0086 with rotation (~6× INT8 vs ~4×), and the rotation is ~free — even net-faster than plain INT8 at long context (crossover measured in #65). So packed INT4 should rotate by default;
GEIST_KV_ROT=0opts out,=1forces on. Plain INT8 stays opt-in (unchanged).Verified:
GEIST_KV_INT4=1output is now byte-identical toGEIST_KV_INT4=1 GEIST_KV_ROT=1and differs fromGEIST_KV_ROT=0(gemma4-e2b).🤖 Generated with Claude Code