-
Notifications
You must be signed in to change notification settings - Fork 12
Instruction tuning 2025 #379
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
Conversation
…y stopping of generation
…y. Unit test still needed.
…data. Change symbol for special tokens, which are actaully a single token within the vocab.
Co-authored-by: Alexander Weber <alex.a.weber@gmx.de>
SFT sample generator
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.
first round of comments
config_files/instruction_tuning/qwen2/apply_chat_template_config.yaml
Outdated
Show resolved
Hide resolved
tutorials/instruction_tuning/configs/train_instruct_model_fsdp1_config.yaml
Outdated
Show resolved
Hide resolved
tutorials/instruction_tuning/configs/train_instruct_model_fsdp1_config.yaml
Outdated
Show resolved
Hide resolved
tutorials/instruction_tuning/configs/train_instruct_model_fsdp1_config.yaml
Outdated
Show resolved
Hide resolved
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.
Fabolous work! I especially like the clean implementation and smooth integration.
Apart from some minor comments I was wondering, if we should do dataset splitting in an extra step. This way the interfaces and configs would become simpler. You only apply the chat template to a single file. If you want more, then you just split the JSONL file a priori and call the endpoint multiple times.
What do you think?
tests/instruction_tuning/files/config_lorem_ipsum_instruct_fsdp1.yaml
Outdated
Show resolved
Hide resolved
Thanks Max! |
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.
💯 LGTM :)
What does this PR do?
This PR ..
This PR adds support for instruction tuning, by
data apply_chat_template --config_file_path config_files/training/config_lorem_ipsum_sft.yaml
which takes a instruction-dataset and converts the structured conversations into a single prompt by applying the chat template given as jinja2 template string within the config. Here, we also include indicator tokens to mark what the system utterances are.General Changes
data apply_chat_template --config_file_path config_files/training/config_lorem_ipsum_sft.yaml
to convert structured JSONL into JSONL with a the new attribute "chat", i.e. the prompt were the chat template was appliedBreaking Changes
PackedMemMapDatasetContinuous.reuse_last_target is True
Checklist before submitting final PR
python tests/tests.py
). They do not. (warmstart tutorial on main fails; all other tests run trough.)CHANGELOG_DEV.md
)