Skip to content

Releases

v0.2.4

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 23:56
c142471

What's New

DFlash2 Speculative Decoding Preserved Across Prefix Cache Hits (Metal + CUDA)

  • Snapshot & restore DFlash2 5-layer SWA draft KV cache: save_boundary_snapshot and restore_boundary_snapshot now also save and restore DFlash2's 5-layer SWA KV cache on both Apple Silicon (src/metal/model_metal.mm, ~40.5 MiB/snapshot accounted for in est_kv_gib_with_snaps) and CUDA / DGX Spark (src/dspark.hpp, src/dspark.cu, src/model.cu).
  • Seamless spec=df2 continuation on cached turns: OpenAIServer tracks per-snapshot DFlash2 validity and position (snap_dspark_valid / snap_dspark_pos), resuming commit_dspark_context on the uncached suffix when restoring a valid DFlash2 snapshot.
  • Verified live on Apple M4 16 GiB Mac Mini:
    • Turn 2 (2,246 tokens, cached=2176, omitting reasoning_content): TTFT 1.48 s (vs 43.76 s cold, 29.6× faster) and decode 24.99 tok/s with spec=df2(mean_a=5.25) (vs 13.19 tok/s with spec=off in v0.2.3, +89.5% faster decode) with 100% bit-exact greedy parity against cold prefill.

v0.2.3

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 23:36
57d7b9f

What's New

Prefix Caching on 16 GiB Apple Silicon Macs

  • Adaptive 1-snapshot RadixPrefixCache on low_mem single-slot Macs: On single-slot 16 GiB Macs (gpu_low_mem && max_slots == 1), automatically allocate 1 boundary snapshot (~0.20 GiB) when it fits within the existing KV memory budget without reducing max_seq_len (e.g. Apple M4 16 GiB: est KV 0.95 GiB <= 1.12 GiB, actual 0.91 GiB at full 32,768 context). Multi-turn chats (including clients like pi that omit prior reasoning_content) now reuse the full block-aligned prompt prefix with 100% bit-exact greedy parity — verified live on Apple M4 16 GiB dropping 2.2K-token Turn 2 TTFT from 43.1 s -> 1.49 s (28.9× faster, cached=2176/2246).
  • 0-byte in-place slot prefix caching fallback (num_snapshots == 0): When a tighter memory budget requires num_snapshots == 0, single-slot servers retain the idle slot's KV/SConv/DFlash2 state and track exact forwarded tokens (match_inplace_slot_prefix) for lossless exact-extension reuse with 0 bytes of extra GPU memory.

v0.2.2

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 22:52
a1e4768

What's Fixed & Improved

Server Reliability

  • Clamp max_tokens to remaining context capacity: Only return HTTP 400 (prompt exceeds max_seq_len) when prompt_len >= max_seq_len; otherwise clamp max_tokens to [1, max_seq_len - prompt_len] at both HTTP intake and prefill initialization (fixes HTTP 400 rejections for clients like pi that send max_tokens: 32768 on top of a prompt).
  • SSE keepalives & prefill/queue cancellation: Send SSE : keepalive\n\n comments every 5 seconds while waiting for prefill or buffering long tool calls so reverse proxies / CDNs (e.g. Cloudflare 100s idle timeout) and clients do not drop long-context streams mid-prefill with Stream ended without finish_reason. Detect broken client sockets (while preserving SHUT_WR half-closed clients), cancel abandoned requests during queueing and chunked prefill, and synchronize cancellation telemetry with worker completion.

Apple Silicon (Metal) Performance

  • Tiled simdgroup_matrix FP8 GEMM (fp8_gemm_tiled_kernel): Added a 32x32 tiled FP8->BF16 simdgroup_matrix GEMM kernel for M >= 9 in encode_linear_fp8, replacing the 1-token-per-row fp8_gemv_kernel fallback on low_mem (16 GiB) Apple Silicon GPUs where BF16 dense weights are released. Measured +22.4% faster 16K prefill on Apple M4 16 GiB (35.6 -> 43.5 tok/s, saving ~83 s on a 16K prompt) with 0 bytes extra GPU memory.

warpgrid v0.2.1

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 17:59
ccbe30b

warpgrid v0.2.1 optimizes Apple Metal KV memory usage and budgeting for 16 GB Apple Silicon Macs, cutting single-slot Q3 + DFlash 2 KV overhead by ~270 MiB and unlocking 16K context out of the box — and 32K context (--max-seq-len 32768, 0.71 GiB KV, 722 ms warm TTFT, 23.06 tok/s) with sudo sysctl -w iogpu.wired_limit_mb=14336.

What's New & Fixed

  • Skip duplicate local-SWA snapshot pool on single-slot 16 GB Macs: Avoids allocating ~240 MiB of redundant local-SWA prefill snapshots when low_mem && max_slots == 1, freeing GPU wired memory directly for longer global context.
  • Actual checkpoint size + exact 5-layer DFlash 2 KV budgeting: Uses the real safetensors file size on disk, accounts for low_mem BF16-dense release, and models DFlash 2's fixed 5-layer × 2072-token sliding window accurately.
  • Hardware-verified on 16 GB Apple M4 Mac mini with cglab-org/Inkling-2-Mini-Q3-warpgrid + incoai/Inkling-2-Mini-DFlash2 (--max-chunk 256 --max-seq-len 32768 with iogpu.wired_limit_mb=14336): 0.71 GiB KV, 722 ms warm TTFT, 23.06 tok/s (mean_a = 4.00), exact Canary 323, 8% free system memory with desktop apps running.

Prebuilt Binaries

Asset Platform Requirements
warpgrid-v0.2.1-macos-arm64.tar.gz Apple Silicon (arm64, Metal) macOS 15.0+ (embedded precompiled .metallib, links Apple system frameworks only)
warpgrid-v0.2.1-linux-aarch64-dgx-spark-cuda13.tar.gz NVIDIA DGX Spark (aarch64, GB10 sm_121a) Linux aarch64 with CUDA 13.0 runtime (libcublas.so.13, libcublasLt.so.13)

Verify checksums with SHA256SUMS.txt:

shasum -a 256 -c SHA256SUMS.txt

warpgrid v0.2.0

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 17:21
283cb21

warpgrid v0.2.0 introduces Cross-Slot Paged Global KV (Radix Prefix Cache) and Chunked Prefill Interleaving across both NVIDIA Blackwell CUDA (sm_121a) and Apple Silicon Metal.

What's New

  • Cross-Slot Paged Global KV (block_size = 64):
    • Shared physical FP8 E4M3 global KV block pool with d_block_tables indirection across all CUDA (CUDA-graph-safe) and Apple Metal global attention kernels.
    • Reference-counted RadixPrefixCache with LRU leaf eviction and pinned boundary snapshots (local SWA ring + sconv states) so concurrent slots share identical system prompts with zero global KV duplication.
    • Leader/follower concurrent prefix deduplication: when multiple queued requests share an uncached system prompt, the leader prefills and publishes the shared prefix once before followers are admitted.
  • Chunked Prefill Interleaving:
    • Shortest-remaining-prefill-first admission combined with chunked prefill (--max-chunk) interleaved with 4-step decode bursts so cache-hit and active decoding streams are no longer head-of-line blocked behind incoming 30K+ cold prefills.
  • HTTP Hardening:
    • Case-insensitive Content-Length header parsing (parse_content_length) fixing large POST bodies from clients like Python urllib that send Content-length:.

DGX Spark Benchmark (c = 8 @ ~30K, 4 shared system prompt / 4 unshared)

Scenario Shared Half (29,992 tok) Unshared Half (30,011 tok) Shared vs. Unshared TTFT Gap
Round 1 (cold shared, leader + 3 followers) 34.86s med (3/4 hit 29,952) 107.62s med (61.9–150.4s) 3.1× faster TTFT
Round 2 (warm shared vs. fresh unshared) 1.58s med (4/4 hit 29,952, 99.87%) 80.49s med (34.8–123.2s) 51× faster TTFT

Prebuilt Binaries

Asset Platform Requirements
warpgrid-v0.2.0-macos-arm64.tar.gz Apple Silicon (arm64, Metal) macOS 15.0+ (embedded precompiled .metallib, links Apple system frameworks only)
warpgrid-v0.2.0-linux-aarch64-dgx-spark-cuda13.tar.gz NVIDIA DGX Spark (aarch64, GB10 sm_121a) Linux aarch64 with CUDA 13.0 runtime (libcublas.so.13, libcublasLt.so.13)

Verify checksums with SHA256SUMS.txt:

shasum -a 256 -c SHA256SUMS.txt

warpgrid v0.1.0

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 02:23
fa9d2af

Initial public release of warpgrid — a standalone C++20/GPU LLM inference engine for unified-memory workstations and local accelerators with native NVIDIA Blackwell CUDA (sm_121a) and Apple Silicon Metal backends.

Highlights

  • Native Inkling-2-Mini NVFP4/MXFP8 & Q3_G64 / Q2_G64 inference with zero Python/PyTorch/MLX runtime dependencies.
  • Native DFlash 2 block-diffusion speculative drafter (--dflash2) on both CUDA (100% CUDA-graphed) and Apple Metal — loads incoai/Inkling-2-Mini-DFlash2 directly.
  • 16 GB Apple Silicon support via cglab-org/Inkling-2-Mini-Q3-warpgrid (25.45 tok/s code with DFlash 2, 90.0% HumanEval on M4 Mac mini).
  • Continuous batching (up to 8 slots × 139K context) with FP8 E4M3 global KV cache and exact prefix caching (usage.prompt_tokens_details.cached_tokens).
  • Observability & Auth: OpenAI-compatible HTTP/SSE server (/v1/chat/completions, /v1/models), /health, /status, Prometheus/Datadog /metrics, optional OTLP/HTTP tracing (--otlp-endpoint), and optional API key auth (--api-key / WARPGRID_API_KEY).

Prebuilt Binaries

Asset Platform Requirements
warpgrid-v0.1.0-macos-arm64.tar.gz Apple Silicon (arm64, Metal) macOS 15.0+ (embedded precompiled .metallib, links Apple system frameworks only)
warpgrid-v0.1.0-linux-aarch64-dgx-spark-cuda13.tar.gz NVIDIA DGX Spark (aarch64, GB10 sm_121a) Linux aarch64 with CUDA 13.0 runtime (libcublas.so.13, libcublasLt.so.13)

Verify checksums with SHA256SUMS.txt:

shasum -a 256 -c SHA256SUMS.txt