Skip to content

[Bug] "Unsloth: Your model needs to call .get_peft_model first!" in gemma-3 Colab Notebook Example #3338

@Coder3333

Description

@Coder3333

This notebook is referenced in the unsloth docs, but I keep getting stuck at one step with an exception. I swear I have run all of the previous steps in order properly. Please, help me get through this. Thank you.

Error:
"Unsloth: Your model needs to call .get_peft_model first!"

Step: <- Have to change the False to True on this step
if True:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "gemma-3", # YOUR MODEL YOU USED FOR TRAINING
max_seq_length = 2048,
load_in_4bit = False,
)

Notebook:
https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma3_(270M).ipynb

Document reference:
https://docs.unsloth.ai/models/gemma-3-how-to-run-and-fine-tune

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions