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

💬 Add maybe_convert_to_chatml map for conversational datasets in SFT #2862

Merged
merged 8 commits into from
Feb 17, 2025

Conversation

kashif
Copy link
Collaborator

@kashif kashif commented Feb 14, 2025

What does this PR do?

fixes the issue when the messages have other keys than "role" and "content"

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@kashif kashif changed the title [SFT] add back get_formatting_func_from_dataset [SFT] add maybe_convert_to_chatml map for conversational datasets Feb 17, 2025
@qgallouedec qgallouedec changed the title [SFT] add maybe_convert_to_chatml map for conversational datasets 💬 Add maybe_convert_to_chatml map for conversational datasets and fix SFT support Feb 17, 2025
@qgallouedec qgallouedec changed the title 💬 Add maybe_convert_to_chatml map for conversational datasets and fix SFT support 💬 Add maybe_convert_to_chatml map for conversational datasets in SFT Feb 17, 2025
@qgallouedec qgallouedec merged commit ba03657 into main Feb 17, 2025
14 checks passed
@qgallouedec qgallouedec deleted the issue-2861 branch February 17, 2025 15:47
qgallouedec added a commit that referenced this pull request Feb 17, 2025
#2862)

* add back get_formatting_func_from_dataset

* maybe_convert_to_chatml

* maybe_convert_to_chatml before maybe_apply_chat_template map

* remove comment

* test

* desc

* style

* Update trl/data_utils.py

---------

Co-authored-by: Quentin Gallouédec <[email protected]>
Co-authored-by: Quentin Gallouédec <[email protected]>
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.

3 participants