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
Cleanup: remove six private helpers and constants in core that nothing calls (#15695)
Daniel Hana81803f1e421
diff --git a/unsloth/models/reap.py b/unsloth/models/reap.pyindex ae33e930fae..a3a9abc7fc5 100644--- a/unsloth/models/reap.py+++ b/unsloth/models/reap.py@@ -1114,13 +1114,3 @@ def raise_if_unsaved_reap(model):'expert. Call `reap_prune(..., save_directory = "pruned_model")` (or save the pruned '"model and load it again) before `get_peft_model`.")---def _is_token_rows(dataset):- if isinstance(dataset, (list, tuple)) and dataset:- first = dataset[0]- return isinstance(first, (list, tuple)) or (- isinstance(first, dict) and "input_ids" in first- )- column_names = getattr(dataset, "column_names", None)- return bool(column_names) and "input_ids" in column_namesdiff --git a/unsloth/registry/_deepseek.py b/unsloth/registry/_deepseek.pyindex ff3fc9607b9..b6410be7123 100644--- a/unsloth/registry/_deepseek.py+++ b/unsloth/registry/_deepseek.py@@ -153,22 +153,6 @@ def register_deepseek_models(include_original_model: bool = False):register_deepseek_r1_distill_qwen_models(include_original_model = include_original_model)-def _list_deepseek_r1_distill_models():- from unsloth.utils.hf_hub import ModelInfo as HfModelInfo- from unsloth.utils.hf_hub import list_models-- models: list[HfModelInfo] = list_models(author = "unsloth", search = "Distill", limit = 1000)- distill_models = []- for model in models:- model_id = model.id- model_name = model_id.split("/")[-1]- # Parse out only the version.- version = model_name.removeprefix("DeepSeek-R1-Distill-")- distill_models.append(version)-- return distill_models--if __name__ == "__main__":from unsloth.registry.registry import MODEL_REGISTRY, _check_model_infodiff --git a/unsloth/registry/_mistral.py b/unsloth/registry/_mistral.pyindex eec098d2a4d..87eb5890291 100644--- a/unsloth/registry/_mistral.py+++ b/unsloth/registry/_mistral.py@@ -6,7 +6,6 @@ _IS_MISTRAL_SMALL_REGISTERED = False_MISTRAL_SMALL_03_25_VERSION = "2503"_MISTRAL_SMALL_01_25_VERSION = "2501"-_MISTRAL_SMALL_09_24_VERSION = "2409" # Not uploaded to unslothclass MistralSmallModelInfo(ModelInfo):diff --git a/unsloth/utils/packing.py b/unsloth/utils/packing.pyindex 4e6e7c88c87..9db793ab0b7 100644--- a/unsloth/utils/packing.py+++ b/unsloth/utils/packing.py@@ -511,20 +511,6 @@ def _iter_stateful_mixers(model):return found-def _iter_gated_delta_modules(model):- return [- m for m, kind in _iter_stateful_mixers(model) if kind in ("gated_delta", "gated_delta_qkv")- ]---def _iter_mamba2_modules(model):- return [m for m, kind in _iter_stateful_mixers(model) if kind == "ssd"]---def _iter_short_conv_modules(model):- return [m for m, kind in _iter_stateful_mixers(model) if kind == "short_conv"]--def _callable_accepts_named_seq_idx(fn) -> Optional[str]:# A **kwargs-only hub stub does not count: it may drop seq_idx.try: