mlx-examples icon indicating copy to clipboard operation
mlx-examples copied to clipboard

Support prompt-completion data for LoRA fine-tuning

Open SahilKumar75 opened this issue 6 months ago • 0 comments

Summary

  • support prompt-completion JSONL records in the LoRA data loader
  • mask prompt tokens so loss is computed on completion tokens only
  • document the instruction tuning data format

Testing

  • python3 -m pytest lora/test_lora.py -q
  • python3 -m black --check lora/lora.py lora/test_lora.py
  • python3 -m pre_commit run --files lora/lora.py lora/test_lora.py lora/README.md

Closes #484

SahilKumar75 avatar May 13 '26 18:05 SahilKumar75