-
Notifications
You must be signed in to change notification settings - Fork 411
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
Remove ChatFormat, InstructTemplate, old message converters #1895
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1895
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2a69d76 with merge base dc0591c (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -0,0 +1,52 @@ | |||
.. _packing_usage_label: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you snuck this in here you sneaky lil man
i love it
chat_format = _get_component_from_path(chat_format) | ||
messages = chat_format.format(messages) | ||
return self._tokenizer.tokenize_messages(messages)[0] | ||
messages = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noobq: Is this identical to free-form generation when a prompt template isn't provided?
Context
What is the purpose of this PR? Is it to
Closes #1839. Closes #1849.
Changelog
What are the changes made in this PR?
torchtune/data/_converters.py
. These are replaced by the transforms in_messages.py
Test plan
Please make sure to do each of the following if applicable to your PR. If you're unsure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.
pre-commit install
)pytest tests
pytest tests -m integration_test
UX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Here is a docstring example
and a tutorial example