Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 11, 2025
commit bdd7cd87d9010a486b6796fec9b93c291bd9dd1b
4 changes: 3 additions & 1 deletion unsloth/models/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -3212,7 +3212,9 @@ def patch_peft_model(
# https://stackoverflow.com/questions/50599045/python-replacing-a-function-within-a-class-of-a-module
if hasattr(mlp_module, "_unsloth_forward"):
# then we've patched the mlp to use TiledMLP
mlp_module._unsloth_forward = types.MethodType(_apply_lora_mlp, mlp_module)
mlp_module._unsloth_forward = types.MethodType(
_apply_lora_mlp, mlp_module
)
else:
mlp_module.forward = types.MethodType(
_apply_lora_mlp, mlp_module
Expand Down