mlx-lm

by Apple · Runtime · Text & code

A Python package that runs and fine-tunes language models on Macs with Apple silicon, installed with pip or conda.

mixed

Apple's Mac runtime; benchmark it against Kapitsa on your model, results conflict

AccessOpen codePricefreeRuns onmacOSLicenseMIT

Who says what

Early days

Reddit running Nemotron Dory on a 16 GB M1 Pro

Going from 1.1K to 32K context, mlx-lm slowed only from 27.9 to 19.3 tok/s while Kapitsa fell from 36 to 11.9.

r/LocalLLaMA on r/LocalLLaMA, running Hy4-flash on an M5 Max

Kapitsa at 4-bit beat mlx-lm at 3.1-bit: 657 vs 228 tok/s prefill at 4K, and 34.6 vs 4.4 tok/s decode at 32K.

What would settle it. One run of both runtimes on the same model, Mac and quantization at 4K and 32K context.

Cost to run

Alternatives

KapitsaOn Hy4-flash with an M5 Max, Kapitsa 4-bit beat mlx-lm 3.1-bit: 4K prefill 657 (fast 968) vs 228 tok/s; 32K decode 34.6 vs 4.4 tok/s
Nemotron DoryAt 2 loops on a MacBook Pro M1 Pro 16 GB, going from 1.1K to 32K context cut speed from 36 to 11.9 tok/s in Kapitsa but 27.9 to 19.3 in mlx-lm.