Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sft learn to generate eos token #494

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

digitalSquirrel1
Copy link

Avoid 'eos_token' from being labeled as -100 and stopping contribute to loss.
one-line changing in sft.py.
correlated issue: #492

sft learn to generate eos token
@digitalSquirrel1
Copy link
Author

transformers.data.data_collator.DataCollatorForLanguageModeling:

image

@qgallouedec
Copy link
Member

Thanks!

@javirandor
Copy link

javirandor commented Mar 11, 2025

@digitalSquirrel1 This works only when starting SFT from Qwen/Qwen2.5-Math-7B-Instruct. Other models have the same EOS and PAD token e.g. Qwen/Qwen2.5-Math-7B (see here) so this will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants