Fast-LLM
Fast-LLM copied to clipboard
Support chat template in `prepare`
🎯 Goal (What & Why)
Support chat template during dataset preparation to make it easier for SFT, DPO and other instruction finetuning methods. This takes away from the user the onus of preparing datasets and being careful about constructing loss masking spans, eos and bos tokens. e.g., OpenRLHF directly works with chat templates.
🚀 Execution Plan
- Work off of https://github.com/ServiceNow/Fast-LLM/pull/255 or https://github.com/ServiceNow/Fast-LLM/pull/257
- Mask text from all sources except for
assistant - Add an option to unroll turns i.e., multiple loss masking spans per conversation if
unroll=False, else 1 prompt-response pair per conversation turn, with the prompt masked.
📌 Acceptance Criteria (Must-Haves for Completion)
- The feature must be functional and tested.
- The implementation must be documented in practical terms.
- No refactors unless directly necessary for feature completion.
🛠️ Project Management
- [x] Assign the project to the Fast-LLM project.
- [ ] Set the
Estimatefield (in days) in the GitHub project. - [ ] Use the
Sizefield to categorize the PR size (Small/Medium/Large). - [x] Assign an owner when opening the issue.