-
Notifications
You must be signed in to change notification settings - Fork 530
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
chore: [#1002] update chat tutorial so that it works as is #1004
chore: [#1002] update chat tutorial so that it works as is #1004
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1004
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 964315a with merge base d896253 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @christobill! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Appreciate this update! Did we figure out whether the issue was using version 0.1.1 or setting the split parameter? In your case and in the tutorial of using a local dataset, I don't believe you need to set |
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.
This makes sense to me! Leaving findal merge approval to @RdoubleA though.
Thanks @joecummings ! @RdoubleA To be sure I restarted the whole process on a new machine: Setup
|
e25ce58
to
9d848ab
Compare
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.
Apologies for the delay on this. I was able to repro your setup and get it training. I left some comments
docs/source/tutorials/chat.rst
Outdated
@@ -19,6 +19,7 @@ custom chat dataset for fine-tuning Llama3. | |||
* Be familiar with :ref:`configuring datasets<dataset_tutorial_label>` | |||
* Know how to :ref:`download Llama3 weights <llama3_label>` | |||
|
|||
Note: this tutorial works with a version of torchtune > 0.1.1 |
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.
nit:
Note: this tutorial works with a version of torchtune > 0.1.1 | |
Note: this tutorial requires torchtune >= 0.1.1 |
@@ -252,7 +253,7 @@ the Message dataclass. | |||
|
|||
.. code-block:: python | |||
|
|||
def message_converter(sample: Mapping[str, Any]) -> List[Message]: | |||
def message_converter(sample: Mapping[str, Any], train_on_input: bool) -> List[Message]: |
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 should incorporate the parameter in the logic below:
user_message = Message(
role="user",
content=input_msg,
masked=not train_on_input, # Mask if not training on prompt
)
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.
Done ✔️
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.
discussed offline on discord, I was doing your repro incorrectly. I didn't realize I wasn't using your config when I launched the run because I just copied it from the comments on the top of the file... anyhow, sorry about that. your changes make sense. I'll approve this, but if you could add those details we discussed that would be much appreciated :)
@@ -294,6 +295,7 @@ object. | |||
# For local csv files, we specify "csv" as the source, just like in | |||
# load_dataset | |||
source="csv", | |||
split="train", |
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.
also would be good to add a comment above this line saying specifying the default split of "train" is required for local files
also if you don't mind split="train"
to the examples here as well:
torchtune/docs/source/tutorials/datasets.rst
Line 417 in dc74267
Local and remote datasets |
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.
Done ✔️
cb01a85
to
9134cf0
Compare
9134cf0
to
964315a
Compare
Context
This PR:
This PR addresses:
#1002
Changelog
Changes made in this PR:
Update chat tutorial so that it works as is, here is the link to this documentation
https://pytorch.org/torchtune/main/tutorials/chat.html