ml-explore / ml-explore/mlx-examples
[Feature Request] Custom "chat" HF datasets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
The LoRa tuners's local datasets support the following data format:
{"messages": [{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello."},
{"role": "assistant", "content": "How can I assistant you today."}]}
Some HF datasets, such as the UltraFeedback dataset, used for Direct Preference Optimization (see: HF DPO trainer and #513) use a (json) data format such as the following:
[ { "content": "...", "role": "user" }, { "content": "...", "role": "assistant" } ]
To incorporate the use of such HF datasets, it would be helpful to to generalize the use of prompt_feature, text_feature, and completion_feature to include chat_feature, which indicates the HF dataset feature to use for the chat template structure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the local dataset format described in LORA.md and trace how prompt_feature, text_feature, and completion_feature are handled for Hugging Face datasets. Define the chat_feature input for role/content message arrays and verify that a supported chat dataset can be used with the LoRA tuner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100