Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: name a missing GGUF metadata key instead of blaming the file or memory (#13285)
Daniel Han62cbee35b8c3
diff --git a/studio/backend/core/inference/llama_cpp.py b/studio/backend/core/inference/llama_cpp.pyindex c1c4bb8237a..1cd7ee352b1 100644--- a/studio/backend/core/inference/llama_cpp.py+++ b/studio/backend/core/inference/llama_cpp.py@@ -21906,6 +21906,21 @@ class LlamaCppBackend:"Ollama instead.")+ # GGUF converted for another llama.cpp format revision (#8513: pre-#24908 MiniMax-M3 lacks indexer keys).+ missing_key = re.search(r"key not found in model:\s*([\w.\-]+)", scan_tail, re.IGNORECASE)+ if missing_key:+ return LlamaCppBackend._with_startup_diagnostics(+ f"This GGUF is missing the metadata key '{_short(missing_key.group(1))}', "+ "which the installed llama.cpp requires to load it. The file was made "+ "for a different llama.cpp version of this model's format, usually an "+ "older or pre-release one; this is not a memory problem. Download an "+ "updated GGUF of this model, or update llama.cpp if the file is newer "+ "than this build.",+ output,+ log_path,+ secrets,+ )+# 127 without any loader line above is not specific to a library: it is# also what a shell wrapper entrypoint reports when its exec target is# gone (_llama_lib_dir supports those, as does a customdiff --git a/studio/backend/tests/test_llama_cpp_start_failure_classification.py b/studio/backend/tests/test_llama_cpp_start_failure_classification.pyindex 4c54324d416..cb3826e4ade 100644--- a/studio/backend/tests/test_llama_cpp_start_failure_classification.py+++ b/studio/backend/tests/test_llama_cpp_start_failure_classification.py@@ -193,6 +193,22 @@ class TestOllamaAndFallback:assert "diffusion" in msg.lower()assert "Images page" in msg+ def test_missing_gguf_key_names_key_not_memory(self):+ # #8513: a MiniMax-M3 GGUF made before llama.cpp's native MSA support.+ out = (+ "llama_model_load: error loading model: error loading model hyperparameters: "+ "key not found in model: minimax-m3.attention.indexer.head_count\n"+ "llama_model_load_from_file_impl: failed to load model\n"+ )+ msg = _classify(+ out, "/models/MiniMax-M3-UD-Q6_K_XL-00001-of-00009.gguf", "unsloth/MiniMax-M3-GGUF", 1+ )+ assert "'minimax-m3.attention.indexer.head_count'" in msg+ assert "not a memory problem" in msg+ assert "updated GGUF" in msg+ assert "GGUF file is valid" not in msg+ assert "minimax-m3.attention.indexer.head_count\n" in msg+def test_generic_oom_keeps_memory_message(self):msg = _classify(_OOM_OUT, "/models/big.gguf", "local/big")assert "enough memory" in msg.lower()