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

feat: support converting messages datasets into multiple pre-training formats #341

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

jaideepr97
Copy link
Member

@jaideepr97 jaideepr97 commented Nov 6, 2024

This PR adds support for converting messages datasets into multiple pre-training formats to support working with both granite 7b and granite 3.0 student models. It accepts a use_legacy_pretraining_format parameter as input to appropriately choose the right format to use

This is intended to be a short term solution, with the long term idea being that SDG would be agnostic of student model requirements such as these

@mergify mergify bot added the ci-failure label Nov 6, 2024
@jaideepr97 jaideepr97 force-pushed the update-pretrain-conv branch from 0fa9879 to 3e20653 Compare November 6, 2024 22:18
@mergify mergify bot removed the ci-failure label Nov 6, 2024
@jaideepr97 jaideepr97 changed the title feat: support generating pre-training samples in multiple formats feat: support converting messages datasets into multiple pre-training formats Nov 6, 2024
@jaideepr97 jaideepr97 force-pushed the update-pretrain-conv branch 2 times, most recently from 7a42c65 to 7e344bc Compare November 7, 2024 17:28
@bbrowning
Copy link
Contributor

@Maxusmusti Can you confirm that we don't need any <|end_of_text|> tokens in the pre-training samples here, like the chat template at https://huggingface.co/ibm-granite/granite-3.0-8b-instruct/blob/main/tokenizer_config.json#L188 uses after the message from each role? If we need to follow that format exactly, we'd also need these <|end_of_text|> tokens after the text from 1 role before starting the new role tokens?

Copy link
Contributor

mergify bot commented Nov 7, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @jaideepr97 please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 7, 2024
@jaideepr97 jaideepr97 force-pushed the update-pretrain-conv branch from 7e344bc to b963c97 Compare November 7, 2024 19:48
@mergify mergify bot removed the needs-rebase label Nov 7, 2024
@Maxusmusti
Copy link
Contributor

@bbrowning yeah you don't need to add the end_of_text token, that gets added by the chat template: https://github.com/instructlab/training/pull/319/files#diff-a8438361fc1435b584fec100fc73bd5bdc7856dc9826a570dd9dc7a6321f9bbcR30

Copy link
Member

@aakankshaduggal aakankshaduggal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jaideepr97! LGTM

@mergify mergify bot added the one-approval label Nov 7, 2024
@mergify mergify bot removed the one-approval label Nov 7, 2024
@mergify mergify bot merged commit 7af918a into instructlab:main Nov 7, 2024
22 checks passed
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.

5 participants