node-mlx
The fastest way to run LLMs in Node.js on Apple Silicon.
2× faster than alternatives. Powered by Apple MLX.
$npm install node-mlx
Terminal
$ npx node-mlx "What is 2+2?"
✓ Loading Qwen3-4B-Instruct...
⚡ Generated 24 tokens at 142 tok/s
The answer is 4.Why node-mlx?
2× Faster
Native Metal GPU acceleration. Outperforms node-llama-cpp on every benchmark.
Unified Memory
No CPU↔GPU copying. Apple Silicon's unified architecture = maximum efficiency.
Zero Config
npm install and you're ready. Auto-downloads models from HuggingFace.
Performance
~1.9× faster than node-llama-cpp on Apple Silicon. Benchmarks on Mac Studio M1 Ultra (64GB), 4-bit quantization.
Simple API
app.ts
import { generate } from "node-mlx";
// One-liner: load, generate, done
const result = generate("qwen", "Explain quantum computing:");
console.log(result.text);
console.log(`${result.tokensPerSecond} tok/s`);Supported Models
Use short aliases or any model from mlx-community
Built on
Ready to run LLMs at native speed?
Get Started