Vesperforge

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
Runs
  • 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.

vesperforge-serve

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 exact to 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.

Vesperforge131.6 GiB
oMLX Lightning183.2 GiB
oMLXStopped above 218 GiB

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

Context
  • Vesperforge
  • oMLX
  • oMLX Lightning
  • inferd (exact)
  • Memory guard (218 GiB)
  • Stopped
One session+18% Vesperforge185.2tok/s oMLX90.6tok/soMLX Lightning43.1tok/sinferd (exact)157.0tok/s At 1MPrefill5,367.3tok/sPeak memory64.0GiB
Four sessions at once21.0× Vesperforge249.6tok/s oMLXStoppedoMLX Lightning11.9tok/sinferd (exact)2.5tok/s At 1MPrefill4,836.2tok/sPeak memory131.6GiB

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.

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
ModelRuntimePrefilltok/sGenerationtok/s, or s per imagePeak memoryGiB
Mac Studio, Apple M5 Ultra, 256 GB
Qwen4-35B-A3B1M, 1 sessionVesperforge5,367.3185.264.0
oMLX5,325.790.696.5
oMLX Lightning4,989.743.183.6
inferd (exact)2,205.3157.0n/a
inferd (fast)2,222.2158.0n/a
Qwen4-35B-A3B1M, 4 sessionsVesperforge4,836.2249.6131.6
oMLXStopped above 218 GiB
oMLX Lightning4,903.611.9183.2
inferd (exact)2,944.52.5n/a
inferd (fast)2,883.43.5n/a
Qwen3.8-Flash-Next1M, 1 sessionVesperforge3,433.3129.5133.9
oMLX3,408.065.4163.5
oMLX Lightning3,253.533.5152.7
Qwen3.8-Flash-Next1M, 4 sessionsVesperforge3,229.5158.2180.4
oMLXStopped above 218 GiB
oMLX LightningStopped above 218 GiB
Qwen4-35B-A3B (GGUF)1M, 1 sessionVesperforge5,077.161.362.7
llama.cpp1,580.533.556.5
Qwen4-35B-A3B (GGUF)1M, 4 sessionsVesperforge4,648.0158.3124.0
llama.cppStalled (0% GPU)122.7
GLM-5.3-Flash200K, 1 sessionVesperforge1,876.964.2178.3
oMLX1,936.555.2180.1
GLM-5.3-Flash200K, 4 sessionsVesperforge1,904.180.3185.6
oMLX1,949.723.7193.1
Qwen3.8-27B200K, 1 sessionVesperforge870.639.930.4
oMLX862.026.634.0
vllm-metal646.527.471.7
SGLang-MLX815.529.458.1
Qwen3.8-27B200K, 4 sessionsVesperforge839.443.175.4
oMLX833.15.2105.6
vllm-metal548.10.497.8
SGLang-MLXStopped above 218 GiB
MOSS-Image1024 × 1024, 1 imageVesperforgen/a83.732.6
ComfyUIn/a90.133.0
MOSS-Image1024 × 1024, 4-image queueVesperforgen/a83.932.6
ComfyUIn/a90.234.8
Mac Studio, Apple M5 Max, 64 GB
Qwen4-35B-A3B256K, 1 sessionVesperforge3,269.4104.035.3
oMLX5,162.896.745.3
oMLX Lightning4,914.691.945.3
Qwen4-35B-A3B128K, 4 sessionsVesperforge3,843.1229.241.1
oMLX5,443.446.752.0
oMLX LightningStopped above 52 GiB
Qwen3.8-27B200K, 1 sessionVesperforge482.418.128.2
oMLX486.016.931.3
Qwen3.8-27B64K, 4 sessionsVesperforge679.840.132.8
oMLX670.89.242.9
inferd (exact)916.91.751.4
inferd (fast)Stopped at 51.4 GiB
MOSS-Image1024 × 1024, 1 imageVesperforgen/a163.314.9
MOSS-Image1024 × 1024, 4-image queueVesperforgen/a169.514.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.

  1. 01

    Install

    Puts vesperforge and vesperforge-serve on your PATH.

    Terminal
    brew tap darkskygit/vesperforge https://github.com/darkskygit/Vesperforge
    brew install vesperforge
  2. 02

    Ask a model

    Point --model at a checkpoint folder or a .gguf file. Add --image to attach pictures.

    Terminal
    vesperforge --model ~/models/Qwen4-35B-A3B \
      --prompt 'Explain unified memory in two sentences.'
  3. 03

    Start the server

    Listens on 127.0.0.1:8080 with the models set in its config. See the operations guide.

    Terminal
    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
  4. 04

    Call it

    Or use any OpenAI client with its base URL set to http://127.0.0.1:8080/v1.

    Terminal
    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.