Update tokenizer_utils.py

This commit is contained in:
Daniel Han 2024-09-22 22:48:35 -07:00
commit c1c37c49a6

View file

@ -916,7 +916,7 @@ def fix_untrained_tokens(model, tokenizer, train_dataset, eps = 1e-16):
if bad_not_trainable:
raise ValueError(
'Unsloth: Untrained tokens found, but embed_tokens & lm_head not trainable, causing NaNs. '\
f'Unsloth: Untrained tokens for [{where_untrained_set}] found, but embed_tokens & lm_head not trainable, causing NaNs. '\
'Restart then add `embed_tokens` & `lm_head` to '\
'`FastLanguageModel.get_peft_model(target_modules = [..., "embed_tokens", "lm_head",]). `'\
'Are you using the `base` model? Instead, use the `instruct` version to silence this warning.',