fix: preserve K-quantized embedding weights - #1936
Open
zjn20030811 wants to merge 1 commit into
Open
Conversation
Author
|
Validation update: the new regression covers Q2_K through Q6_K plus all previously supported embedding types and checks that allocation preserves the stored quantized type. The change keeps backend capability probing/CPU staging intact, so unsupported accelerators retain their fallback. @leejet please review when convenient. |
Author
|
@leejet The GET_ROWS allowlist now retains Q2_K–Q6_K embeddings and preserves the backend fallback. The new type/allocation regression covers all K-quants and existing types. |
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
Embedding::init_paramscurrently converts K-quantized embedding weights to F32 becausesupport_get_rowspredates GGML's K-quant GET_ROWS implementations. This can multiply embedding memory by up to four times and trigger out-of-memory failures on constrained devices.This change:
Fixes #1930
Verification
is built when
SD_BUILD_TESTS=ON.The complete build is left to the repository CI matrix because the local
environment cannot complete a native build.