Skip to content

v0.2.2

Choose a tag to compare

@cglab-public cglab-public released this 25 Nov 22:52
· 7 commits to main since this release
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.