Repository navigation
gguf_convert_endian.py: Add endianness conversion for Q1 and TQ2 quantizations - #26618
Merged
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
CISC
approved these changes
Aug 5, 2026
CISC
left a comment
Member
There was a problem hiding this comment.
Any particular reason for just these two? :)
Contributor
Author
Actually, I had a few more added, but for those, the example models I've found did produce garbage results. It probably wasn't related to the byte swap in the conversion script, but rather to the models itself or something else during inference. But I didn't want to include something I couldn't validate. |
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 12, 2026
…-org#26618) * Add endianness conversion for Q1 and TQ2 quantizations * lint --------- Co-authored-by: Sigbjørn Skjæret <[email protected]>
huaxel
pushed a commit
to huaxel/strix-llama.cpp
that referenced
this pull request
Aug 12, 2026
…-org#26618) * Add endianness conversion for Q1 and TQ2 quantizations * lint --------- Co-authored-by: Sigbjørn Skjæret <[email protected]>
brittlewis12
pushed a commit
to brittlewis12/llama.cpp
that referenced
this pull request
Aug 17, 2026
…-org#26618) * Add endianness conversion for Q1 and TQ2 quantizations * lint --------- Co-authored-by: Sigbjørn Skjæret <[email protected]>
thecodacus
pushed a commit
to thecodacus/llama.cpp
that referenced
this pull request
Sep 7, 2026
…-org#26618) * Add endianness conversion for Q1 and TQ2 quantizations * lint --------- Co-authored-by: Sigbjørn Skjæret <[email protected]>
zbrad
pushed a commit
to zbrad/llama.cpp
that referenced
this pull request
Sep 10, 2026
…-org#26618) * Add endianness conversion for Q1 and TQ2 quantizations * lint --------- Co-authored-by: Sigbjørn Skjæret <[email protected]>
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.
Overview
This adds support for the Q1 TQ2 quantization formats to the gguf_convert_endian.py script. Since the quantized values are sub-byte anyway, nothing needs to be done there. The only target for applying a byte swap is the fp16 values.
Additional information
I've tested these changes with two models on IBM Z (s390x).
Requirements