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 trying to fine tune gemma 7b model in 4 bit with additional vocab and using following configuration, but getting NaN in train and eval loss. Though train loss first decreases for couple of steps and then turn to NaN
The text was updated successfully, but these errors were encountered:
sidtandon2014
changed the title
eval_loss showing Nan but train_loss is decreasing while fine tuning gemma model with additional vocab
eval_loss showing Nan but train_loss decreases and goes to NaN after couple of steps while fine tuning gemma model with additional vocab
May 7, 2024
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
System Info
I am trying to fine tune gemma 7b model in 4 bit with additional vocab and using following configuration, but getting NaN in train and eval loss. Though train loss first decreases for couple of steps and then turn to NaN
In order to update the vocab I have extended sentencepiece model instead of add_tokens method (FYI: add_tokens is degrading tokens quality)
huggingface/tokenizers#627 (comment)
https://github.com/google/sentencepiece/blob/master/python/add_new_vocab.ipynb
Along with this while training, I am setting embedding values to 0 for all new tokens
Additional properties:
Who can help?
@BenjaminBossan
Information
Tasks
examples
folderReproduction
Task: Translate Sanskrit to English
Dataset:"rahular/itihasa"
Loss Snapshot: [A{'eval_loss': nan, 'eval_runtime': 708.8687, 'eval_samples_per_second': 13.125, 'eval_steps_per_second': 1.641, 'epoch': 0.15}
Expected behavior
Validation loss should not be NaN
The text was updated successfully, but these errors were encountered: