Repository navigation
basal 3.0.3 (2 December 2026). The first 3.x release, after 2.8.1. It brings the 3.0 engine, two opt-in engines for Bielik /
Llama models (--llama-graph on on NVIDIA GPUs, --mlx-forward metal on Apple Silicon), looped models (VarLoop,
preview), and two model families: basal-3.0, built on Bielik v3.0 and read two-way, and basal-omni-2.0, built
on Gemma 4. From this release basal-engine and basal-sdk are on PyPI, basal-client on npm and the basal-serve
image on ghcr.io. Contributions from Miłosz Kucharski, Dariusz Koryto and Paweł Kiszczak.
Upgrading from 2.x: uninstall basal first. The server's package is now basal-engine. Installed over 2.x's
basal, both packages share the same basal/ files, and uninstalling basal afterwards deletes them. The import name
and every command stay the same. Details: UPGRADING.
Launch models. Each port is built from the model in its row.
| Model | Base | Ports |
|---|---|---|
| basal-3.0-mini (4.5B, two-way) | speakleash/Bielik-4.5B-v3.0-Instruct | -FP8, -GGUF, -one-way-GGUF, -MLX-8bit |
| basal-3.0-max (11B, two-way) | speakleash/Bielik-PL-11B-v3.0-Instruct | -FP8, -GGUF, -one-way-GGUF, -MLX-8bit |
| basal-omni-2.0-mini | Gemma 4 E4B (google/gemma-4-E4B-it) | -GGUF, -MLX (both experimental: they read the two-way model one way) |
| basal-omni-2.0-nano | Gemma 4 E2B (google/gemma-4-E2B-it) | -GGUF, -MLX (both experimental: they read the two-way model one way) |
| basal-omni-2.0-max | Gemma 4 12B (google/gemma-4-12B-it) | no ports |
Results are on each model card.
What was compared. On 8 November 2026, the 3.0 development tree at 7afc3bf was compared with 2.8.0 on an RTX PRO
6000 Blackwell. basal-omni-1.0-mini in --mode fast (also with --media on and with the state cache on disk) and
basal-2.0-4.5B in --mode fast answered byte for byte as 2.8.0, apart from the changes named below. 2.8.1 answers as
2.8.0, apart from its -FP8 refusals. The answer changes known from 2.8.1, including those made after 7afc3bf:
--mode fp8(torchao FP8 on the Llama-based basal-2.0 models) answers the same at every cold start, on an H100
and on an RTX PRO 6000 Blackwell, and starts sooner. Its compiled kernels no longer time their block shapes at each
start. The answers differ from 2.8's, which differed from one start to the next anyway: two 2.8 starts of
basal-2.0-mini agreed on 0 of 36 answers byte for byte.--mode fast(bf16),--mode nvfp4and the-FP8
checkpoints are unchanged.- A long
ranklist with"chunk": 0is read in requests of 50 candidates once its state is over 16,384 tokens,
where one shared context is slower: 1.4× the time at 17,700 tokens, 2.7× at 40,000 and 6× at 84,000
(basal-omni-1.0-mini, RTX PRO 6000,--mode fast). Each candidate is judged beside the 49 others of its request; the
final choice still reads the shortlist together. Shorter lists are read as before. "think": "off"holds for anextractfield's span decision (servers started with--think auto,
experimental). Only requests with"think": "off"and anextracttext field change.- Concurrent long requests under
--long-lane auto(the default) are answered by the main lane's graphs, the path
a single client gets, so their answers move in the last digits, closer to the one-client answers. Requests alone on
the server are unchanged. - basal-omni on a Mac's GPU (
--mode eagerandmpson Apple Silicon): requests in flight together are no longer
batched into one engine call, so each is answered as it is alone, byte for byte. Batching moved some of them by up
to 0.013. The MLX engine, the default on Apple Silicon, batches as before. --mode ollamaanswersextracttext and list fields over documents of more than 19 lines, which were refused
with HTTP 422. A value can change where a line's candidate spans are now capped at 19. Other engines are
unchanged.- An
extractrequest'searly_exitholds for its second round too (--mode fast-exit): onlyextract
requests withearly_exitand a text or list field change.
New engines (opt-in; without them every model is served as before):
- Bielik / Llama (
--llama-graph on;--mode fast,fp8andint8): a pure-Triton CUDA graph forward that reads
a request of several questions over its shared state in one pass. It serves ModelOpt-FP8checkpoints, 128×128 block
FP8 / INT8 weights (--fp8-scaling block,--mode int8,--quant-load cpu), and two-way Llama models (basal.json
"two_way"). It has its own label and calibration file (CALIBRATION.llamagraph*.json); served with another
engine's file, its answers are marked"calibration": "unvalidated". On an H100, against--llama-graph offon the
same Bielik weights: top-1 agreement of 1.000 in bf16 on the bundled decisions, a 5× to 17× faster cold start and
2.1× to 3.1× the throughput. - Apple Silicon (
--mode mlx --mlx-forward metal): Metal kernels for Bielik / Llama models, with shared-prefix
attention without copies and two-way reading. It has its own calibration file (CALIBRATION.mlx.metal.json). On a
48 GB Apple M4 Pro: 14% to 33% higher batched throughput, and state-cache hits up to 1.68× faster. - Looped models (VarLoop, preview) (
--mode fast,fp8,int8andeager): checkpoints with avarloop.json
run their middle layers more than once per read, with a confident first pass able to stop early
(--varloop-passes,--varloop-exit-tau). Models without avarloop.jsonare served as before. - FP8 for Qwen3.5 models (
--mode fp8, such as basal-omni-pico): the CUDA graph engine quantises the projections
as it loads the model, per row (the default) or in 128×128 blocks. Only the model shapes that kept the paired
accuracy check against bf16 are served, each with its ownCALIBRATION.fp8.json;--fp8-experimental onserves
another shape with a start-up warning of its measured trade-off.
New kinds of models (--mode eager, fast, fast-nocompile):
- Dual models (basal.json
"dual") read a one-question request two-way, and a request of several questions over a
state prefix read both ways once, in groups of at most 4 questions (--dual-reading auto, the default). The prefix
reading takes its own calibration file when the model ships one (CALIBRATION[.<engine>].header.json). - Prefix-bidirectional models (basal.json
"prefix_bidir") are served the way they were trained.
Requests and answers:
GET /v1/capabilities(also through basal-router, with the router's own limits) tells a client what the server
takes before it sends a request. It holds no path, key or host name."errors": "per_question"(opt-in): one invalid question no longer fails a request of many."trace": trueadds, per question, the candidates, probabilities, the threshold applied, the action and the
reason in a sentence. The answers are the same bytes as without it.extractlist fields (experimental) read the lines of an invoice or an order: nothing is generated, and every
value has character offsets. The models are not yet good at it: on the 16 made-up documents of
tests/data/extract_line_items.jsonl, basal-omni-1.0-mini got the number of items right in 7 of 18 lists and 11 of
54 items fully right. Check it on your own documents first.- Images and audio as files:
/v1/systemoneand/v1/basalalso takemultipart/form-data. --chat-classify on(off by default):POST /v1/chat/completionsanswers an LLM gateway's "pick 1..n or 0" chat
prompt with one calibratedchoicedecision, with OpenAI's error object for every error.- Decision rules (experimental):
basal-fit-decisionsfits a threshold or a score decoder on your own labelled
requests, kept only when it beats the model's own answer under held-out tests, andbasal-serve --decision-rules
applies it to requests that name the rule. A rules file fitted on another serving setup stops the server at start.
Requests without a rule are answered as before.
Serving and speed:
- A response cache (
--response-cache-mb, off by default), and the state cache on disk
(--state-cache-dir, off by default), also after a restart. Based on #79
by Paweł Kiszczak. DIR holds data derived from the prompts: keep it on a local disk only the server's user can read. - A stalled engine call no longer wedges a server (
--stall-s auto, the default): past 20 times its expected time,
and at least 300 s, it fails its requests with 503ENGINE_STALLEDand/healthanswers 503.--stall-exit on
exits for a supervisor to restart. Media requests are watched too. - Concurrent long requests no longer cost half the throughput (
--long-lane auto): basal-omni-1.0-mini at 8
clients went from 19.6 to 33.7 decisions/s on an H100 and from 7.5 to 27.2 on an RTX PRO 6000. The trade-off: a short
request may wait behind one main-lane call (0.74 s median at 8 clients on the H100, 0.02 s before).--long-lane eagerkeeps 2.8's rule. A long request no longer starves under a full queue, and one the long lane has no memory
for is handed to the main lane instead of failing with 503. - Shorter start-up of the CUDA graph engine (#107, Miłosz Kucharski), and
a longranklist in one context computes its state once (one-way models), 1.15-1.21× faster on an H100 with byte-identical
probabilities (the idea of Miłosz Kucharski, #112). - The rare HTTP 500 with
--mode fastand the state cache is fixed, without a lock.--state-cache-lockis still
accepted. - A rank question no longer fills the server with its own requests: at most 256 run at once, and at most half of
--max-requests(#142, Dariusz Koryto). - Block FP8 and int8 on an H100 run at their GEMM's speed (
--mode fp8,--mode int8): basal-omni-1.0-ultra went
from 2.3 to 5.3 requests/s at one client. The answers are byte-identical. - PyTorch 2.13 keeps the engine's compile settings in the server's threads, and Qwen3.5 models restart
without compiling their kernels again and take 1.7 GiB less GPU memory (basal-omni-pico). Answers are byte-identical. - basal-serve stops at start, before any download, on a host without a C compiler (
--mode fastneeds one, as in
2.x) and on a model without a chat template. --batches compactworks again on torch 2.11 off Hopper (the compact half of
#101 by Miłosz Kucharski).
basal-router: bounded by --max-requests (1,024 per replica by default); checks API keys itself (--api-keys,
--max-requests-per-key); and --prefix-affinity on / --state-holders on (off by default) send a growing state to
the replica that has its beginning cached (#109, based on Miłosz
Kucharski's proposal). Through the router, "trace": true explains the answer it returns.
Clients (Python and TypeScript):
basal-sdk, the Python client alone (pip install basal-sdk,import basal_sdk, httpx only). Code written
for 2.x (from basal.client import Basal) runs unchanged wherebasal-engineis installed.- A timeout per call, retries with jittered backoff, and
fail_open/failOpen(off by default). trace,errors="per_question"and media asfiles=on every call.- The TypeScript client runs in Cloudflare Workers and browsers (also Safari before 16.4), and refuses a 200 response
without answers (#143, Dariusz Koryto).
Tools:
- The decision log as calibration input, and an audit sample (
--log-decisions,--log-requests,
--review-sample), withbasal-feedback, which turns reviewed decisions intobasal-calibrateinput. The idea
and its design are by Dariusz Koryto (#57). basal-navigatereads PDF documents (basal-engine[pdf]), fits a calibrated cut-off for how many pages to open
(basal-navigate calibrate), and serves agents through the MCP toolsnavigateandread_page.basal-calibraterefits about 14× faster, with the same file bit for bit.basal-fold-temperature(new)
folds a calibrated temperature into a checkpoint for engines that read the model's logits as they are.- A local model's identity covers every tensor (
model_weights), so a calibration or rules file fitted on one
checkpoint is not taken for another that differs in one deep tensor. basal-export-ggufconverts basal-omni-pico to a GGUF that llama.cpp loads.
Install:
- A container image for
basal-serveon NVIDIA GPUs:docker pull ghcr.io/rkinas/basal-serve:3.0.3(CUDA 12.8,
torch 2.11.0, FlashAttention 3,basal-engine[fp8,media]). One volume keeps the models and the compiled code, the
server does not run as root, and a stalled server exits so that its restart policy starts it again. - torch
>=2.11,<2.15. The CUDA install (torch 2.11.0, CUDA 12.8 build) is unchanged. - Windows is checked on every change in CI.
Upgrading from 2.8:
- Two defaults change, and nothing is removed:
--stall-sisauto(2.8: off;--stall-s offgives 2.8's
behaviour), and--long-lane autokeeps a long request that fits the main lane's graphs in the main lane while no
short request waits there (--long-lane eagerkeeps 2.8's rule). Every other 2.8 flag keeps its default, and every
2.8 endpoint and command is still served. - One new limit by default: basal-router answers 503
OVERLOADEDbeyond 1,024 requests in flight per replica. - Prepared start-up: no launch model repository ships a
prepared/directory, so the first start of a model builds
its kernels, and later starts take them from the local cache. Directoriesbasal-preparewrote with 2.x are not
loaded by 3.0; runbasal-prepareagain to prepare a start. - New flags: basal-serve
--llama-graph,--varloop-passes,--varloop-exit-tau,
--fp8-experimental,--dual-reading,--decision-rules,--response-cache-mb,--response-cache-ttl,
--state-cache-dir,--state-cache-disk-gb,--state-cache-match,--stall-exit,--chat-classify,
--mcp-tree,--mcp-navigate,--log-requests,--review-sample,--review-secret,--require-graph-shapes,
and the values--mlx-forward metaland--long-lane eager; basal-mcp--tree,--navigate; basal-navigate
--pdf-max-mb,--pdf-max-pages,--pdf-seconds; basal-router--max-requests,--api-keys,--max-requests-per-key,
--prefix-affinity,--state-holders; new commandsbasal-fit-decisions,basal-fold-temperatureand
basal-feedback; new extrabasal-engine[pdf].
Thank you, Miłosz, Dariusz and Paweł! All changes: WHATS_NEW.
Install (after uv pip uninstall basal on a 2.x environment):
uv pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/cu128
uv pip install "basal-engine[fp8]"The Python client alone: pip install basal-sdk. The TypeScript client: npm install basal-client. A specific release
without PyPI: INSTALL.md (both packages from the release
archive).