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

targets were set to all -100 in stage2_sft stage due to cur_len != expected_len #39

Open
hchc007 opened this issue Aug 19, 2024 · 0 comments

Comments

@hchc007
Copy link

hchc007 commented Aug 19, 2024

Hi,

In stage2_sft.py (line 292), the targets are all set to -100 because cur_len isn't updated to match expected_len. This seems like a bug. Could you please help to verify this? Thanks!

if cur_len < tokenizer.model_max_length: if cur_len != expected_len: for k in range(total_len): target[k] = IGNORE_TOKEN_ID rank0_print( f"WARNING: tokenization mismatch: {cur_len} vs. {total_len}." f" #turn = {len(turns) - 1}. (ignored)" )

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

No branches or pull requests

1 participant