Skip to content

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.

refactor naming for mistral and phi

jeromeku65ea6356e4b1
diff --git a/unsloth/registry/_deepseek.py b/unsloth/registry/_deepseek.py
index 1f97a02f1cb..854a62c00bc 100644
--- a/unsloth/registry/_deepseek.py
+++ b/unsloth/registry/_deepseek.py
@@ -93,15 +93,6 @@ DeepseekR1DistillQwenMeta = ModelMeta(
"32": [QuantType.GGUF, QuantType.BNB],
},
)
-
- # "Qwen-7B-unsloth-bnb-4bit",
- # "Qwen-1.5B-unsloth-bnb-4bit",
- # "Qwen-32B-GGUF",
-
- # "Qwen-14B-GGUF",
- # "Qwen-32B-bnb-4bit",
- # "Qwen-1.5B-GGUF",
- # "Qwen-14B-unsloth-bnb-4bit",
def register_deepseek_v3_models(include_original_model: bool = False):
global _IS_DEEPSEEK_V3_REGISTERED
diff --git a/unsloth/registry/_mistral.py b/unsloth/registry/_mistral.py
index 65f12567089..c41b1f55b62 100644
--- a/unsloth/registry/_mistral.py
+++ b/unsloth/registry/_mistral.py
@@ -42,21 +42,22 @@ MistralSmall_2501_Base_Meta.model_version = _MISTRAL_SMALL_01_25_VERSION
MistralSmall_2501_Instruct_Meta = copy.deepcopy(MistralSmall_2503_Instruct_Meta)
MistralSmall_2501_Instruct_Meta.model_version = _MISTRAL_SMALL_01_25_VERSION
-def register_mistral_small_models():
+def register_mistral_small_models(include_original_model: bool = False):
global _IS_MISTRAL_SMALL_REGISTERED
if _IS_MISTRAL_SMALL_REGISTERED:
return
- _register_models(MistralSmall_2503_Base_Meta)
- _register_models(MistralSmall_2503_Instruct_Meta)
- _register_models(MistralSmall_2501_Base_Meta)
- _register_models(MistralSmall_2501_Instruct_Meta)
+ _register_models(MistralSmall_2503_Base_Meta, include_original_model=include_original_model)
+ _register_models(MistralSmall_2503_Instruct_Meta, include_original_model=include_original_model)
+ _register_models(MistralSmall_2501_Base_Meta, include_original_model=include_original_model)
+ _register_models(MistralSmall_2501_Instruct_Meta, include_original_model=include_original_model)
_IS_MISTRAL_SMALL_REGISTERED = True
-register_mistral_small_models()
-
+def register_mistral_models(include_original_model: bool = False):
+ register_mistral_small_models(include_original_model=include_original_model)
if __name__ == "__main__":
+ register_mistral_models(include_original_model=True)
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)
diff --git a/unsloth/registry/_phi.py b/unsloth/registry/_phi.py
index c69eaf83bbd..9f23c494d51 100644
--- a/unsloth/registry/_phi.py
+++ b/unsloth/registry/_phi.py
@@ -1,7 +1,7 @@
from unsloth.registry.registry import ModelInfo, ModelMeta, QuantType, _register_models
-_IS_PHI_REGISTERED = False
-_IS_PHI_INSTRUCT_REGISTERED = False
+_IS_PHI_4_REGISTERED = False
+_IS_PHI_4_INSTRUCT_REGISTERED = False
class PhiModelInfo(ModelInfo):
@classmethod
@@ -10,7 +10,7 @@ class PhiModelInfo(ModelInfo):
return super().construct_model_name(base_name, version, size, quant_type, instruct_tag, key)
# Phi Model Meta
-PhiMeta = ModelMeta(
+PhiMeta4 = ModelMeta(
org="microsoft",
base_name="phi",
instruct_tags=[None],
@@ -22,7 +22,7 @@ PhiMeta = ModelMeta(
)
# Phi Instruct Model Meta
-PhiInstructMeta = ModelMeta(
+PhiInstructMeta4 = ModelMeta(
org="microsoft",
base_name="phi",
instruct_tags=["mini-instruct"],
@@ -33,24 +33,26 @@ PhiInstructMeta = ModelMeta(
quant_types=[QuantType.NONE, QuantType.BNB, QuantType.UNSLOTH, QuantType.GGUF],
)
-def register_phi_models(include_original_model: bool = False):
- global _IS_PHI_REGISTERED
- if _IS_PHI_REGISTERED:
+def register_phi_4_models(include_original_model: bool = False):
+ global _IS_PHI_4_REGISTERED
+ if _IS_PHI_4_REGISTERED:
return
- _register_models(PhiMeta, include_original_model=include_original_model)
- _IS_PHI_REGISTERED = True
+ _register_models(PhiMeta4, include_original_model=include_original_model)
+ _IS_PHI_4_REGISTERED = True
-def register_phi_instruct_models(include_original_model: bool = False):
- global _IS_PHI_INSTRUCT_REGISTERED
- if _IS_PHI_INSTRUCT_REGISTERED:
+def register_phi_4_instruct_models(include_original_model: bool = False):
+ global _IS_PHI_4_INSTRUCT_REGISTERED
+ if _IS_PHI_4_INSTRUCT_REGISTERED:
return
- _register_models(PhiInstructMeta, include_original_model=include_original_model)
- _IS_PHI_INSTRUCT_REGISTERED = True
+ _register_models(PhiInstructMeta4, include_original_model=include_original_model)
+ _IS_PHI_4_INSTRUCT_REGISTERED = True
-register_phi_models(include_original_model=True)
-register_phi_instruct_models(include_original_model=True)
+def register_phi_models(include_original_model: bool = False):
+ register_phi_4_models(include_original_model=include_original_model)
+ register_phi_4_instruct_models(include_original_model=include_original_model)
if __name__ == "__main__":
+ register_phi_models(include_original_model=True)
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)