You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am testing out unsloth to fine tune llama 3.1 8B instruct and following your notebook here.
One exception is that I have added an eval set. What is really strange is that the eval loss locks up to a specific value after around 300 steps. I mean down to the last decimal, not just flattening out. The training loss looks fine and as expected.
I have changed many parameters and tried different things but it always happens. Any idea on what can cause this?
Hi! The eval dataset is shuffled and it happens regardless of what I do. It seems to happen in the first eval after the first epoch, regardless of the underlying data.
Hi!
I was looking through the code, trying to find a solution to this problem, but it seems that replicating the error is not quite feasible.
Would be able to tell, where exactly should I look for?
This doesn't reproduce any more! A LoRA finetune evaluating every 5 steps gives six different eval_loss values, so it isn't locking to a constant. If you see the same number repeated to the last decimal it usually means the eval set is being re-tokenized into a constant batch, or the adapter is disabled in that mode, so please reopen with your script if it comes back!
Please update Unsloth: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens!
Activity
danielhanchen commentedon Oct 1, 2024
Sorry on the delay - that is very strange - it could be sheer coincidence, or maybe the eval dataset isn't shuffled?
magjense commentedon Oct 1, 2024
Hi! The eval dataset is shuffled and it happens regardless of what I do. It seems to happen in the first eval after the first epoch, regardless of the underlying data.
danielhanchen commentedon Oct 2, 2024
Ok will investigate - it might be a bug!!
[-]Fine tuning llama 3.1 8B instruct - eval loss constant after a while[/-][+]Evaluation loss becomes constant[/+]Itssshikhar commentedon Jan 11, 2025
Hi!
I was looking through the code, trying to find a solution to this problem, but it seems that replicating the error is not quite feasible.
Would be able to tell, where exactly should I look for?
danielhanchen commentedon Jan 14, 2025
@Itssshikhar It's most likely not a bug - eval losses can be constant in some weird scenarios, but very unlikely
saadkhi commentedon Sep 1, 2025
Hey, I want to work on this issue. Can anybody give me quick walkthrough on which files I have to look upon?
Regards,
Saad Ali
Itssshikhar commentedon Sep 2, 2025
Hi @saadkhi. This one might be a dud. Better go for other open issues atm.
Stop the DDP transform test from pinning the zoo's internals
Read the logit transforms from one place instead of four (#8997)
Keep the real quantization skip list on save, and add an opt-in multi…
Se7enCodes commentedon Sep 12, 2026
Hi! I'd like to work on this issue. Could you confirm it still exists?
danielhanchen commentedon Sep 15, 2026
This doesn't reproduce any more! A LoRA finetune evaluating every 5 steps gives six different eval_loss values, so it isn't locking to a constant. If you see the same number repeated to the last decimal it usually means the eval set is being re-tokenized into a constant batch, or the adapter is disabled in that mode, so please reopen with your script if it comes back!
Please update Unsloth:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Reopen if it still happens!Se7enCodes commentedon Sep 15, 2026
Ok thanks!