This is a demo implementation for Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devices .
The implementation is based on MLX and includes:
- Exporting Qwen3 model to MLX graphs for fine-tuning with QLoRA.
- On-device Memory-Efficient Backpropagation (MeBP) runtime implementation.
- Example iOS App for running MeBP on Qwen3.
- Run notebook in examples/export_qwen3.ipynb to export Qwen3 model.
- The notebook will generate model assets at output directory specified (default to data/qwen3)
- Connect your iPhone to your MacBook
- Open MLXMeBPExample/MLXMeBPExample.xcodeproj in Xcode
- Build the App on your iPhone
- Open Finder App on your MacBook and find your connected iPhone on the left
- Click Files in Finder which shows a list of Apps installed on your iPhone
- Find MLXMeBPExample App and drag the Qwen3 directory to the Apps' directory
- Open MLXMeBPExample App on your iPhone
- Click Initialize Model
- Click Start Training
|
|
|


