Skip to main content
Apple silicon and MLX The local path runs entirely on your Mac. Training uses mlx-lm, Apple’s ML framework for Apple silicon. Your data never leaves the laptop. Your app points OPENAI_BASE_URL at one of three endpoints: your Mac, your cluster, or managed

Prerequisites

  • A Mac with Apple silicon (M-series). Unified memory decides the training memory profile: 16 GB works, more is faster.
  • Python 3.10+ and the SDK: pip install runapprentice
  • A CSV of examples with input,output columns. Rows you pass with --data are treated as gold: no account or review step.

Hand it to your agent

Working in Claude Code, Codex, or Copilot CLI? Install the skill and hand over the whole path:
Then paste:
The skill guides the commands and checks the run report; you stay in the loop for every step that touches your code. Prefer to run it yourself? The same two steps follow.

Train

What happens, in order:
  1. Preflight checks the dataset, model, and memory profile.
  2. mlx_lm lora fine-tunes mlx-community/Qwen3.5-4B-OptiQ-4bit with a LoRA adapter on your gold rows.
  3. A held-out slice is scored before and after, so the report shows a real delta, not a feeling.
  4. The adapter, its SHA-256, the mlx-lm version, and the scores land in a local run report.
Useful flags:

Serve

mlx-lm ships an OpenAI-compatible HTTP server. Point it at the base model plus your trained adapter:
Then point your existing code at it. Nothing else changes:
LangChain, the OpenAI SDK, and anything else that speaks the OpenAI API keeps working as-is. Rollback is flipping OPENAI_BASE_URL back.

Moving the adapter off the Mac

The adapter on disk is in MLX format. Serving it with vLLM on a GPU box (see Deploy in your Kubernetes cluster) needs a format conversion step that we have not published a verified recipe for yet. Until then, treat the Mac-trained adapter as a Mac-served adapter, or retrain in Colab with the benchmark notebooks, whose adapters are vLLM-ready.