MLX Forge Documentation v1.1.0

๐Ÿ“ฆ Installation

  1. Download MLXForge.dmg (24 MB).
  2. Open the DMG and drag MLX Forge into Applications.
  3. Launch it โ€” on first run the app provisions its managed Python runtime automatically (via uv). No Terminal, no conda, no pain.
โš ๏ธ
Apple Silicon only. MLX Forge is built on Apple's MLX framework, which requires the unified-memory architecture of M-series chips. The app refuses to launch on Intel Macs. macOS 14+ required, optimized for macOS 15+.

๐Ÿงญ Core concepts

MLX Forge covers the full model lifecycle: Discover โ†’ Convert โ†’ Quantize โ†’ Evaluate โ†’ Fine-tune โ†’ Generate โ†’ Serve โ†’ Monitor โ†’ Deploy. Three ideas hold it together:

  • No-code at the start, full code at the end. Every visual action can emit the equivalent reproducible code โ€” Python mlx-lm, Swift MLX, CLI, or curl. Click around to learn; export code to productionize.
  • The UI is a lens over a scriptable engine. A central orchestrator routes every job (conversion, training, serving) to the right runtime and owns the queue and progress โ€” the interface just observes it.
  • Managed runtimes. Python environments are created and supervised by the app through uv; the app talks to them over JSON-RPC. You never manage a venv by hand.

Navigate everything with the command palette โ€” โŒ˜K.

๐Ÿงฎ Will it fit? โ€” interactive calculator

Unified memory is the budget that matters on Apple Silicon. Estimate the footprint of a model before you download or quantize it:

โ‰ˆ โ€ฆ
8 GB Mac 16 GB 24 GB 32 GB 64 GB 96 GB 192 GB

Estimate includes weights + runtime overhead and a small KV-cache headroom; green = comfortable (โ‰ค75% of RAM). Long contexts need more.

๐Ÿ”Ž Discover & Model Library

The Discover view browses the Hugging Face hub in-app: search by name, filter by architecture and size, then pull a model with a resumable download. Everything lands in the Model Library โ€” your single organized inventory of base models, quantized variants and fine-tuned adapters, with disk usage and lineage for each.

๐Ÿ’ก
Models use the standard Hugging Face cache โ€” they're shared with API Chat's local MLX engine and any other MLX tooling on your machine. Download once, use everywhere.

โš—๏ธ Convert & Quantize

The Conversion Studio turns compatible checkpoints into MLX format; the Quantization Studio then compresses them. Pick a bit-width, watch the size/quality trade-off, and read the exact command it maps to:

python
from mlx_lm import convert

convert(
    hf_path="Qwen/Qwen3-14B",
    mlx_path="./qwen3-14b-4bit",
    quantize=True,
    q_bits=4,
    q_group_size=64,
)
bash
mlx_lm.convert \
  --hf-path Qwen/Qwen3-14B \
  --mlx-path ./qwen3-14b-4bit \
  -q --q-bits 4 --q-group-size 64

That code block above? That's the point โ€” the studio generated it from your clicks. Paste it in CI and the run is reproducible forever.

๐Ÿ“Š Evaluate

Before committing to a quantization, measure it. The Evaluation studio runs perplexity and benchmark suites against any model in your library and puts variants side by side:

  • Perplexity on standard corpora or your own text.
  • Throughput (tokens/sec, prompt vs generation) on your hardware.
  • A/B comparisons: bf16 vs 8-bit vs 4-bit of the same base model.

Rule of thumb: 4-bit with group size 64 costs ~1โ€“3% perplexity on most 7B+ models โ€” usually invisible in chat, always visible in your RAM meter.

๐ŸŽ›๏ธ Fine-tune (LoRA)

The Fine-tuning studio trains LoRA adapters on your own data with live loss curves and checkpointing โ€” the Datasets view handles importing, inspecting and splitting your training data first.

bash
mlx_lm.lora \
  --model ./qwen3-14b-4bit \
  --train --data ./my-dataset \
  --batch-size 2 --num-layers 16 --iters 1000 \
  --adapter-path ./adapters/support-bot
jsonl โ€” train.jsonl / valid.jsonl
{"messages": [{"role": "user", "content": "โ€ฆ"},
               {"role": "assistant", "content": "โ€ฆ"}]}

Adapters live in the Model Library next to their base model โ€” fuse them or load them dynamically in the Playground and the server.

๐Ÿงช Playground

Chat and completion against any local model with full control: system prompt, temperature, top-p, max tokens, repetition penalty. Compare models side by side, and export any session as code. The Vision Lab, Image Studio and Audio Studio extend the same idea to multimodal models.

๐ŸŒ OpenAI-compatible server

ForgeServer exposes any model on an OpenAI-compatible HTTP/SSE endpoint with generated API keys (mlxf-โ€ฆ). The wire format is transcribed from the OpenAI OpenAPI specification and verified two ways: a golden test with the unmodified openai Python SDK completing a streamed chat, and structural golden-file comparison of response bodies.

python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8080/v1", api_key="mlxf-โ€ฆ")
stream = client.chat.completions.create(
    model="qwen3-14b-4bit",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
bash
curl http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer mlxf-โ€ฆ" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-14b-4bit", "stream": true,
       "messages": [{"role": "user", "content": "Hello!"}]}'
javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://localhost:8080/v1",
  apiKey: "mlxf-โ€ฆ",
});
const stream = await client.chat.completions.create({
  model: "qwen3-14b-4bit", stream: true,
  messages: [{ role: "user", content: "Hello!" }],
});

Manage everything from the Servers view: start/stop endpoints, rotate keys, watch request logs live.

๐Ÿ–ฅ๏ธ Cluster & deploy

The Cluster view discovers other Macs on your network via Bonjour (ForgeCluster) and fans work out to them โ€” turn a desk of Apple Silicon machines into one lab. The Pipelines view chains stages (convert โ†’ quantize โ†’ evaluate โ†’ serve) into repeatable recipes, and Projects keeps each experiment's models, datasets and runs together.

๐Ÿ“ˆ Monitoring & Metal Lab

  • Live serving metrics โ€” tokens/sec, time-to-first-token, request logs, memory pressure.
  • Profiler โ€” where the milliseconds go across prompt processing and generation.
  • Metal Lab โ€” GPU-level inspection for the performance-obsessed: kernel timings and memory bandwidth on your exact chip.

๐Ÿ‘จโ€๐Ÿ’ป Code generation

Every studio has an Export code action producing the exact equivalent of what you just did visually, in four dialects:

TargetUse it for
Python mlx-lmNotebooks, CI pipelines, training scripts
Swift MLXEmbedding inference in your own macOS/iOS apps
CLIShell scripts and quick reproduction
curlHitting your served endpoints from anything

This is the app's core philosophy: the GUI teaches you the tool; the generated code makes it reproducible.

๐Ÿ›๏ธ Architecture

For the curious โ€” the app is a thin SwiftUI layer over a scriptable engine:

system diagram
MLXForge.app (SwiftUI)  โ€”  Features โ†’ ViewModels โ†’ ForgeCore protocols
        โ”‚
  LocalOrchestrator (actor) โ€” routes every job, owns queue & progress
   โ”œโ”€โ”€ ForgeEngine   MLX Swift inference (in-process)
   โ”œโ”€โ”€ ForgeBridge   Python runtimes over JSON-RPC 2.0 (unix socket)
   โ”œโ”€โ”€ ForgeServer   OpenAI-compatible HTTP/SSE (Hummingbird 2)
   โ””โ”€โ”€ ForgeCluster  remote Macs via Bonjour
        โ”‚
  forge_runtime (Python) โ€” mlx, mlx-lmโ€ฆ one process per env,
                           spawned & supervised by the app
  • UI code lives only in the app's Features layer (MVVM) โ€” everything reusable is a Swift package.
  • Python processes are spawned and supervised by the app; if one dies, the orchestrator restarts it.
  • The server is verified against golden files and the real OpenAI SDK on every change.

๐Ÿงฐ CLI & Python SDK

MLX Forge ships two programmatic companions:

  • mlxlab CLI (Swift) โ€” drive the lab from the shell: list models, launch jobs, query servers.
  • Python SDK (mlxlab) โ€” talks to the app's local API for scripted workflows and integration into your existing tooling.
python
import mlxlab

lab = mlxlab.connect()          # talks to the running app
for model in lab.models.list():
    print(model.name, model.size_gb)

โ“ FAQ

Why Apple Silicon only?
MLX is built around the unified-memory architecture of M-series chips โ€” CPU and GPU share the same RAM with zero-copy. That's what makes 30B-parameter models practical on a laptop, and it simply doesn't exist on Intel Macs.
Do I need to install Python?
No. The app provisions and supervises its own Python runtimes through uv. You'll never activate a venv, and different features can use isolated environments without conflicts.
How much RAM do I need?
Use the calculator above. Short version: 16 GB is comfortable up to ~14B in 4-bit, 32 GB unlocks the 30B class, 64 GB+ runs 70B. Fine-tuning wants roughly 1.5โ€“2ร— the inference footprint.
Can other machines use my served models?
Yes โ€” the OpenAI-compatible server binds to your machine and any host you allow; API keys (mlxf-โ€ฆ) gate access. Point any OpenAI SDK at http://your-mac:8080/v1.
Does it work with API Chat?
Beautifully. They share the same Hugging Face model cache, so a model you pull in Forge is instantly available in API Chat's local MLX provider โ€” and vice versa.
Is my data used to train anything?
No. Everything โ€” models, datasets, fine-tuning runs, chats โ€” happens on your hardware. The app has no telemetry.