llm-foundry icon indicating copy to clipboard operation
llm-foundry copied to clipboard

Allow EOS token for finetuning

Open jimwu6 opened this issue 1 year ago • 1 comments

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

jimwu6 avatar May 14 '24 01:05 jimwu6

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

dakinggg avatar May 14 '24 01:05 dakinggg

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.

milocress avatar Jun 03 '24 19:06 milocress

@milocress that should only be for pretraining style. finetuning style handles packing and sequence id on its own. e.g. https://github.com/mosaicml/llm-foundry/blob/fb9a2259e880b0baa3d3523ff42def9ea6c29ce3/llmfoundry/data/packing.py#L155

dakinggg avatar Jun 03 '24 19:06 dakinggg