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
add quant type test
jeromekuecf70d6caa1b
diff --git a/tests/test_model_registry.py b/tests/test_model_registry.pyindex a767d42cdbe..3d570af230a 100644--- a/tests/test_model_registry.py+++ b/tests/test_model_registry.py@@ -13,15 +13,14 @@ from dataclasses import dataclassimport pytestfrom huggingface_hub import ModelInfo as HfModelInfo-from unsloth.registry import register_models+from unsloth.registry import get_model_info, register_modelsfrom unsloth.registry._deepseek import register_deepseek_modelsfrom unsloth.registry._gemma import register_gemma_modelsfrom unsloth.registry._llama import register_llama_modelsfrom unsloth.registry._mistral import register_mistral_modelsfrom unsloth.registry._phi import register_phi_modelsfrom unsloth.registry._qwen import register_qwen_models-from unsloth.registry.registry import MODEL_REGISTRY-from unsloth.utils.hf_hub import get_model_info+from unsloth.registry.registry import MODEL_REGISTRY, QUANT_TAG_MAP, QuantTypeMODEL_NAMES = ["llama",@@ -81,3 +80,11 @@ def test_all_model_registration():registered_models = MODEL_REGISTRY.keys()missing_models = _test_model_uploaded(registered_models)assert not missing_models, f"Missing following models: {missing_models}"++def test_quant_type():+ # Test that the quant_type is correctly set for model paths+ # NOTE: for models registered under org="unsloth" with QuantType.NONE aliases QuantType.UNSLOTH+ dynamic_quant_models = get_model_info(quant_types=[QuantType.UNSLOTH])+ assert all(m.quant_type == QuantType.UNSLOTH for m in dynamic_quant_models)+ quant_tag = QUANT_TAG_MAP[QuantType.UNSLOTH]+ assert all(quant_tag in m.model_path for m in dynamic_quant_models)\ No newline at end of file