Skip to content

sushi v1.9.0-dev2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 01 Dec 23:37
· 36 commits to main since this release

v1.9.0-dev2 — Faster inference, instant warm loads, and total-RAM memory planning

Performance & Kernels

  • Zero-copy INT8 NAX prefill on M5 Macs: Affine, MXFP8, and STQ packs now fuse norm and activation quantization directly into INT8 NAX matmuls across DeepSeek-V4.1, Qwen3.8, Hy4-Flash, and GLM-5.3, cutting prefill latency and peak activation memory.
  • Faster DeepSeek-V4.1 and Hy4-Flash on M5 Ultra: With new EXL3 PAIR1, attention, and indexer kernels, resident DeepSeek-V4.1 STQ 2.7bpw prefills up to 38% faster at 128k (2,453 → 3,394 tok/s on code; 3,608 tok/s peak at 32k) and decodes 17% faster on average with DSpark (139.5 → 163.2 tok/s), while Hy4-Flash STQ 4bpw prefills up to 25% faster at 128k over v1.8.0.
  • M1–M4 SIMD and two-Mac tensor parallel: Dedicated non-NAX SIMD attention and GEMM paths speed up Hy4-Flash STQ 4k cold prefill ~3.2x on M1 Max (70 → 223 tok/s), and two-Mac DeepSeek-V4.1 (TP=2) adds direct Zig JACCL decode plus a Thunderbolt 5 receive-length fix.
  • Precompiled Metal library and fast warm reloads: All Sushi Cooler kernels now ship precompiled in sushi.metallib, with GPU pipelines and memory plans cached on disk (archive.bin and .plan.bin) so loads and requests never compile Metal source at runtime. Hy4-Flash STQ 2.25bpw cold loads drop from 84 s to 53 s, warm reloads finish in ~6–9 s on Hy4-Flash 4bpw and ~16 s on 400 GB DeepSeek-V4.1 2.7bpw on M5 Ultra, and function-constant folding keeps the release archive increase to ~25 MB.

Memory, Model Discovery & Packs

  • Total-RAM streaming budget (--memory-budget-gb): Set one total-RAM ceiling (e.g. --memory-budget-gb 46 or memory_budget_gb in settings) for SSD-streamed models; Sushi automatically reserves space for KV cache, vision, and serving overhead so weights and runtime stay inside that exact limit.
  • Offline memory breakdown and load preview: sushi memory-bill <pack> (text and --json) prints a pack's memory bill from headers without waking the GPU, and GET /v1/models/load-preview plus the WebUI Models view preview how a model fits alongside already-loaded models before loading.
  • More cached experts on streamed Hy4-Flash, and DeepSeek 2.7bpw on 64 GB Macs: Hy4-Flash now fills expert slabs in place, freeing ~2.4–4.3 GiB of staging memory for 27–56 extra cached experts per layer. sushi pull and sushi list also mark DeepSeek-V4.1-Flash STQ 2.7bpw as runnable from 64 GB Macs via SSD streaming with --expert-cache-bias (recommended from 256 GB fully resident).
  • Hugging Face Hub cache discovery (--hf-cache): Pass --hf-cache to sushi serve, sushi run, or sushi list (or toggle it in the WebUI) to discover and serve compatible models read-only from your local Hugging Face cache without duplicating weights. When macOS privacy settings block an external drive in the WebUI folder picker, Sushi now names the required System Settings permission instead of reporting "Not a folder".

Concurrency & Prefix Cache

  • Batched speculation and non-blocking prefill: Resident and eligible SSD-streamed DeepSeek-V4.1 and Hy4-Flash loads now batch concurrent requests with grouped DSpark / DFly2 speculation, and Qwen3.8-Flash-Next widens batched decode/verify to 16 rows while keeping concurrent MTP active across interleaved prefills. Incoming requests interleave between chunks of a long prefill so short prompts answer without waiting behind the full prompt, active streams keep decoding during prefill and SSD expert fills, finished replies free their slots immediately, and co-resident models share the GPU fairly.
  • Live conversation state in RAM: Batched DeepSeek-V4.1, Hy4-Flash, and --prefix-cache-mem loads keep active conversations in memory between turns (up to max_concurrent, evicted oldest-first on demand), and edited Hy4-Flash turns plus cached Qwen3.8 speculative replies release unused max_tokens reservations.
  • Smarter prefix matching, sequential SSD restores, and multi-image caching: Follow-up turns match cached assistant replies by text even when re-tokenizing chat history produces different token splits. Long DeepSeek-V4.1 and Hy4-Flash SSD restores now read sequentially in large chunks and yield between segments so active streams do not stall, SSD cache budgets count actual on-disk bytes (shared blocks once), and long multi-image conversations reuse cached prefixes across earlier images within memory caps.

API, Parsing, Observability & Breaking Changes

  • Reliable tool calls, stop sequences, and thinking blocks: Quoted <tool_call|> closers and stray tags before <|channel> or <think> no longer hide later tool calls or misroute visible text into reasoning, and client stop sequences now match across structural tags. Streamed and non-streamed outputs stay identical across multi-thought turns without leaking internal markers or split UTF-8, reasoning_tokens counts exact generated tokens, and DeepSeek-V4.1 chat rendering adds reminder and task tokens.
  • Accurate timings, req=N logs, and zero idle wakeups: Grammar-constrained JSON and forced tool calls on Sushi Cooler no longer count tail-prompt evaluation as decode time, and timings.prompt_ms excludes prefix-cache restore time. Server logs add uptime stamps and req=N request tags across all endpoints, /metrics breaks down waiting, prefilling, and decoding requests (with histograms up to 300 s and 1M tokens), /props reports total_slots, ledger peak memory, and the active drafter, and idle timer wakeups in sushi --serve and sushibar are eliminated.
  • Runtime and HTTP hardening: Fixes memory-saturation admission checks, GPU buffer/pool teardown and speculative rollback edge cases, and HTTP/WebSocket body timeouts and framing limits.
  • Removed and deprecated controls: --think-penalty, per-model think_penalty and logit_bias_file, the WebUI "Shorter thinking" control, and logit_bias are removed (saved model-settings.json files load with a warning; non-zero think_penalty or non-empty logit_bias request fields return HTTP 400). tool_choice: "none" now stops generation at a tool-call opener across all models, and weights-only --ssd-budget-gb is deprecated in favor of --memory-budget-gb (slated for removal in 2.0).

Thanks to @STRML for DeepSeek-V4.1, EXL3 PAIR1, Engram, two-Mac JACCL TP=2, Thunderbolt 5, and 64 GB streaming contributions; @catalinb13 for Qwen3.8 QSA attention and EXL3 projection optimizations; @FramedStone for DeepSeek-V4.1 reminder and task template tokens; and @InfernalDread, @lin16303, @balr0g, and @cyrilmhansen for the bug reports, logs, and feature requests behind this pre-release.