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
remap literal quant types to QuantType Enum
jeromeku6abdb1fef68b
diff --git a/unsloth/registry/registry.py b/unsloth/registry/registry.pyindex 2ea0618127e..bac0a2697eb 100644--- a/unsloth/registry/registry.py+++ b/unsloth/registry/registry.py@@ -31,7 +31,7 @@ class ModelInfo:name: str = None # full model name, constructed from base_name, version, and size unless providedis_multimodal: bool = Falseinstruct_tag: str = None- quant_type: Literal["bnb", "unsloth"] = None+ quant_type: QuantType = Nonedef __post_init__(self):self.name = self.name or self.construct_model_name(@@ -50,7 +50,7 @@ class ModelInfo:@staticmethoddef append_quant_type(- key: str, quant_type: Literal["bnb", "unsloth", "GGUF"] = None+ key: str, quant_type: QuantType = None):if quant_type:if quant_type == "bnb":@@ -80,7 +80,7 @@ class ModelMeta:model_info_cls: type[ModelInfo]model_sizes: list[str] = field(default_factory=list)instruct_tags: list[str] = field(default_factory=list)- quant_types: list[Literal[None, "bnb", "unsloth"]] = field(default_factory=list)+ quant_types: list[QuantType] = field(default_factory=list)is_multimodal: bool = False@@ -94,7 +94,7 @@ def register_model(version: str,size: int,instruct_tag: str = None,- quant_type: Literal["bnb", "unsloth"] = None,+ quant_type: QuantType = None,is_multimodal: bool = False,name: str = None,):