Skip to content

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

@hchc007

Description

@hchc007

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)" )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions