Repository navigation
convert: speed up model endian conversion and add more datatype support - #30647
Merged
Merged
Conversation
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
taronaeo
marked this pull request as ready for review
October 16, 2026 06:54
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
Member
Author
|
Decided to add the missing data type support in this PR as well since they can be compiled together. Ready for review. |
CISC
approved these changes
Oct 16, 2026
Member
|
Very nice improvement! |
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 24, 2026
…ort (ggml-org#30647) * convert: speed up model endian conversion Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: explicitly state noop Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: add missing data type support Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> --------- Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
MuFengMuXue
pushed a commit
to MuFengMuXue/llama.cpp-gfx906
that referenced
this pull request
Oct 26, 2026
…ort (ggml-org#30647) * convert: speed up model endian conversion Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: explicitly state noop Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: add missing data type support Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> --------- Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
auRose94
pushed a commit
to auRose94/llama.cpp
that referenced
this pull request
Oct 28, 2026
…ort (ggml-org#30647) * convert: speed up model endian conversion Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: explicitly state noop Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> * convert: add missing data type support Signed-off-by: Aaron Teo <aaron.teo1@ibm.com> --------- Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
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 PR speeds up the model endianness process by byteswapping tensors instead of blocks. Preliminary measurements show a wall time reduction from 87.82s to 3.36 for Q8_0 and 24.95s to 1.94s for Q4_K. 12.86x and 26.14x reduction respectively.
This is particularly useful against jobs that bill against the wall time consumed (f.ex., HF Jobs). It also speeds up our s390x CI as we use the endianness conversion script for existing CI models.
Additional information
Tested conversion against
ibm-granite/granite-3.3-2b-instruct-GGUFfrom Little-Endian to Big-Endian modelTODO
Requirements