Research & Papers

[P] mlx-tune – Fine-tune LLMs on Apple Silicon with MLX (SFT, DPO, GRPO, VLM)

A new Python library enables full fine-tuning workflows on Macs with 8GB+ RAM, mirroring popular CUDA frameworks.

Deep Dive

Developer A-Rahim has launched mlx-tune, a significant new open-source library that brings sophisticated large language model fine-tuning capabilities natively to Apple Silicon Macs. Built on top of Apple's MLX framework (mlx-lm and mlx-vlm), the tool allows developers to run full training workflows—including Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and newer methods like GRPO and KTO—directly on a Mac with 8GB or more of unified memory. Its API is designed to mirror popular CUDA-based frameworks like Unsloth and TRL, meaning a training script written for NVIDIA GPUs can run on a Mac by changing just a single import line. This dramatically lowers the barrier for local prototyping and experimentation.

The library is specifically positioned as a tool for local development and prototyping before scaling workloads to expensive cloud GPU instances. It supports parameter-efficient techniques like LoRA and QLoRA, includes chat templates for 15 major model families, and can export trained models to the GGUF format for use with tools like llama.cpp. While not intended to replace high-performance CUDA training for large-scale jobs, mlx-tune fills a crucial gap by enabling data scientists and ML engineers to iterate quickly on their fine-tuning recipes using the hardware they already own, potentially saving significant cloud costs during the development phase.

Key Points
  • Enables full LLM fine-tuning (SFT, DPO, GRPO) natively on Apple Silicon Macs using 8GB+ unified RAM.
  • API mirrors Unsloth/TRL, allowing the same script to run on Mac (MLX) or NVIDIA (CUDA) by changing one import.
  • Supports vision-language models, LoRA/QLoRA, 15 model families' chat templates, and GGUF export for local prototyping.

Why It Matters

Lowers the cost and friction of AI prototyping by enabling powerful fine-tuning workflows on consumer Apple hardware.