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 deepseek v3
jeromekue2ff538fc5a2
diff --git a/unsloth/registry/_deepseek.py b/unsloth/registry/_deepseek.pynew file mode 100644index 00000000000..8bdcd3c2e7e--- /dev/null+++ b/unsloth/registry/_deepseek.py@@ -0,0 +1,53 @@+from unsloth.registry.registry import ModelInfo, ModelMeta, QuantType, _register_models++_IS_DEEPSEEKV3_REGISTERED = False++class DeepseekV3ModelInfo(ModelInfo):+ @classmethod+ def construct_model_name(cls, base_name, version, size, quant_type, instruct_tag):+ key = f"{base_name}-V{version}"+ key = cls.append_instruct_tag(key, instruct_tag)+ key = cls.append_quant_type(key, quant_type)+ return key++# Deepseek V3 Model Meta+DeepseekV3Meta = ModelMeta(+ org="deepseek-ai",+ base_name="DeepSeek",+ instruct_tags=[None],+ model_version="3",+ model_sizes=[""],+ model_info_cls=DeepseekV3ModelInfo,+ is_multimodal=False,+ quant_types=[QuantType.NONE, QuantType.BF16],+)++DeepseekV3_0324Meta = ModelMeta(+ org="deepseek-ai",+ base_name="DeepSeek",+ instruct_tags=[None],+ model_version="3-0324",+ model_sizes=[""],+ model_info_cls=DeepseekV3ModelInfo,+ is_multimodal=False,+ quant_types=[QuantType.NONE, QuantType.GGUF],+)++def register_deepseek_v3_models(include_original_model: bool = False):+ global _IS_DEEPSEEKV3_REGISTERED+ if _IS_DEEPSEEKV3_REGISTERED:+ return+ _register_models(DeepseekV3Meta, include_original_model=include_original_model)+ _register_models(DeepseekV3_0324Meta, include_original_model=include_original_model)+ _IS_DEEPSEEKV3_REGISTERED = True++register_deepseek_v3_models(include_original_model=True)++if __name__ == "__main__":+ from unsloth.registry.registry import MODEL_REGISTRY, _check_model_info+ for model_id, model_info in MODEL_REGISTRY.items():+ model_info = _check_model_info(model_id)+ if model_info is None:+ print(f"\u2718 {model_id}")+ else:+ print(f"\u2713 {model_id}")diff --git a/unsloth/registry/registry.py b/unsloth/registry/registry.pyindex 869a7efb5d2..1eee884259d 100644--- a/unsloth/registry/registry.py+++ b/unsloth/registry/registry.py@@ -8,17 +8,20 @@ class QuantType(Enum):UNSLOTH = "unsloth" # dynamic 4-bit quantizationGGUF = "GGUF"NONE = "none"+ BF16 = "bf16" # only for Deepseek V3# Tags for Hugging Face model pathsBNB_QUANTIZED_TAG = "bnb-4bit"UNSLOTH_DYNAMIC_QUANT_TAG = "unsloth" + "-" + BNB_QUANTIZED_TAGGGUF_TAG = "GGUF"+BF16_TAG = "bf16"QUANT_TAG_MAP = {QuantType.BNB: BNB_QUANTIZED_TAG,QuantType.UNSLOTH: UNSLOTH_DYNAMIC_QUANT_TAG,QuantType.GGUF: GGUF_TAG,QuantType.NONE: None,+ QuantType.BF16: BF16_TAG,}# NOTE: models registered with org="unsloth" and QUANT_TYPE.NONE are aliases of QUANT_TYPE.UNSLOTH