$21 of DeepSeek API wrote Molten: a Rust+Metal engine serving 300+ tok/s on M5 Macs

GabGarrett · x · 2026-10-26

Developer zhangshuibai used DeepSeek V4.1 Flash as a coding agent and, for about $21 of API spend, built Molten in roughly a week — an open-source (Apache-2.0) inference engine purpose-built for LiquidAI's LFM2.5-24B-A2B on Apple's M5 Max.

Key idea: general frameworks like mlx-lm and llama.cpp must run any model on any hardware; a specialized engine serves one model on one chip at batch size 1, leaving far more optimization headroom.

Numbers (M5 Max, 128GB):

Form: native Rust + Metal, a single 6 MB binary, no Python/PyTorch/MLX; ships a chat CLI and an OpenAI-compatible server with streaming and tool calls for coding agents. Requires an M5-series Mac with 24GB+ RAM. The author frames it as recursive self-improvement — an AI writing its own inference engine.

Original post →

More from coding & agent

coding & agent channel →