This PR provides a minimal example of how to tokenize data locally before submitting it to the Finetuning API. The script supports loss masking (for padding tokens in this case) by adding the labels field.
Running to get the dataset with just labels and the attention mask:
python examples/tokenize_data.py
Running with loss labels as well (padding tokens will have an index of -100 and will be ignored in the loss):
This PR provides a minimal example of how to tokenize data locally before submitting it to the Finetuning API. The script supports loss masking (for padding tokens in this case) by adding the
labels
field.Running to get the dataset with just labels and the attention mask:
Running with loss labels as well (padding tokens will have an index of -100 and will be ignored in the loss):
I checked that both
together files check
andtogether files upload
work with the outputs, the filetype is reported to be Parquet.TODO: