ARahim3/mlx-tune

Fine-tune LLMs on your Mac with Apple Silicon. SFT, DPO, GRPO, Vision, TTS, STT, Embedding, and OCR fine-tuning — natively on MLX. Unsloth-compatible API.

What it solves

mlx-tune 為 Mac 使用者提供在 Apple Silicon 本機微調各種 AI 模型的方式。它特別解決了「情境切換」的問題:開發者想在 Mac 上本機原型與迭代訓練腳本,然後再使用 Unsloth 套件將程式碼直接搬到雲端 GPU,而不必重新編寫程式碼。

How it works

它將 Apple 原生的 MLX 框架包裝成與 Unsloth 相容的 API。使用者可以在 Mac 上使用熟悉的類別(如 FastLanguageModelSFTTrainer)撰寫訓練程式,之後再將相同腳本搬到基於 CUDA 的環境進行正式訓練。支援包括文字、視覺、音訊與 OCR 在內的多種模態,並利用 Mac 的統一記憶體進行高效本機訓練。

Who it’s for

使用 Apple Silicon(M1 至 M5)的開發者與 AI 研究者,想在本機上原型、學習與迭代微調流程,然後再部署至雲端 NVIDIA GPU。

Highlights

  • Broad Model Support: Fine-tune LLMs, Vision-Language Models (VLMs), Text-to-Speech (TTS), Speech-to-Text (STT), Embeddings, and OCR models.
  • Unsloth-Compatible API: Allows for seamless code portability between Mac and CUDA clusters.
  • Advanced Training Methods: Supports SFT, DPO, ORPO, GRPO, KTO, and SimPO.
  • uma Unified Memory: Can leverage up to 512GB of unified memory on Mac Studio.
  • JEPA Integration: Implements Joint-Embedding Predictive Architecture (JEPA) for vision, video, and LLM fine-tuning.
  • Flexible Export: Export models in HuggingFace format or GGUF for use with Ollama and llama.cpp.