Skip to content

Commit 8d9bd0e

Browse files
committedJun 6, 2024·
Update llama.py
1 parent 8b1ebc4 commit 8d9bd0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎unsloth/models/llama.py

+5
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,11 @@ def patch_peft_model(
18301830

18311831
@staticmethod
18321832
def for_inference(model):
1833+
if model.config.model_type == "qwen2":
1834+
FastLlamaModel.for_training(model)
1835+
return
1836+
pass
1837+
18331838
internal_model = model
18341839
internal_model.gradient_checkpointing = False
18351840
internal_model.training = False

0 commit comments

Comments
 (0)
Please sign in to comment.