← Back to Leaderboard
MARahim3

ARahim3/mlx-tune

Apple MLX fine-tuning with an Unsloth-style API for local model development

Engineering Health (Methodology)
B · 60/100
Maintenance Activity
● Updated 5mo ago
Latest Release
v0.6.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption14/25
Release Cadence14/20
License Clarity20/20
Local AIGPU
Total Stars
★ 1,485
24h Growth
+0
7d Growth
+7
Forks
103

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

ARahim3/mlx-tune Star History (2026-01-04 - 2026-12-04) ALL-TIME STAR HISTORY (2026-01 – 2026-12) +1.5k in 334d · avg +4/day 1.6k 784 0 2026-01-04: ★ 12026-01-31: ★ 4052026-02-21: ★ 4412026-03-14: ★ 7142026-04-04: ★ 9512026-04-25: ★ 1,1722026-05-16: ★ 1,2272026-06-06: ★ 1,2602026-06-27: ★ 1,3142026-07-18: ★ 1,3442026-08-08: ★ 1,3672026-08-29: ★ 1,3842026-09-19: ★ 1,4092026-10-10: ★ 1,4202026-10-31: ★ 1,4512026-11-21: ★ 1,4742026-12-04: ★ 1,485 ★ 1.5k 2026-01 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

mlx-tune is a Python training library, not an inference service. Model wrappers such as FastLanguageModel, FastVisionModel, and FastSTTModel handle model and tokenizer or processor setup, while task-specific trainers define the training objective. A text SFT job loads a supported checkpoint, attaches LoRA with get_peft_model, prepares examples with chat templates or response-only masking, runs SFTTrainer, then saves adapters or merged weights.

Training runs natively on MLX rather than CUDA/Triton. The dependency list includes mlx>=0.20.0, mlx-lm>=0.18.0, Transformers, Tokenizers, Datasets, and Hugging Face Hub. The Python API is the integration surface: model wrappers, trainer/config pairs, and helpers such as UnslothVisionDataCollator let a training script select the right data and model path. The source tree separates the mlx_tune/ package from examples/, docs/, and tests/.

Key Capabilities & Differentiators

Text training covers SFT, DPO, ORPO, KTO, SimPO, multi-generation GRPO, and continual pretraining through CPTTrainer. The same language-model wrapper handles supported dense and MoE checkpoints; MoE-aware LoRA can target SwitchLinear expert layers in families such as Qwen3.5-MoE and Phi-3.5-MoE. Multimodal paths include VLM SFT and GRPO, Whisper and Parakeet TDT speech recognition, Orpheus and Qwen3-TTS speech synthesis, and OCR with character and word error rates plus exact match. Embedding training uses InfoNCE and exposes mean, CLS, and last-token pooling.

The v0.6.0 JEPA paths serve different purposes: LeJEPA trains a vision transformer from scratch with SIGReg, I-JEPA supports frozen-backbone, LoRA, or full fine-tuning for classification, and V-JEPA 2 exposes clip features, classification, and masked-latent prediction. LLMJEPATrainer adds a paired-view alignment term to next-token prediction while retaining a standard LoRA artifact. Export is a separate concern: supported paths include adapter-only saves, merged weights, and GGUF subject to base-model and conversion constraints.

Trade-offs & Limitations

The strongest reason to adopt mlx-tune is to prototype locally on a Mac while keeping an Unsloth-style script for a later CUDA run. Original Unsloth is the direct alternative on NVIDIA hardware. The two backends are different despite the familiar API: validate trainer arguments, data formatting, and saved artifacts on both sides before assuming portability, throughput parity, or numerical equivalence. Unified memory makes local experimentation practical, but sequence length, batch size, and GRPO rollouts can make a job that loads successfully too large to train.

Export can determine which checkpoint to start with. A 4-bit base supports QLoRA and adapter saves, but direct GGUF export from that base is blocked by the mlx-lm conversion path. The default merged_16bit dequantizes before fusion, requiring more memory and storage than a quantized artifact. merged_4bit is smaller but can round away a small LoRA update. If GGUF is mandatory, choose a supported non-quantized base and test conversion early; if inference stays on MLX, an adapter or merged MLX checkpoint avoids GGUF conversion.

Hardware & Deployment Guide

The baseline is an Apple Silicon Mac (M1–M5), macOS 13.0+, and Python 3.9+. Install with pip install mlx-tune or uv pip install mlx-tune; TTS and STT use the mlx-tune[audio] extra and system ffmpeg for audio codecs. Training executes in the local Python process, without a hosted training API. For an offline workflow, stage the required model, tokenizer or processor, and dataset files ahead of time and verify local loading before disconnecting.

The minimum is 8 GB of unified memory, with 16 GB or more recommended. Size for the chosen checkpoint, sequence length, batch size, and any generation or export step. v0.5.0 improved trainer performance and recorded an ORPO configuration at 4,096 context on a 48 GB Mac; that is not a general capacity guarantee. v0.5.1 addressed a merge bug that could make a reloaded 4-bit-base fine-tune behave like the original model. With v0.6.0 adding JEPA, pin a tested dependency set and make a fresh-process reload part of artifact acceptance.

Backend: Python training runs on Apple MLX, with mlx-lm in the language-model stack and FastLanguageModel as the Unsloth-style entry point.
Training objectives: Native MLX trainers cover SFT, DPO, ORPO, KTO, SimPO, and GRPO; GRPO samples multiple completions and uses rewards.
Adapter targeting: MoE-aware LoRA can target SwitchLinear expert layers; vision LoRA exposes separate controls for vision and language layers.
Multimodal evaluation: OCR exposes CER, WER, and exact match; embedding training uses InfoNCE with mean, CLS, or last-token pooling.
Research entry points: v0.6.0 adds FastJEPAModel, FastVideoJEPAModel, and LLMJEPATrainer; LLM-JEPA produces a standard LoRA artifact.
Artifact handling: Save adapters or merged weights; the default 16-bit merge dequantizes a 4-bit base before fusion, while direct GGUF export from that quantized base is unsupported.
Best For

Teams and researchers prototyping language or multimodal fine-tuning on Apple Silicon, validating data and adapter behavior locally, and optionally moving larger text-training jobs to Unsloth on CUDA.

Skip If

You need a production inference server, train exclusively on NVIDIA, or must export GGUF directly from a 4-bit base checkpoint.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIGPU
# Using uv (recommended - faster and more reliable)
uv pip install mlx-tune

# With audio support (TTS/STT fine-tuning)
uv pip install 'mlx-tune[audio]'
brew install ffmpeg  # system dependency for audio codecs

# Or using pip
pip install mlx-tune

# From source (for development)
git clone https://github.com/ARahim3/mlx-tune.git
cd mlx-tune
uv pip install -e .

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
mlx-tune ★1.5k+7PythonApache-2.0Apple MLX fine-tuning with an Unsloth-style API for local model development
LlamaFactory76.4k+86PythonApache-2.0A unified Python framework for LLM and VLM fine-tuning with pluggable inference
peft21.9k+32PythonApache-2.0Python/PyTorch adapters for fine-tuning large models without updating base weigh
minimind75.4k+3.1kPythonApache-2.0Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ARahim3/mlx-tune.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ARahim3/mlx-tune Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about mlx-tune

How much of an existing Unsloth script can I reuse?

Start by replacing the Unsloth model import and the TRL trainer import with their mlx_tune counterparts. For SFT, the familiar flow is FastLanguageModel.from_pretrained, get_peft_model, then SFTTrainer. Before scaling up, run a small job on both backends and verify chat formatting, response masking, trainer options, and checkpoint reloads. A familiar API is not a guarantee of identical behavior.

How much unified memory should I budget?

The minimum is 8 GB of unified memory, with 16 GB or more recommended. Neither figure guarantees that a particular job will fit. Start with a supported small model, a short context, and a low batch size, then measure peak memory during training and export. Account for generation during GRPO and dequantization during a 16-bit merge, not just the memory needed to load the base model.

Can a company use mlx-tune internally or distribute its outputs?

Yes. Apache-2.0 permits commercial use of the library, and the training path runs locally without a hosted training API. Preserve the required license and notices when redistributing the library. Separately review the rights attached to base weights, training data, and any adapters or merged weights you intend to distribute.

When should I choose mlx-tune over Unsloth, Ollama, or llama.cpp?

Choose mlx-tune for training on Apple Silicon when keeping an Unsloth-style workflow matters. Choose Unsloth for NVIDIA/CUDA training. If the goal is only to run an existing GGUF model, Ollama or llama.cpp is the more direct choice; mlx-tune's role there is to produce a compatible artifact, subject to export limitations.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ARahim3/mlx-tune? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ARahim3/mlx-tune on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare