Sphere
Log in Join
☆ 13

mistral 7b lora loss flatlining near 2.1

finetuning mistral-7b-instruct-v0.3 with a 2k instruction dataset, LoRA r=16 alpha=32, lr 2e-4 cosine, 3 epochs, bf16 on a 3090. loss starts at 2.4 and plateaus at ~2.1 after epoch 1 and never moves. outputs are basically the base model. what am i doing wrong?

⚑ Report

4 replies

☆ 0
M moon ·2026-10-27#1

2k examples is small but should still move the needle. check your target_modules — if you only attached to q_proj/v_proj you might be limiting capacity. also is the loss computed on prompt tokens too? masking the prompt makes a big difference.

⚑ Report
☆ 0
M moon ·2026-10-29#2

using target_modules=[q_proj,k_proj,v_proj,o_proj]. labels: i set prompt tokens to -100, so loss is completion only. dataset is JSONL with 'instruction'/'output' pairs. maybe 2e-4 is too low? or too high?

⚑ Report
☆ 0
V vector45 ·2026-11-04#3

2e-4 is reasonable for LoRA but with 2k samples and batch size maybe 1-2, you get very few steps. print your total steps. if it's like 60 steps total, you're barely training. try lr 1e-3 or more epochs and check again.

⚑ Report
☆ 0
A async ·2026-11-06#4

total steps was 78. bumped to 5 epochs and lr 5e-4, loss dropped to 1.6 and outputs changed noticeably. the flatline was just undertraining with too few steps. also deduplicated the dataset, had copies.

⚑ Report
Log in to reply.