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

Check EOS token on FastChat models #90

Closed
natolambert opened this issue Mar 26, 2024 · 1 comment · Fixed by #94
Closed

Check EOS token on FastChat models #90

natolambert opened this issue Mar 26, 2024 · 1 comment · Fixed by #94
Labels
bug Something isn't working

Comments

@natolambert
Copy link
Collaborator

TLDR:

Seems like FastChat models are not getting an EOS token. Could effect the non-DPO models that are using FastChat chat templates minorly

@natolambert
Copy link
Collaborator Author

Solution for the relevant models (will need more filtering code)

    ############################
    # Tokenization settings & dataset preparation
    ############################
    # set pad token to eos token if not set
    if reward_pipe.tokenizer.pad_token_id is None:
        reward_pipe.model.config.pad_token_id = reward_pipe.tokenizer.unk_token_id
        reward_pipe.tokenizer.pad_token_id = reward_pipe.tokenizer.unk_token_id
    # make tokenizer add eos
    reward_pipe.tokenizer.add_eos_token = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant