# Failing to achieve 2 folds improvement of the peft lora example in week2 lab

**URL:** <https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819>\
**Category:** Generative AI with Large Language Models\
**Tags:** lab-help\
**Created:** [April 25, 2025, 1:45pm UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819 "2025-04-25T13:45:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spartanlq](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@spartanlq](https://community.deeplearning.ai/u/spartanlq)\
**Post date:** [April 25, 2025, 1:45pm UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819/1 "2025-04-25T13:45:10Z")

</div>

Hello,  
I am trying to repeat the lab 2 fine-tuning exercise using peft approach on my own Mac mini. I am using flan-T5-small so that the model can fit in the 16G memory. I increased max\_step to 10000 and I increased no of epochs to 5. The training finished after 24 hours. However, I only observed 0% - 3% improvement of the rouge scores by the peft model against the original model. Could anybody tell me what I can do to obtain the similar level of improvement as demonstrated in the Lab 2 vedio ?

Here are my peft configurations and training configurations:

lora\_config = LoraConfig(r=32, lora\_alpha=32, target\_modules=[‘q’, ‘v’, ‘k’, ‘o’],  
lora\_dropout=0.05, bias=‘lora\_only’,task\_type=TaskType.SEQ\_2\_SEQ\_LM)

peft\_training\_args=TrainingArguments(  
output\_dir=output\_dir,  
learning\_rate=1e-4, # Better LR for small model  
num\_train\_epochs=5, # Proper epoch-based training  
max\_steps=10000,  
logging\_steps=100,  
report\_to=“tensorboard”,  
)

Thanks a lot!  
Quan

When creating a post, please add:

- Week # must be added in the tags option of the post.
- Link to the classroom item you are referring to:
- Description (include relevant info but please do not post solution code or your entire notebook):

---

<div class="post-metadata">

**Author:** ![Igor\_Pereverzev](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/igor_pereverzev/32/132198_2.png) [@Igor\_Pereverzev](https://community.deeplearning.ai/u/Igor_Pereverzev)\
**Post date:** [April 27, 2025, 7:06am UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819/2 "2025-04-27T07:06:24Z")

</div>

Hello,

Could you please tell me exactly what improvements you are aiming for and why you need them? 3% improvement is normal not perfect, but still decent. If you are looking for significant improvements on your personal Mac, then you would need different models and a larger number of parameters.

---

<div class="post-metadata">

**Author:** ![spartanlq](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@spartanlq](https://community.deeplearning.ai/u/spartanlq)\
**Post date:** [April 27, 2025, 2:34pm UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819/3 "2025-04-27T14:34:08Z")

</div>

Thanks Igor for the reply! For learning purpose, I am trying to repeat the 2 folds improvements demonstrated in the lab 2 Vedio. Can you please tell me what I should do ? (use larger model? use more training dataset ? )

---

<div class="post-metadata">

**Author:** ![Igor\_Pereverzev](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/igor_pereverzev/32/132198_2.png) [@Igor\_Pereverzev](https://community.deeplearning.ai/u/Igor_Pereverzev)\
**Post date:** [April 29, 2025, 6:25am UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819/4 "2025-04-29T06:25:31Z")

</div>

sure it’s rule:

Underfitting → make the model more complex.  
Overfitting → increase the dataset size.

---

<div class="post-metadata">

**Author:** ![Girijesh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/girijesh/32/37283_2.png) [@Girijesh](https://community.deeplearning.ai/u/Girijesh)\
**Post date:** [April 29, 2025, 6:53am UTC](https://community.deeplearning.ai/t/failing-to-achieve-2-folds-improvement-of-the-peft-lora-example-in-week2-lab/805819/5 "2025-04-29T06:53:48Z")

</div>

Dear @spartanlq,

Try this following quick fixes.

1. Remove `max_steps` if you’re setting `num_train_epochs`.
2. Double-check `target_modules` using `model.named_modules()`.
3. Lower the learning rate to `3e-5`( reducing it to **5e-5 or 3e-5** and observe the difference).
4. Validate your dataset is appropriate and large enough.
5. Add checkpoints or eval steps to monitor real-time improvement.
6. Evaluate using multiple metrics and/or manual inspection.

Let me know if you have any questions.
