Native inference for Apple silicon
Frontier models at full speed, on the Mac on your desk.
Vesperforge runs million-token language models, image generation and upscaling natively, in Rust and Metal. One brew install, no Python, and an OpenAI-compatible server for your tools.
- AGPL-3.0-only
- macOS 26.2+ on Apple silicon
- OpenAI-compatible API
- Qwen4-35B-A3B
- Qwen3.8-Flash-Next
- GLM-5.3-Flash
- Qwen3.8-27B
- MOSS-Image
- Real-ESRGAN
- Real-CUGAN
01Why Vesperforge
Native binary. No Python.
One brew install puts native Apple silicon binaries on your PATH. No interpreter, no Conda environment and no wheels to match to your macOS version.
A production server that speaks the OpenAI API.
Point your SDK, agent or editor at it. Streams, tools and structured output work as they do in the cloud, on your machine.
- Responses API
POST /v1/responses- Chat Completions
POST /v1/chat/completions- Live streaming
- HTTP with SSE, or WebSocket
- Structured output
- Constrained to your JSON Schema
- Tool calls
- Parallel, streamed as they form
- Context cache
- Multi-turn, kept on disk
- Images
- Generate and upscale, same server
-
Nothing to install around it
No Python, no virtual environments, no dependency drift. Self-contained native binaries with bundled Metal libraries are the whole runtime.
-
Verified precision
Bit-exact fused kernels everywhere except one blind-tested fast plan for four-stream Qwen3.8-27B up to 64K. Pass
--precision exactto lock reference arithmetic everywhere. -
Open source
Licensed AGPL-3.0-only. Read it, change it and run it on your own hardware.
darkskygit/Vesperforge
02Built for Apple silicon
Made for unified memory.
On Apple silicon the GPU works in the same memory as the CPU. Vesperforge is built around it: one copy of the weights serves every session, and a million-token context fits on a desk instead of a rack of GPUs.
- Context per session
- 1Mtokens
- The full window the model was trained for, not a trimmed one.
- Sessions at once
- 4
- Agents share one copy of the weights, each with its own context.
- Unified memory
- 64to512GB
- From a MacBook Pro to a Mac Studio. Quiet, on your desk.
Four 1M-token sessions, one Mac
Peak memory of each runtime, drawn against the machine's 256 GB.
Qwen4-35B-A3B, four sessions of 1M tokens each, on a 256 GB Mac Studio.
-
Shared weights, batched speculative verify
Active sessions read each weight once per step and verify two-token speculative drafts together in one pass, instead of queuing requests or turning off speculative decoding under load.
-
Zero-mirror 1M attention
Fused Metal kernels score sparse attention directly on BF16 blocks and keep linear-attention state in GPU registers, cutting the FP32 mirrors that push MLX servers past 256 GB.
-
Interleaved ragged prefill
Prompts of different lengths pack without padding and interleave chunk by chunk with active generation, so a million-token prompt never stalls running streams.
03Benchmarks
Measured on the same Mac.
Same machine, same checkpoints, same prompts and greedy settings across 256 GB M5 Ultra and 64 GB M5 Max. Real multi-turn engineering sessions, not short synthetic prompts.
Qwen4-35B-A3B
1,040,000-token engineering sessions
- Vesperforge
- oMLX
- oMLX Lightning
- inferd (exact)
- Memory guard (218 GiB)
- Stopped
oMLX Lightning (speculative decoding enabled) was measured at 8K, 128K, 512K and 1M. inferd (exact, BF16 KV) ran with --agents 4 --context 1048576 --spill off at 8K, 128K and 1M, pre-allocating a 186.6 GiB pool at startup (physical footprint directly measured at 8K and 128K W=1 and 8K W=4, unprobed longer cells left blank). Dotted spans bridge unmeasured stops.
Qwen3.8-Flash-Next
998,000-token engineering sessions
- Vesperforge
- oMLX
- oMLX Lightning
- Memory guard (218 GiB)
oMLX Lightning runs the same checkpoint with speculative decoding enabled at 8K, 128K and 1M. Both oMLX configurations hit the 218 GiB memory guard at four 1M sessions. Dotted spans bridge unmeasured stops.
Qwen4-35B-A3B (GGUF)
Same Q4_K_M GGUF file, 8K to 1M sessions
- Vesperforge
- llama.cpp
Both runtimes load the exact same three-shard community Q4_K_M GGUF checkpoint (no speculative draft weights). llama.cpp stalled at four 1M sessions at 122.7 GiB with 0% GPU utilization. With disk streaming enabled for GGUF per-layer embedding tables, single-session Vesperforge drops to 24.2 / 34.3 / 52.3 GiB and four 128K sessions drop to 39.6 GiB with bit-identical output.
GLM-5.3-Flash
200K-token engineering sessions
Qwen3.8-27B
200K-token engineering sessions
Stopped: the runtime passed 218 GiB of memory and was halted before it could finish.
MOSS-Image
1024 × 1024, 50 steps
Qwen4-35B-A3B
8K to 256K sessions on 64 GB unified memory
- Vesperforge
- oMLX
- oMLX Lightning
- Memory guard (52 GiB)
- Stopped
On 64 GB unified memory, Vesperforge streams large per-layer embedding tables from disk with zero swap, saving 7.5 to 13.5 GiB against oMLX default (up to 14.2 GiB against oMLX Lightning) while running four 128K sessions at 229.2 tok/s. Prefill on this 64 GB host ran at 2,862.8 to 3,843.1 tok/s against oMLX 5,162.8 to 6,131.6 tok/s. oMLX Lightning exceeded the 52 GiB memory guard on four 128K sessions. 256K was measured on one session only.
Qwen3.8-27B
8K to 200K sessions on 64 GB unified memory
- Vesperforge
- oMLX
- inferd (exact)
- inferd (fast)
- Memory guard (52 GiB)
- Stopped
On 64 GB unified memory, inferd 0.7.0 pre-allocates 50.2 to 51.4 GiB (host-monitored job footprint) even for a 15 GiB dense checkpoint. inferd (fast, 8-bit KV) was halted by the host memory guard at 51.4 GiB on four 64K sessions while Vesperforge ran at 40.1 tok/s in 32.8 GiB. 200K was measured on one session only.
MOSS-Image
1024 × 1024, 50 steps, 64 GB unified memory
Measured on Mac Studio, Apple M5 Ultra, 256 GB and Mac Studio, Apple M5 Max, 64 GB, with each Vesperforge cell verified at 0.0 MiB host swap delta. Built on Apple MLX with select Metal kernels adapted from oMLX. Release binaries run default flags against oMLX (0.8.5 at 1M and M5 Max, 0.8.4 at 200K), oMLX Lightning (0.8.5 with speculative decoding), inferd (exact) (0.7.0, BF16 KV), inferd (fast) (0.7.0, 8-bit KV), llama.cpp (b13019 Metal, GGUF Q4_K_M), vllm-metal (0.34.0), SGLang-MLX, ComfyUI (warm runs). Peak memory is the process physical footprint, and four-session speed is total tokens over the union of active decode windows. Methodology.
All measurements, prefill included
| Model | Runtime | Prefilltok/s | Generationtok/s, or s per image | Peak memoryGiB |
|---|---|---|---|---|
| Mac Studio, Apple M5 Ultra, 256 GB | ||||
| Qwen4-35B-A3B1M, 1 session | Vesperforge | 5,367.3 | 185.2 | 64.0 |
| oMLX | 5,325.7 | 90.6 | 96.5 | |
| oMLX Lightning | 4,989.7 | 43.1 | 83.6 | |
| inferd (exact) | 2,205.3 | 157.0 | n/a | |
| inferd (fast) | 2,222.2 | 158.0 | n/a | |
| Qwen4-35B-A3B1M, 4 sessions | Vesperforge | 4,836.2 | 249.6 | 131.6 |
| oMLX | Stopped above 218 GiB | |||
| oMLX Lightning | 4,903.6 | 11.9 | 183.2 | |
| inferd (exact) | 2,944.5 | 2.5 | n/a | |
| inferd (fast) | 2,883.4 | 3.5 | n/a | |
| Qwen3.8-Flash-Next1M, 1 session | Vesperforge | 3,433.3 | 129.5 | 133.9 |
| oMLX | 3,408.0 | 65.4 | 163.5 | |
| oMLX Lightning | 3,253.5 | 33.5 | 152.7 | |
| Qwen3.8-Flash-Next1M, 4 sessions | Vesperforge | 3,229.5 | 158.2 | 180.4 |
| oMLX | Stopped above 218 GiB | |||
| oMLX Lightning | Stopped above 218 GiB | |||
| Qwen4-35B-A3B (GGUF)1M, 1 session | Vesperforge | 5,077.1 | 61.3 | 62.7 |
| llama.cpp | 1,580.5 | 33.5 | 56.5 | |
| Qwen4-35B-A3B (GGUF)1M, 4 sessions | Vesperforge | 4,648.0 | 158.3 | 124.0 |
| llama.cpp | Stalled (0% GPU) | 122.7 | ||
| GLM-5.3-Flash200K, 1 session | Vesperforge | 1,876.9 | 64.2 | 178.3 |
| oMLX | 1,936.5 | 55.2 | 180.1 | |
| GLM-5.3-Flash200K, 4 sessions | Vesperforge | 1,904.1 | 80.3 | 185.6 |
| oMLX | 1,949.7 | 23.7 | 193.1 | |
| Qwen3.8-27B200K, 1 session | Vesperforge | 870.6 | 39.9 | 30.4 |
| oMLX | 862.0 | 26.6 | 34.0 | |
| vllm-metal | 646.5 | 27.4 | 71.7 | |
| SGLang-MLX | 815.5 | 29.4 | 58.1 | |
| Qwen3.8-27B200K, 4 sessions | Vesperforge | 839.4 | 43.1 | 75.4 |
| oMLX | 833.1 | 5.2 | 105.6 | |
| vllm-metal | 548.1 | 0.4 | 97.8 | |
| SGLang-MLX | Stopped above 218 GiB | |||
| MOSS-Image1024 × 1024, 1 image | Vesperforge | n/a | 83.7 | 32.6 |
| ComfyUI | n/a | 90.1 | 33.0 | |
| MOSS-Image1024 × 1024, 4-image queue | Vesperforge | n/a | 83.9 | 32.6 |
| ComfyUI | n/a | 90.2 | 34.8 | |
| Mac Studio, Apple M5 Max, 64 GB | ||||
| Qwen4-35B-A3B256K, 1 session | Vesperforge | 3,269.4 | 104.0 | 35.3 |
| oMLX | 5,162.8 | 96.7 | 45.3 | |
| oMLX Lightning | 4,914.6 | 91.9 | 45.3 | |
| Qwen4-35B-A3B128K, 4 sessions | Vesperforge | 3,843.1 | 229.2 | 41.1 |
| oMLX | 5,443.4 | 46.7 | 52.0 | |
| oMLX Lightning | Stopped above 52 GiB | |||
| Qwen3.8-27B200K, 1 session | Vesperforge | 482.4 | 18.1 | 28.2 |
| oMLX | 486.0 | 16.9 | 31.3 | |
| Qwen3.8-27B64K, 4 sessions | Vesperforge | 679.8 | 40.1 | 32.8 |
| oMLX | 670.8 | 9.2 | 42.9 | |
| inferd (exact) | 916.9 | 1.7 | 51.4 | |
| inferd (fast) | Stopped at 51.4 GiB | |||
| MOSS-Image1024 × 1024, 1 image | Vesperforge | n/a | 163.3 | 14.9 |
| MOSS-Image1024 × 1024, 4-image queue | Vesperforge | n/a | 169.5 | 14.1 |
04Models
Open models, ready to run.
Language models load MLX SafeTensors, Hugging Face quantized SafeTensors (FP8, AWQ, GPTQ, FP4, BF16, FP16) and GGUF files directly. Images load ComfyUI weights with LoRA adapters, and upscalers load standard Real-ESRGAN and Real-CUGAN files.
- Qwen4-35B-A3BMixture of expertsText, imagesSafeTensors (MLX affine 2, 3, 4, 5, 6, 8-bit, HF FP8/AWQ/GPTQ/FP4, BF16/FP16) or GGUF (Q4_0 to Q6_K)1M tokens
- Qwen3.8-Flash-NextMixture of expertsText, imagesSafeTensors (MLX affine 2, 3, 4, 5, 6, 8-bit, HF FP8/AWQ/GPTQ/FP4, BF16/FP16) or GGUF (Q4_0 to Q6_K)1M tokens
- GLM-5.3-FlashMixture of expertsText, imagesSafeTensors (MLX affine 2, 3, 4, 5, 6, 8-bit, HF FP8/AWQ/GPTQ/FP4, BF16/FP16) or GGUF (Q4_0 to Q6_K)200K tokens
- Qwen3.8-27BDenseText, imagesSafeTensors (MLX affine 2, 3, 4, 5, 6, 8-bit, HF FP8/AWQ/GPTQ/FP4, BF16/FP16) or GGUF (Q4_0 to Q6_K)200K tokens
- MOSS-ImageImage generationText to imageBF16 transformer, FP32 VAE, LoRA1024 × 1024
- Real-ESRGAN, Real-CUGANSuper-resolutionImage to imageF32, F16 or BF16 (.safetensors, .pth)2×, 3×, 4×
Fused Metal kernels accelerate 4-bit and 8-bit profiles across 32, 64 and 128 group sizes, while other valid MLX affine settings fall back automatically to Apple MLX operators. Hugging Face SafeTensors and GGUF files repack before inference with zero runtime overhead, and --quant-cache saves the repacked shards for instant reload.
05Quickstart
Install with Homebrew. Run from the shell or over HTTP.
Homebrew installs prebuilt native binaries for Apple silicon (macOS 26.2+). No Rust toolchain, no compiling, nothing else to set up.
-
01
Install
Puts
vesperforgeandvesperforge-serveon your PATH.brew tap darkskygit/vesperforge https://github.com/darkskygit/Vesperforge brew install vesperforge -
02
Ask a model
Point
--modelat a checkpoint folder or a.gguffile. Add--imageto attach pictures.vesperforge --model ~/models/Qwen4-35B-A3B \ --prompt 'Explain unified memory in two sentences.' -
03
Start the server
Listens on
127.0.0.1:8080with the models set in its config. See the operations guide.printf '%s\n' '[text_model]' 'id = "qwen4"' "checkpoint = \"$HOME/models/Qwen4-35B-A3B\"" \ 'lane_base_bytes = 21474836480' 'lane_bytes_per_token = 139264' > serve.toml vesperforge-serve --config serve.toml -
04
Call it
Or use any OpenAI client with its base URL set to
http://127.0.0.1:8080/v1.curl http://127.0.0.1:8080/v1/responses \ -H 'content-type: application/json' \ -d '{"model": "qwen4", "stream": true, "input": "Hello"}'
Read the source, file an issue, or send a change.