Repository navigation
fix(studio): name removed ggml quant types and suggest llama-quantize --allow-requantize (#18722) - #18740
Open
Fahad090NP wants to merge 1 commit into
Open
fix(studio): name removed ggml quant types and suggest llama-quantize --allow-requantize (#18722)#18740Fahad090NP wants to merge 1 commit into
Fahad090NP wants to merge 1 commit into
Conversation
… --allow-requantize (unslothai#18722)
danielhanchen
added a commit
that referenced
this pull request
Nov 21, 2026
## Problem `Repo tests (CPU, rest-2)` fails on `main` since #18625 and on every PR based on it (for example #17742, #18032, #18610, #18740): ``` test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding[3] AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding, so they break on Windows as soon as that file gains a non-ASCII byte. Pass encoding = "utf-8" ... 'tests/test_tp_vocab_parallel_gloo.py:307: open()' ``` ## Cause #18625 added a source check to `tests/test_tp_vocab_parallel_gloo.py` that reads `unsloth/models/llama.py` with a bare `open(...)`. On Windows that uses the locale code page, so it would raise `UnicodeDecodeError` once `llama.py` carries a non-ASCII byte. The guard is right; the new read is missing its encoding. ## Fix Pass `encoding = "utf-8"` to that `open()`. One line, test-only. ## Verification - On `main`: `tests/test_source_read_encoding.py -k checked_in_file_reads` fails (`[3]`, naming this line). - With this change: 16 passed, and `tests/test_tp_vocab_parallel_gloo.py` passes (11 passed).
This branch has not been deployed
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.
Fixes #18722
Summary
When a GGUF contains a tensor using a deprecated/removed or fork-specific ggml quantization type ID (such as type
36=IQ4_NL_4_4,37=IQ4_NL_4_8,38=IQ4_NL_8_8,34/35=TQ1_0/TQ2_0,39=MXFP4, or142/143=PQ2_0/PTQ1_0),llama-serverfails at startup with eitherhas invalid ggml type <id>orof type <id> ((null)) ... not a multiple of block size (0).Previously,
_classify_start_failureonly reported the raw integer (quantization type 36) without naming the quantization type or informing users with local/fine-tuned GGUFs that the bundledllama-quantize --allow-requantize <in.gguf> <out.gguf> Q4_K_Mcan convert those tensors into a loadable quantization.Changes
studio/backend/core/inference/llama_cpp.py34: TQ1_0,35: TQ2_0,36: IQ4_NL_4_4,37: IQ4_NL_4_8,38: IQ4_NL_8_8,39: MXFP4,142: PQ2_0,143: PTQ1_0) so the diagnostic names both the numeric ID and symbol (e.g.quantization type 36 (IQ4_NL_4_4)).llama-quantize (--allow-requantize <in.gguf> <out.gguf> Q4_K_M).studio/backend/tests/test_llama_cpp_start_failure_classification.pytype 36(IQ4_NL_4_4) onblk.0.ffn_down.weightand assert that--allow-requantizeguidance is included.Verification
python -m py_compile studio/backend/core/inference/llama_cpp.py studio/backend/tests/test_llama_cpp_start_failure_classification.py: passedTestStartFailureClassification.test_unreadable_tensor_type_names_the_build_not_memory: 4/4 cases passed