Hello,
First of all, sorry if this question is dumb, but I am very new to this finetuning world.
I am currently finetuning a model for log analysis, and I am using the new gemma3 1B parameters model.
The thing I was doing was my training using the higgingface's LoraConfig class like this:
peft_config = LoraConfig(
r=config["lora_rank"],
lora_alpha=64,
target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
task_type="CAUSAL_LM",
inference_mode=False,
)
# Apply PEFT
model = get_peft_model(model, peft_config)```
Then I discover that unsloth had something similar, and I changed to this :
```py
model = FastLanguageModel.get_peft_model(
model,
r=config["lora_rank"],
lora_alpha=64,
target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
task_type="CAUSAL_LM", # Include task_type for clarity
inference_mode=False,
)
# Apply PEFT
model.print_trainable_parameters()```
The problem is that after I changed to this I got terrible results with my new trained model.
I am sure I only changed this, and the rest is exactly the same.
Do I need to do something else, or change anything?
PS: I am loading the model in a separate script like this.
```py
from transformers import AutoTokenizer
from unsloth import FastLanguageModel
from peft import PeftModel, PeftConfig
tokenizer = AutoTokenizer.from_pretrained(config["tokenizer_dir"])
model, _ = FastLanguageModel.from_pretrained(
config["model_dir"],
max_seq_length=config["max_seq_length"],
load_in_4bit=True, # Must match training quantization
)
model.resize_token_embeddings(len(tokenizer))
model = PeftModel.from_pretrained(model, config["model_dir"])
model.resize_token_embeddings(len(tokenizer)) ```
Maybe I need to load it in a different way when I train with the unsloth method?
Thank you for you help.