Repository navigation
Releases
Releases · srbryers/sinter
sinter v0.5.0
Highlights
- Single-pass GPU-batched continuous batching (
B = 1..4) across all 4 engine families: Concurrent HTTP streams on Qwen4 (qwen4_moe), Qwen3.6 / Hybrid MoE (qwen3_5_moe,qwen3_next), Standard MoE (qwen3moe,qwen2moe,mixtral,olmoe), and Dense GQA (qwen3,llama,mistral,qwen2) now decode together in a single GPU weight-read pass per step with independent lazily allocated KV, DeltaNet, QSA, and PLE caches and zero state-snapshot/restore copying. Solo requests keep the zero-overhead fast path (MTP / N-gram speculative decode and GPU greedy burst). - 1-dispatch persistent dense multi-slot megakernel (
dense_persistent_multi_slot): Fuses Embedding, all transformer layers, Final RMSNorm, Batched LM Head, and Per-Slot Argmax into one Metal 4 persistent dispatch with 16 KB threadgroup-SRAM activation caching (1.52xwall /1.63xdecode scaling onLlama-3.2-1B-Instruct-Q8_0,1.30xonQwen3-0.6B-Q4_K_M, bit-exact parity vsB = 1). - Native 8-bit (
Q8_0) Metal 4 kernels for Standard MoE:Q8_0,F16,BF16, andF32Standard MoE GGUF checkpoints stay at full 8-bit precision (68 B / 64 weights, zero 4-bit down-quantization) across persistent decode, MMA prefill, and multi-slot batching.
Verified Results (Apple M3 Ultra, Metal 4)
| Engine Family | Verified Model | Concurrent B = 4 Scaling |
Verification |
|---|---|---|---|
| Qwen4 Hybrid MoE | mlx-community/Qwen4-35B-A3B-4bit-text |
1.69x-1.71x wall (82.1-84.2 agg tok/s) |
4 independent PLE + DeltaNet + QSA streams + /v1/messages |
| Qwen3.6 Hybrid MoE | mlx-community/Qwen3.6-35B-A3B-4bit |
1.49x-1.67x wall (1.90x-1.95x pure decode) | Exact B = 2 GPU unit parity + 4-stream HTTP |
| Standard MoE (Native Q8) | Q8_0 qwen3moe GGUF (quant_bits=8) |
Single-pass B = 1..4 (68 B / 64 weights) |
Exact B = 2 argmax parity vs sequential B = 1 |
| Dense GQA (1-Dispatch Persistent) | Llama-3.2-1B-Q8_0 / Qwen3-0.6B-Q4_K_M / Qwen3-4B-4bit |
1.52x (246.8) / 1.30x (242.4) / 1.14x (94.5 agg tok/s) |
Bit-exact slot0 parity vs B = 1 |
All 20 Rust and Metal 4 GPU unit tests pass (cargo test --release -- --test-threads=1, zero compiler warnings).
Install / Upgrade
# Homebrew
brew upgrade srbryers/tap/sinter
# Or direct Apple Silicon installer
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.4.0
Highlights in v0.4.0
- Continuous Batching (
--max-batch 1..4, default4):- Dense models (MLX 4-bit & GGUF Q4/Q8): True single-pass GPU-batched multi-slot decode (
dense_attn_prep_multi_slot+dense_gqa_multi_slot, lazy per-slot KV cache pool reading every model weight matrix once for up to 4 concurrent sequences). Verified bit-exact greedy parity vs soloB=1onQwen3-0.6B-Q4_K_MandLlama-3.2-1B-Q8_0(244.8aggregate tok/s =1.41xsolo onLlama-3.2-1B-Q8_0). - Qwen4, Qwen3.6, and Standard MoE models: Non-blocking 16-token interleaved multi-slot scheduling so concurrent requests stream immediately without waiting behind long generations while keeping the zero-overhead solo fast path when 1 client is active. Verified live on
Qwen4-35B-A3B: a short request arriving mid-generation got its first token in437 msand finished2.7sbefore the concurrent 180-token stream. - Added
active_requestsandmax_batchtoGET /health.
- Dense models (MLX 4-bit & GGUF Q4/Q8): True single-pass GPU-batched multi-slot decode (
- Real Hugging Face MoE GGUF End-to-End Verification + OLMoE Support:
- Verified
bartowski/OLMoE-1B-7B-0924-Instruct-GGUF:OLMoE-1B-7B-0924-Instruct-Q4_K_M.gguf(olmoe, 16L, 64 experts top-8,Q4_K, 3.90 GB packed GPU weights) live throughsinter serveat 174–179 tok/s decode, 56.5 ms TTFT, and 2.80s cold GGUF load. - Added full-projection QK-norm (
MOE_QK_NORM_FULL),olmoeunnormalized top-k router weights (norm_topk_prob=false), and Tulu (<|system|>/<|user|>/<|assistant|>) chat template auto-detection.
- Verified
- Live Claude Code
2.1.296Verification & Hardening:- Verified real Claude Code
2.1.296directly againstsinter serve(Qwen4-35B-A3B+ MTP) viaPOST /v1/messageswith a liveReadtool call andtool_resultround-trip (num_turns: 2,is_error: false,9.48stotal,133 msTurn-2 streaming TTFT). - Raised Axum request body limit to
32 MBfor large multi-turn agent sessions and addedcache_read_input_tokensprefix-cache reporting to Anthropic streamingmessage_deltausage.
- Verified real Claude Code
Install / Upgrade
# Homebrew
brew upgrade srbryers/tap/sinter
# or fresh install
brew install srbryers/tap/sinter
# One-line installer (macOS Apple Silicon arm64)
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.3.0
sinter v0.3.0 (Apple Silicon, macOS 26 / Metal 4)
New Features
- Native Anthropic Messages API (
POST /v1/messages+POST /v1/messages/count_tokens): Direct Claude Code and Anthropic SDK support (ANTHROPIC_BASE_URL=http://127.0.0.1:8089 claude) with zero proxy — full streamingmessage_start,thinking_delta,text_delta,tool_use(input_json_delta),message_delta,message_stop, and multi-turntool_resultround-tripping. - Fixed Qwen4
</think>special-token splitting: Intercepts</think>,<tool_call>, and</tool_call>by token ID inStreamTextSplitterso thinking traces and final answers / tool calls always separate cleanly even when those tags are special tokens. - Native 8-bit (
Q8) Metal 4 Dense Kernel (68 B / 64 weights):Q8_0,F16,BF16, andF32dense GGUFs now run at true 8-bit precision directly on GPU insidesinter's single-dispatch Metal 4 persistent megakernel and MMA prefill GEMM instead of down-quantizing to 4-bit. Verified live onLlama-3.2-1B-Instruct-Q8_0.gguf(1.31 GBnative 8-bit private GPU arenas,216 tok/s,4.9 mscached TTFT). - Standard MoE & Hybrid MoE GGUF Loaders: Added pure-Rust GGUF loading for Standard MoE (
qwen3moe,qwen2moe,mixtral,olmoe,phimoe) and Hybrid DeltaNet + FullAttn MoE (qwen35moe,qwen36moe,qwen3next) checkpoints — includingssm_a = -exp(A_log)conversion verified against realQwen3.5-35B-A3B-Q4_K_M.ggufheaders and fused Q8 router packing.
Verification
- 18/18 release unit & real Metal 4 GPU tests pass (
3.47s, zero compiler warnings), including end-to-end GPU prefill + decode on Standard MoE (qwen3moe) and Hybrid MoE (qwen35moe) GGUF v3 files. - Verified live Anthropic
/v1/messagesstreamingthinking+tool_use+ Turn 2tool_result+/v1/messages/count_tokensonQwen4-35B-A3B. - Verified live native 8-bit
Llama-3.2-1B-Instruct-Q8_0.gguf(216 tok/s) and 4-bitQwen3-0.6B-Q4_K_M.gguf(305 tok/s).
Install / Upgrade
brew upgrade srbryers/tap/sinter # or: brew install srbryers/tap/sinter
# or:
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.2.0
sinter v0.2.0 (Apple Silicon, macOS 26 / Metal 4)
New Features
- Native OpenAI
tool_calls(streaming & non-streaming): Parses Qwen XML<tool_call><function=...>...</function></tool_call>, bare<function=...>(when special<tool_call>tokens are stripped), and legacy JSON<tool_call>blocks into structured OpenAItool_callsdeltas/messages withfinish_reason: "tool_calls"and schema-aware parameter typing. Verified end-to-end on a 2-turn Qwen4-35B-A3B agent loop. - Pure-Rust GGUF v2/v3 Support (
Q4_K_M,Q4_K_S,Q5_K,Q6_K,Q8_0,Q4_0,Q4_1,F16,BF16,F32): Load single-file dense GGUF checkpoints (Qwen3,Qwen2,Llama 3,Mistral) directly with zero external dependencies and no sidecar files — including embedded GGUF BPE tokenizer construction, automatic Llama/Mistral interleaved-RoPE conversion, parallel repacking into Metal 4 private arenas, and one-command Hugging Face GGUF downloads (sinter serve org/repo:file.gguf).- Note: GGUF weights are currently repacked into
sinter's 4-bit Metal 4 format at load time and support densellama/qwen2/qwen3/mistralGGUFs; native 8-bit kernels and MoE GGUFs are on the roadmap.
- Note: GGUF weights are currently repacked into
Verification
- All 14 unit and Metal 4 shader compilation tests pass.
- Verified live 2-turn streaming & non-streaming OpenAI tool-calling loop on
Qwen4-35B-A3B. - Verified live GGUF downloads & inference on
unsloth/Qwen3-0.6B-GGUF:Qwen3-0.6B-Q4_K_M.gguf(0.65s load, 5.6 ms cached TTFT) andbartowski/Llama-3.2-1B-Instruct-GGUF:Llama-3.2-1B-Instruct-Q8_0.gguf(0.86s load, 2.7 ms cached TTFT).
Install / Upgrade
brew upgrade srbryers/tap/sinter # or: brew install srbryers/tap/sinter
# or:
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.1.3
sinter v0.1.3 (Apple Silicon, macOS 26 / Metal 4)
Improvements
- Readiness-aware
GET /healthprobe: Returns HTTP503({"status":"loading","loaded":false}) while initial weights are loading in eager mode, and HTTP200({"status":"ok","loaded":true}) as soon as the model is ready (matchingllama-server/vLLMreadiness conventions).--lazymode still returns HTTP200immediately. Cuts first-request TTFT after/healthreadiness from ~11.9s (waiting on weight load) to ~308 ms. - Homebrew tap & client recipes: Added
brew install srbryers/tap/sinterplus copy-paste client setup snippets for Python (openaiSDK), Continue, Cline/Roo Code, and Open WebUI inREADME.md.
Install
brew install srbryers/tap/sinter
# or:
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.1.2
sinter v0.1.2 (Apple Silicon, macOS 26 / Metal 4)
Full M1/M2/M3/M4 Base, Pro, Max & Ultra GPU Portability
Fixed hardcoded threadgroup-count assumptions across all five persistent Metal 4 kernels (qwen4.metal, qwen4_spec.metal, qwen4_mtp.metal, qwen36.metal, qwen36_spec.metal) so Macs with fewer than 64 or 92 persistent threadgroups (every Base, Pro, 30/32-core Max, and 40-core Max in speculative mode) run 100% bit-exact while preserving the zero-overhead dual-die fast path on Ultra:
- Qwen4 DeltaNet & Qwen3.6 DeltaNet (
qwen4.metal,qwen4_spec.metal,qwen36.metal,qwen36_spec.metal): Strided slot/head loops whennum_tgs < 64(or< 32for Qwen3.6 spec) with exact dual-die mapping retained whennum_tgs >= 64. - Qwen4 & Qwen4 MTP Stage B1/B2 (
qwen4.metal,qwen4_spec.metal,qwen4_mtp.metal): Replaced fixedtgid < 18*B,tgid == 18*B,tgid == 18*B+1, andtgid < 16*Bchecks with strided work loops acrossnum_tgsplus trailing threadgroup barriers. - Qwen3.6 Stage B1 (
qwen36.metal): Replacedtgid < 18with a strided loop acrossnum_tgs. - Added
SINTER_PERSISTENT_TGSoverride insrc/metal4.rsfor testing or manually tuning persistent threadgroup counts.
Verification
- Verified bit-exact identical output (
1,094/1,094chars valid structured JSON) on Qwen4-35B-A3B across simulated Ultra (112TGs), 40-core Max (76TGs), 32-core Max (56TGs), Pro (28TGs), and Base (16TGs) in both MTP speculative (B=5) andB=1modes. - Verified bit-exact identical output on Qwen3.6-35B-A3B across
112,28, and16TGs in both MTP andB=1modes. - All 8 release unit & Metal 4 shader compilation tests pass.
Install
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.1.1
sinter v0.1.1 (Apple Silicon, macOS 26 / Metal 4)
Qwen4-35B-A3B Correctness & TTFT Improvements
- Fixed threadgroup WAR races on
s_aux[0..1]across all three Qwen4 PLE kernels (shaders/qwen4.metaldecode/prefill andshaders/qwen4_spec.metalverify) where SIMDgroup 0 overwrote shared scalar slots while SIMDgroups 1–7 still readinv_k,inv_q, andgate_val. Eliminates occasional duplicated punctuation/tokens and makesB=1and MTP speculative decoding 100% bit-exact (15/15deterministic repeats,8/8valid structured JSON with exactB=1 == specparity). - Fixed
grid_barrierdevice fence &p_spec_commit_plebarrier inshaders/qwen4.metalandsrc/qwen4.rs. - Parallelized 12 GB PLE page-cache warm-up across 4 sorted sequential NVMe reader threads (
~1.8sbackground warm-up instead of~8.5s, zero idle GPU power, zero extra wired RAM). - Parallelized PLE n-gram prefill lookups across 8 CPU threads for prompts with 8+ tokens.
- Trimmed
reset_state()KV/QSA zeroing to only the previously written prefix (0..prev_pos) instead of all 8,192 slots (~175 MB saved per fresh request).
Verified Qwen4-35B-A3B Benchmarks (M3 Ultra, 4-bit MLX)
- Cold first TTFT (
sinter serve, 114 tokens): 355 ms (down from 685 ms) - Warm uncached TTFT (
sinter serve, 114 tokens): 235 ms - Prefix-cached TTFT (
sinter serve): 10.4–11.0 ms - Single-token decode (
B=1): 104.4 tok/s - 4-workload MTP speculative decode: 120.4 tok/s (135–138 tok/s on live HTTP JSON)
Install
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shsinter v0.1.0 (Apple Silicon Metal 4)
Highlights
- Single self-contained Apple Silicon binary (zero Python, zero Homebrew, all Metal 4 shaders embedded).
- Native Qwen4-35B-A3B engine with 4-stream Hyper-Connections, zero-copy mmap PLE n-gram tables (~12 GB GPU RAM saved), QSA sparse attention, and native Qwen4 MTP speculative decoding.
- One-command pure-Rust Qwen4 MTP extractor: fetches only the ~484 MB MTP draft head over HTTP Range from Hugging Face instead of 22 GB.
- M3 Ultra live streaming vs Apple
mlx-lm 0.32.3(Qwen4-35B-A3B-4bit-text): 96.8 vs 31.2 tok/s decode (3.1x faster), 4.40s vs 12.28s wall-clock, 20.2 vs 31.3 GB GPU RAM (35% less). - Also supports Qwen3.5 / Qwen3.6 / Qwen3-Next Hybrid MoE, Standard MoE, and Dense Qwen3 / Llama 3 / Mistral 4-bit MLX checkpoints.
Quick Install
curl -fsSL https://raw.githubusercontent.com/srbryers/sinter/main/scripts/install.sh | shRequires Apple Silicon Mac with macOS 26 / Metal 4 runtime.