Decompose TurboQuant into 2 ScalarFnArrays and DictArray#7374
Merged
connortsui20 merged 10 commits intodevelopfrom Apr 10, 2026
Merged
Decompose TurboQuant into 2 ScalarFnArrays and DictArray#7374connortsui20 merged 10 commits intodevelopfrom
ScalarFnArrays and DictArray#7374connortsui20 merged 10 commits intodevelopfrom
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
d901350 to
45ee193
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
gatesn
approved these changes
Apr 10, 2026
| // norms that are already stored. | ||
| // L2Norm(L2Denorm(normalized, norms)) is defined to read back the authoritative stored | ||
| // norms. Exact callers of lossy encodings like TurboQuant opt into that storage semantics | ||
| // instead of forcing a decode-and-recompute path here. |
Contributor
There was a problem hiding this comment.
This seems wrong to me...
As in, I don't think ScalarFn::execute should be matching on child array type should it? CC @joseph-isaacs
Contributor
Author
There was a problem hiding this comment.
we resolved this, this is fine
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
Tracking issue: #7297
Decomposes
TurboQuantinto:This makes the implementation more modular and turns the TurboQuant-specific pieces into reusable building blocks.
Also defines SORF sign generation with a frozen local
SplitMix64implementation and cleans up related vector compute code.API Changes
SorfTransformTurboQuantencoding/array typeTurboQuantSchemeas the compressor entry pointApproxOptionsNote that
ApproxOptionsdoesn't actually make sense here because we are doing exact compute here, it is the encoding itself that is lossy. Until we figure out what the exact semantics are of a lossy encoding I will remove this.Testing
More tests: