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

Allow EOS token for finetuning #1199

Closed
wants to merge 3 commits into from
Closed

Conversation

jimwu6
Copy link

@jimwu6 jimwu6 commented May 14, 2024

This is needed to allow the finetuning dataset to be constructed correctly.

@jimwu6 jimwu6 requested review from milocress and dakinggg May 14, 2024 01:10
@dakinggg
Copy link
Collaborator

Where do you see this needed? I'm pretty sure finetuning just uses the eos from the tokenizer.

@milocress
Copy link
Contributor

Where do you see this needed? I'm pretty sure finetuning just uses the eos from the tokenizer.

It looks like it's one of the things **ed into the superclass, I think there are some cases where omitting this causes an error. eg.

[rank2]: ValueError: sequence_id is a required argument when MPT is configured with attn_uses_sequence_id=True and the model is in train mode.

@dakinggg
Copy link
Collaborator

dakinggg commented Jun 3, 2024

@milocress that should only be for pretraining style. finetuning style handles packing and sequence id on its own. e.g.

trim_example['sequence_id'] = torch.zeros_like(trim_example['input_ids'])

@milocress milocress requested a review from a team as a code owner June 4, 2024 14:02
@dakinggg dakinggg closed this Jun 6, 2024
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.

None yet

3 participants