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 QwenQVQ to registry
jeromeku2222e5ad5897
diff --git a/unsloth/registry/_qwen.py b/unsloth/registry/_qwen.pyindex a00d2d57298..0b902e31304 100644--- a/unsloth/registry/_qwen.py+++ b/unsloth/registry/_qwen.py@@ -34,7 +34,17 @@ class QwenQwQModelInfo(ModelInfo):key = cls.append_quant_type(key, quant_type)return key-# Qwen Model Meta+class QwenQVQPreviewModelInfo(ModelInfo):+ @classmethod+ def construct_model_name(+ cls, base_name, version, size, quant_type, instruct_tag+ ):+ key = f"{base_name}-{size}B-Preview"+ key = cls.append_instruct_tag(key, instruct_tag)+ key = cls.append_quant_type(key, quant_type)+ return key++# Qwen2.5 Model MetaQwenMeta = ModelMeta(org="Qwen",base_name="Qwen",@@ -46,7 +56,7 @@ QwenMeta = ModelMeta(quant_types=[QuantType.NONE, QuantType.BNB, QuantType.UNSLOTH],)-# Qwen VL Model Meta+# Qwen2.5 VL Model MetaQwenVLMeta = ModelMeta(org="Qwen",base_name="Qwen",@@ -70,25 +80,38 @@ QwenQwQMeta = ModelMeta(quant_types=[QuantType.NONE, QuantType.BNB, QuantType.UNSLOTH, QuantType.GGUF],)+# Qwen QVQ Preview Model Meta+QwenQVQPreviewMeta = ModelMeta(+ org="Qwen",+ base_name="QVQ",+ instruct_tags=[None],+ model_version="",+ model_sizes=["72"],+ model_info_cls=QwenQVQPreviewModelInfo,+ is_multimodal=True,+ quant_types=[QuantType.NONE, QuantType.BNB],+)+def register_qwen_models(include_original_model: bool = False):global _IS_QWEN_REGISTEREDif _IS_QWEN_REGISTERED:return- _register_models(QwenMeta, include_original_model)+ _register_models(QwenMeta, include_original_model=include_original_model)_IS_QWEN_REGISTERED = Truedef register_qwen_vl_models(include_original_model: bool = False):global _IS_QWEN_VL_REGISTEREDif _IS_QWEN_VL_REGISTERED:return- _register_models(QwenVLMeta, include_original_model)+ _register_models(QwenVLMeta, include_original_model=include_original_model)_IS_QWEN_VL_REGISTERED = Truedef register_qwen_qwq_models(include_original_model: bool = False):global _IS_QWEN_QWQ_REGISTEREDif _IS_QWEN_QWQ_REGISTERED:return- _register_models(QwenQwQMeta, include_original_model)+ _register_models(QwenQwQMeta, include_original_model=include_original_model)+ _register_models(QwenQVQPreviewMeta, include_original_model=include_original_model)_IS_QWEN_QWQ_REGISTERED = True# register_qwen_models()diff --git a/unsloth/registry/registry.py b/unsloth/registry/registry.pyindex e7a2be08768..869a7efb5d2 100644--- a/unsloth/registry/registry.py+++ b/unsloth/registry/registry.py@@ -5,10 +5,11 @@ from enum import Enumclass QuantType(Enum):BNB = "bnb"- UNSLOTH = "unsloth"+ UNSLOTH = "unsloth" # dynamic 4-bit quantizationGGUF = "GGUF"NONE = "none"+# Tags for Hugging Face model pathsBNB_QUANTIZED_TAG = "bnb-4bit"UNSLOTH_DYNAMIC_QUANT_TAG = "unsloth" + "-" + BNB_QUANTIZED_TAGGGUF_TAG = "GGUF"@@ -18,9 +19,9 @@ QUANT_TAG_MAP = {QuantType.UNSLOTH: UNSLOTH_DYNAMIC_QUANT_TAG,QuantType.GGUF: GGUF_TAG,QuantType.NONE: None,-}-+}+# NOTE: models registered with org="unsloth" and QUANT_TYPE.NONE are aliases of QUANT_TYPE.UNSLOTH@dataclassclass ModelInfo:org: str@@ -152,6 +153,7 @@ def _register_models(model_meta: ModelMeta, include_original_model: bool = Falseelse:_quant_types = quant_typesfor quant_type in _quant_types:+ # NOTE: models registered with org="unsloth" and QUANT_TYPE.NONE are aliases of QUANT_TYPE.UNSLOTH_org = "unsloth" # unsloth models -- these are all quantized versions of the original modelregister_model(model_info_cls=model_info_cls,