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 5 redundant pass statements that leave bytecode unchanged (#15790)
Daniel Han5acda0f669a5
diff --git a/unsloth/kernels/fast_lora.py b/unsloth/kernels/fast_lora.pyindex 51df67a1485..3d85c747e6c 100644--- a/unsloth/kernels/fast_lora.py+++ b/unsloth/kernels/fast_lora.py@@ -1164,8 +1164,6 @@ def fast_lora_forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor:if W_quant is None and W.ndim == 2 and W.shape[1] == 1:W_quant = _base_quant_state(self.base_layer, W)return _apply(LoRA_W, x, W, W_quant, lora_A, lora_B, scaling)- pass- passresult = self.base_layer(x, *args, **kwargs)# Per Tim Dettmers: for 4bit, defensively clone, since backprop can fail on a manipulated view.diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 54238f11501..172f280972e 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -5298,7 +5298,6 @@ class FastLlamaModel:if name.startswith("unsloth/") and name.endswith("-bnb-4bit"):name = name[: len(name) - len("-bnb-4bit")]model.peft_config[active_adapter].base_model_name_or_path = name- pass# Adding a revision to enable future fast inference paths bugs out; see #492.from transformers.trainer import Trainerdiff --git a/unsloth/models/loader_utils.py b/unsloth/models/loader_utils.pyindex 85626c7563e..5d670bb83d8 100644--- a/unsloth/models/loader_utils.py+++ b/unsloth/models/loader_utils.py@@ -1654,7 +1654,6 @@ def _get_new_mapper():table[ast.literal_eval(target.slice)] = ast.literal_eval(node.value)except ValueError:continue- passelif isinstance(node, ast.Delete):for target in node.targets:if isinstance(target, ast.Name):diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.pyindex 7dce9658fc4..cdc8cc27f05 100644--- a/unsloth/tokenizer_utils.py+++ b/unsloth/tokenizer_utils.py@@ -1071,7 +1071,6 @@ def _load_correct_tokenizer(config,**_repair_kwargs,)- passelse:return _apply_post_load_tokenizer_fixes(fast_tokenizer, fix_tokenizer, config, **_repair_kwargs