Hypura – A storage-tier-aware LLM inference scheduler for Apple Silicon
TL;DR Highlight
Placing tensors across GPU, RAM and NVMe lets a 40GB model run on a 32GB Mac.
Who Should Read
A developer running local LLMs on a Mac who can't load larger models because of limited memory
Core Mechanics
- Tensors are split across GPU, RAM and NVMe
- Hypura reads the GGUF file and profiles GPU working set, RAM and NVMe bandwidth.
- It weighs access patterns and bandwidth cost to assign every tensor to one of three tiers.
- Models that fit in memory have no overhead
- Qwen 2.5 14B Q4_K_M ran at 21 tok/s on Hypura versus about 21 tok/s on llama.cpp.
- It runs in full-resident mode, entirely on the GPU.
- MoE loads only the needed experts
- Mixtral 8x7B uses only 2 of 8 experts per token.
- Router interception loads only those experts from NVMe, cutting I/O by 75% per the README.
- The neuron cache hit rate is 99.5%.
- Mixtral 31GB runs at 2.2 tok/s
- Mixtral 8x7B Q5_K_M (30.9GB) ran at 2.2 tok/s on a 32GB M1 Max.
- llama.cpp hit OOM under the same conditions.
- Llama 70B crawls at 0.3 tok/s
- Llama 3.3 70B Q4_K_M (39.6GB) runs at 0.3 tok/s in dense-FFN-streaming mode.
- Attention and norms (~8GB) stay on GPU while FFN (~32GB) streams from NVMe.
- llama.cpp hit OOM.
- It ships OpenAI- and Ollama-compatible servers
- hypura serve exposes OpenAI-style endpoints like /v1/chat/completions plus Ollama APIs.
- You can use the OpenAI SDK by just changing base_url.
Community Reactions
- Opinion that under 1 tok/s isn't really 'running'
- One commenter said the 'Run' headline is misleading for a 40GB model under 1 tok/s.
- Others countered that slow is fine for background or overnight jobs.
- Criticism of the missing mmap baseline
- A commenter noted there's no comparison to llama.cpp with mmap and no explanation of how the MoE predictor works.
- Another said an earlier similar experiment found mmap incurs significant overhead.
- Explanation of why it beats OS paging
- A commenter explained kernel page faults are reactive and can't prefetch the next layer.
- They argued transformer layers run sequentially so prefetching works, and the neuron cache acts as a domain-specific eviction policy.
- Concerns on SSD wear and macOS behavior
- One commenter worried heavy NVMe use could hurt longevity.
- Another corrected that macOS has no OOM killer as the README says; it slows down and panics instead.
- Bandwidth drives speed, per one commenter
- A commenter said M4 Pro is 273GB/s and M4 Max 546GB/s, so Max decodes about 2x faster.
- They suggested a 64GB M4 Max as the sweet spot for Hypura.
How to Apply
- Run hypura inspect to see if your model fits
- Build with cargo build --release on a Mac and run hypura profile once.
- Run hypura inspect on your GGUF file to see the placement plan without loading it.
- Start with --max-tokens 10.
- Use big models only for overnight or batch jobs
- At 0.3 tok/s, 70B models are not for chat, so use them for summarization or classification.
- Start hypura serve and call it from a queue-based worker.
- Point your OpenAI SDK base_url at Hypura
- Change base_url in existing code to http://127.0.0.1:8080/v1.
- Use any string as api_key.
- Swap between local and cloud models with the same code to compare.
Try It
# Run in a macOS terminal (needs Rust 1.75+ and CMake)
# 1) Install and start the server
git clone --recurse-submodules https://github.com/t8/hypura.git
cd hypura && cargo build --release
./target/release/hypura profile
./target/release/hypura serve ./model.gguf &
# 2) In another terminal: pip install openai
python - <<'EOF'
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="hypura")
r = client.chat.completions.create(
model="default",
messages=[{"role": "user", "content": "Explain storage-tier inference in one paragraph."}],
stream=True,
)
for c in r:
if c.choices[0].delta.content:
print(c.choices[0].delta.content, end="", flush=True)
print()
EOFTerminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls