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

Will support multi-turn conversations? #2463

Open
dz1iang opened this issue Mar 6, 2025 · 3 comments
Open

Will support multi-turn conversations? #2463

dz1iang opened this issue Mar 6, 2025 · 3 comments
Labels
enhancement New feature or request triage review This issue should be discussed in weekly review

Comments

@dz1iang
Copy link

dz1iang commented Mar 6, 2025

Multi-turn conversations are quite common scenarios in the process of fine-tuning.

@RdoubleA
Copy link
Collaborator

RdoubleA commented Mar 6, 2025

Yes, these are supported. In your message transform, you can create a list of messages with multiple user and assistant turns. Or you can use the chat dataset builder. See https://pytorch.org/torchtune/stable/basics/chat_datasets.html#chat-datasets for examples.

@dz1iang
Copy link
Author

dz1iang commented Mar 6, 2025

Yes, these are supported. In your message transform, you can create a list of messages with multiple user and assistant turns. Or you can use the chat dataset builder. See pytorch.org/torchtune/stable/basics/chat_datasets.html#chat-datasets for examples.

There should still be some processing involved in calculating the loss and conducting evaluations.

@RdoubleA
Copy link
Collaborator

RdoubleA commented Mar 6, 2025

If you are using a custom message transform, you can control the masked attribute for each Message which will control which ones participate in loss computation. There is a PR to make this easily configurable if you use the chat dataset builders: #2284

Could you describe what you mean by evaluations for multi turn conversations? These can vary quite widely - if there's a particular eval in the Eleuther eval harness around multiturn conversations then that's supported through our integrations. Other multiturn evals usually revolve around tool use. Since evals are very user and data dependent, this is usually done in a custom script.

@felipemello1 felipemello1 added enhancement New feature or request triage review This issue should be discussed in weekly review labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage review This issue should be discussed in weekly review
Projects
None yet
Development

No branches or pull requests

3 participants