Skip to content

BaseRT engine 0.5.6

Choose a tag to compare

@prabod prabod released this 01 Dec 16:35
2ed2602

BaseRT 0.5.6

Gemma 4 decodes nearly as fast served as it does on its own. On Macs, gemma-4-26B-A4B-it served through superfluid, as Local and basert serve do, now decodes within about 3% of the model run directly. On an M5 Pro (superfluid 0.2.2, eight lanes, --speculate off, temperature 0.2) it decodes at 80.9 tokens a second on a short prompt, against 72.2 in 0.5.5, and at 74.2 against 63.0 after a 7,100-token system prompt. On every model, requests that sample at a temperature above 0 now take the faster decode path. BaseRT on Macs can also run two new kinds of quantized weights, though no model BaseRT publishes uses them yet.

New

  • Two new weight formats on Macs. BaseRT can load and run weights quantized in a seeded Hadamard-rotated basis, for Qwen3.5 dense and mixture-of-experts models, and weights stored as 2-, 3- and 4-bit E8P lattice codebooks (QuIP#), for dense and mixture-of-experts layers. Both need files exported for them. A file that uses either format outside what this release supports is refused when it loads, with the tensor named.

Changed

  • Sampled requests take the fast decode path. A request with a temperature above 0 that decodes on its own used to wait for the CPU to pick each token. Its tokens are now picked on the GPU, inside the same pipelined decode that greedy requests already used. This holds for every model on Macs. Measured on gemma-4-26B-A4B-it at a temperature of 0.2 on an M5 Pro, one request decodes at 78.4 tokens a second, against 72.4 in 0.5.5. BASERTD_NO_CHAIN_SAMPLED=1 turns this off.
  • Sampling a token costs less on large vocabularies. On Macs, when the GPU picks tokens during decode, the sampler's passes over the vocabulary now run across many GPU cores instead of one. On gemma-4's 262,144-token vocabulary, picking a token takes 43 microseconds instead of 153 on an M5 Pro. The tokens chosen are the same as before.
  • Gemma 4 decodes faster when served. A served Gemma 4 request now runs the same fused attention setup that BaseRT runs directly, and on Macs attention over the cache reads four keys a step, as it already did outside a server. The 26B also no longer slows down with superfluid's default eight lanes, which give each lane a shorter context: after the 7,100-token system prompt it decodes at 74.2 tokens a second with eight lanes, against 69.2. Served greedy text can differ from 0.5.5's where two tokens were nearly tied. BASERT_G4_METAL_FUSED_QKV_PAGED=0 restores the previous attention setup.
  • Seeded sampling on one request. A seeded request at a temperature above 0 that decodes on its own now draws from the same random stream as requests decoding together. The same seed can give different text than in 0.5.5. The distribution tokens are drawn from is unchanged.

Fixed

  • Decoding no longer slows down when superfluid loads a speculative-decoding head. With superfluid's default --speculate auto, gemma-4-26B-A4B-it loads its MTP head. On Macs, the head's background thread, which keeps its memory resident, then held up every decode step. On an M5 Pro, a short prompt now decodes at 79.3 tokens a second with the default settings, against 69.8, close to the 80.1 of --speculate off.
  • The superfluid basert falls back to. When basert cannot read the list of superfluid releases on GitHub, it now installs superfluid 0.2.2, not 0.2.1.

The engine ABI is unchanged since 0.4.0, so superfluid 0.2.0 serves this engine. superfluid 0.2.3, released the same day, is the paired release.

See installation for every way to install BaseRT.