One endpoint, multiple GPUs
basal-router sends requests about the same document to the same replica, retaining cache benefits. Two H100s handled 1.58× as many requests as one, with twice as many clients. Scaling is not yet linear.
BASAL INFERENCE ENGINE 2.8 / CURRENT RELEASE 2.8.1
The model provides probabilities. The inference server turns them into an answer your application, workflow or AI agent can use.
basal-serve loads the weights, handles requests and returns typed, calibrated decisions. You choose the model and hardware. The way you ask questions stays the same.
Configurator 2.5: choose hardware, models, cache, replicas, a cascade or blending. Generate a script to install release 2.8.1 and start the server.
Open source · Apache 2.0 · your infrastructure
Release 2.5: multiple GPUs behind one endpoint, model cascades and blends, confidence controls, faster startup and a live dashboard. Measurements and release notes →
Requests · queue · calibration
One model per process; basal-router combines replicas and models behind one endpoint
choicenoulscoremultiacttoolclassifyverifycompressextractUpgrade the engine and enable new mechanisms when you need them. Compatibility testing on H100 with omni-1.0-mini, omni-1.0-max and pico confirmed default answers byte-for-byte identical to 2.4.1 in the tested configurations.
basal-router sends requests about the same document to the same replica, retaining cache benefits. Two H100s handled 1.58× as many requests as one, with twice as many clients. Scaling is not yet linear.
The pico → mini → ultra levels have separate escalation thresholds. The answered_by field identifies the model that answered. Mini → ultra achieved about 1.5× ultra’s throughput with accuracy within 0.5 percentage points; p95 latency was higher at 16 clients.
A blend of 0.6 ultra + 0.2 mini + 0.2 pico improved accuracy by 0.45 percentage points. Fallback to a self-hosted chat model added 1.40 points while taking 8.4% of questions. Blend and fallback outputs are not calibrated and can increase response time.
coverage returns a set of options for a requested coverage level. Abstain can withhold a decision below a certified threshold. Rereading and option-order averaging are additional, optional mechanisms. Check calibration and coverage on your own workflow data.
Prepared kernels cut measured pico startup from 287 to 72 seconds. Server and router dashboards show traffic, cache and replicas; their throughput impact stayed within 1%. Prometheus metrics, API keys, request IDs and HTTP 503 during warmup are also available.
Decisions API, a TypeScript client, LangChain, LlamaIndex and CrewAI tools, plus multi-model MCP. basal-attach prepares a chat model for decisions and calibration on labelled data; basal-finetune supports LoRA training. rank and basal-navigate provide experimental retrieval without an index.
Install 2.8.1. Patches 2.5.1–2.8.1 fix bugs without changing answers to valid requests, except the fixed cases: three in 2.5.4 and those listed in the 2.6.0 release notes ↗; since 2.5.2 a question of an unknown type gets HTTP 422, and since 2.8.1 an engine that can't read an -FP8 checkpoint's scales refuses it instead of returning wrong answers. Ultra FP8 state cache and certified thresholds for ready-made presets remain planned for future releases. Patch notes →
The weights hold what the model has learned. The engine determines how your program uses that knowledge.
Send the state, questions and allowed answers. The server checks the request structure and prepares the model input. You define the classifier with every call.
SOAM (State Once, Ask Many) lets several questions share the same state. The engine can also batch concurrent requests to make better use of the GPU.
It reads option probabilities, applies calibration and builds a JSON response. For cost-aware decisions, it computes the expected cost of actions and can return a deferral to a person.
vLLM, SGLang, MLX, Ollama and llama.cpp can run model computation. basal-serve provides the typed decision layer in front of them. Running the model in ordinary text-generation mode does not provide the same API.
Combine different question types in one request. basal-2.0 supports up to 255 options per question; Ollama mode has a limit of 20.
choiceWhich team should handle the ticket? You receive the selected option and a probability distribution.
noulDoes the description include an order number? The result is the probability of “yes”.
scoreHow urgent is the issue? Define ordered levels; the server returns their distribution and the expected level.
multiA complaint, delivery issue and refund request can all appear in one message. Each label has an independent probability; their sum does not have to equal 100%.
actexperimentalProvide the costs of actions for each possible outcome. The server selects the lowest expected cost, including when consulting a person is the best action.
toolexperimentalSupply tool definitions in MCP, OpenAI or Anthropic format. basal selects a tool, a direct answer, a question for the user or no suitable option.
classifyExperimentalYou give the labels and a short rubric for each. You get the label, a probability for every label and, optionally, “none of the above”. Up to 255 labels.
verifyExperimentalFor each statement: supported, contradicted or not stated by the state, with probabilities. Checks fields from another system or the sentences of a generative model's answer.
compressExperimentalThe sentences, lines or paragraphs of a document that a question needs, as shorter text for another model. Every part has a probability.
extractExperimentalValues copied exactly from the document, with character offsets, or chosen from an enum. No text generation, so a value always comes from the document.
"facts": "auto" adds computed dates and amounts to a Polish state. Code does the arithmetic; the model evaluates the facts against the process rules you describe.The four tasks introduced in 2.1 are available in engine 2.5 through the same API. The engine decomposes each task into model decisions over a shared state: the model does not write text, and each answer component has a probability.
{
"state": "I was charged twice for my card payment yesterday.",
"questions": {
"intent": {
"type": "classify",
"none": true,
"labels": [
{"name": "card_payment_duplicate", "rubric": "a card payment was taken more than once"},
{"name": "card_lost", "rubric": "the card is lost or stolen"},
{"name": "refund_status", "rubric": "asks about a refund in progress"}
]
}
}
}{
"type": "classify",
"label": "card_payment_duplicate",
"scores": {
"card_payment_duplicate": 0.9996,
"card_lost": 0.0002,
"refund_status": 0.0000,
"none": 0.0002
},
"confidence": 0.9996,
"automated": {"0.01": null, "0.05": null},
"experimental": true
}Historical measurement: basal-omni-1.0-max, engine v2.1.0, eager mode, bf16, one H100. Values are rounded to four decimal places; two consecutive calls returned identical answers.
classifyverifycompressextractautomated. true or false appears only with a threshold certified for that task (task_thresholds in the calibration file). Without one it is null: the thresholds of ordinary decisions do not carry over to new label sets (at a 1% target, 2 to 9% of automated answers were wrong).
| Task | Set | Questions | Result |
|---|---|---|---|
classify | CLINC150 “plus”, 151 labels including out-of-scope | 1 000 | 85.4% accuracy |
classify | BANKING77, 77 labels | 1 000 | 74.6% accuracy |
verify | VitaminC, three answers | 1 000 | 80.3% accuracy |
verify | RAGTruth, response vs source | 1 000 | 80.3% accuracy |
compress | QASPER, paragraphs, 30% of the characters | 248 | 90.1% of the needed paragraphs kept |
extract | synthetic PL / EN invoices, 12 fields | 400 | 90.1% of fields correct |
The max variant with extra training on the task formats. The mean over the six sets rises from 83.5 to 85.1. Overlap check: 27 test items (12 VitaminC, 15 QASPER) share a 13-word span with the training data; without them the gains are +4.2 and +2.7 points and the mean is still 85.1. On general decisions it is slightly below 1.0-max (Werdykt 0.821 vs 0.823), which stays the default model. Details on the model card.
basal does not write text. compress picks the parts of a document a question needs, a generative model writes the summary, and verify checks each of its sentences against the original. Unsupported sentences go to review.
The task API may change in a minor release. extract does not yet return lists of objects (invoice line items) or text fields from images. compress costs grow with the number of parts: a 5,000-word paper split into paragraphs takes about 27 s on an H100.
Full description and parameters: TASKS.md ↗ · every type on one page: QUESTION_TYPES.md ↗
The same entry point for decisions, with different ways to run the computation. Choose the mode to match your hardware, weights and application traffic.
| Environment | Mode | What to know |
|---|---|---|
| NVIDIA GPU · text | fastfast-nocompile | PyTorch with compilation and CUDA graphs. In 2.5 this also includes pico with state cache, prefix cache and compact batches on supported CUDA hardware. |
| NVIDIA GPU · FP8 | fp8 | FP8 requires a compatible GPU. Ultra on one 80 GB card: 53 instead of 74 GB and 1.35× bf16 throughput at 16 clients. Ultra FP8 state cache remains disabled in 2.5.0–2.8.1. int8 is available for Ampere, with NVFP4 also available for Blackwell. |
| Apple Silicon | mlxmps | MLX with a compatible port, now including pico, or PyTorch MPS. State cache works in MLX: a recurring 2.1k-token policy on a MacBook Air M4 went from 13.7 to 0.9 seconds. Use calibration for your chosen engine. |
| CPU and local GGUF files | eager --device cpugguf / ollama / llamacpp | PyTorch on CPU or GGUF. Ollama and llama.cpp use a separate server. llama.cpp with Vulkan also supports older cards, including GTX 10xx. LM Studio runs exported decision models without basal-serve. |
| Alternative CUDA servers | vllmsglang | The same basal API over another computation backend. The default context is 4096 tokens; change it with --max-len. |
| basal-omni · images and audio | eager --media onvllm (omni-1.1-max) | Media in eager mode with bf16 weights and the [media] extra; also vLLM for omni-1.1-max. mini and max support images and audio; ultra supports images and text. Measurements for omni-1.1-max through vLLM in 2.5: 2.7× requests/s for images and 2.9× for audio. Ports have their own requirements and modality support. |
Ultra also fits on a 48 GB card with suitable loading and graph-memory settings. NVFP4 on Blackwell delivers 2.3× scoring speed; int8 on Ampere retains 99.4% of the same top answers as bf16. These are different measurements and configurations, not guarantees for every task. See the release notes for details.
In a separate Python environment, with PyTorch matched to your hardware:
pip install "basal @ https://github.com/rkinas/basal/archive/refs/tags/v2.8.1.tar.gz"Once the weights are published and downloaded. Pico defaults to eager; fast, fp8 and nvfp4 do not support its architecture. Select CPU with --device cpu; the GGUF port is an alternative.
basal-serve --model Remek/basal-omni-pico \
--mode eager --host 127.0.0.1 --port 8000These examples use engine 2.3.2. Install PyTorch for your hardware and the required dependencies. For the 4.5B model, disable the template cache with --template-prefix off.
basal-serve \
--model Remek/basal-2.0-4.5B \
--mode fast --template-prefix off \
--host 127.0.0.1 --port 8000Requires the basal[mlx] dependencies and an MLX port. The command serves the same HTTP API on a local port.
basal-serve \
--model Remek/basal-2.0-4.5B-MLX-8bit \
--mode mlx --host 127.0.0.1 --port 8000Requires basal[media] dependencies and an NVIDIA GPU. The media field in the HTTP API carries images and audio. Split video into frames and an audio track first.
basal-serve \
--model Remek/basal-omni-1.0-mini \
--mode eager --media on \
--host 127.0.0.1 --port 8000Send JSON to POST /v1/systemone. In n8n, use an HTTP Request node; in an application, use a standard HTTP client or the basal Python or TypeScript client.
{
"state": "The parcel arrived damaged. Please replace it.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this issue?",
"criteria": {
"claims": "Complaints and product replacements",
"sales": "Questions before purchase",
"billing": "Invoices and payments"
}
},
"reply_needed": {
"type": "noul",
"instructions": "Does the customer expect a reply?"
}
}
}The answers field contains each question’s result under its name. choice returns an option key; noul returns the probability of “yes”. The response also includes model and usage, with the number of questions, tokens and computation time.
statequestionsanswersThis is a request definition, not a measured result. This example does not call the model.
GET /health Service healthGET /v1/models Models, thresholds and context limitsPOST /v1/basal Alias for the decision APIPOST /v1/decisions Decisions API interfaceGET /metrics Prometheus metricsMCP is a standard for connecting AI applications to tools. The basal engine provides its own MCP server: an agent can ask basal for a decision through the same connection it uses for other tools.
decideState, question and options. Supports choice, noul, score and multi. Returns the question’s answer and the model name.
decide_manyThe full questions map, as in the HTTP API. Also supports act with costs and max_error, tool, and facts. Returns answers, model and usage.
In 2.5 the MCP bridge can serve multiple models; list_models shows the available models, and the model parameter selects which one answers.
Both tools only return decisions. They do not execute commands, call other tools or generate their arguments. Execution and permission checks belong to the application using MCP.
basal-serve \
--model Remek/basal-2.0-4.5B \
--mode fast --template-prefix off \
--host 127.0.0.1 --port 8000 --mcp onMCP requires the optional basal[mcp] dependencies. It is off by default. When enabled, /mcp uses Streamable HTTP on the same port and shares the queue with /v1/systemone.
In a client supporting Streamable HTTP, add http://127.0.0.1:8000/mcp. Example for Claude Code:
claude mcp add --transport http basal http://127.0.0.1:8000/mcpIf the client starts tools as local processes, use the basal-mcp bridge. Replace the executable path with your own absolute path:
{
"mcpServers": {
"basal": {
"command": "/path/to/basal-env/bin/basal-mcp",
"args": ["--url", "http://127.0.0.1:8000"]
}
}
}The bridge forwards requests to the running server; it does not load a second copy of the model.
Arguments for a decide_many tool call. The tool definitions are options to choose from; basal does not execute any of them here.
{
"state": "The customer asks where order ZAM-42 is. Its status has not been checked yet.",
"questions": {
"next_step": {
"type": "tool",
"instructions": "Which tool is needed now?",
"tools": [
{
"name": "get_order_status",
"description": "Reads the current status of an order.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
}
},
"required": [
"order_id"
]
}
},
{
"name": "list_products",
"description": "Lists the available products.",
"inputSchema": {
"type": "object",
"properties": {}
}
}
]
},
"missing_order_id": {
"type": "noul",
"instructions": "Is the order number missing?"
}
}
}The tool type returns a selected tool name or the answer_directly, ask_user or none option. The agent supplies arguments and handles execution according to its permissions.
The model on your own device. You can run basal on HP ZGX Nano and connect clients through an SSH tunnel or your own gateway. In 2.5 the server and router support API keys (--api-keys), and the server can restrict CORS. Keys are stored as SHA-256 digests; configure TLS and permissions for network access. Processing in basal stays local, but an agent using a cloud LLM may separately send its context to that service.
The current MCP interface. The tools accept a text or JSON state. They have no media parameter: send images and audio for basal-omni through the HTTP API. MCP and the tool type are experimental; check decision accuracy on your own tasks.
The main server options. Run basal-serve --help to see all flags and their values.
| Option | Purpose |
|---|---|
--model / --mode | A repository or local weights directory, and the computation backend. Each server process loads the selected model. |
--calibration | Your own calibration file. By default, the server uses an engine-specific file when supplied, or the base CALIBRATION.json. |
--soam on | A shared state for multiple questions and option orders. On by default; the effects depend on the backend and request. |
--max-batch--batch-window-ms | Batch concurrent requests. Defaults: a maximum of 64 and a 3 ms window under load; with no queue, computation starts immediately. |
--scheduler | Schedule long and short requests in the CUDA engine. Turning it off restores arrival-order processing. |
--deterministic | Reproducible answers on the same machine, without batching different clients’ requests. Applies to in-process engines and may reduce throughput. |
--context-overflow | truncate cuts the middle of an oversized state and reports it in usage.truncated; refuse rejects the request instead. |
--template-prefix off | Recommended for basal-2.0 4.5B: the template cache did not pass this model’s check. Mini and max can use auto. |
--log-decisions | Log probabilities to a JSONL file for process analysis and later use of feedback. |
--mcp on--media on | An optional agent interface, or image and audio support in the basal-omni HTTP API. Both are off by default and require the appropriate dependencies. |
max_error in act and tool questions uses thresholds from the calibration file. A missing threshold defers the decision to a person. A 5% target does not guarantee that error on new data — measure coverage and accuracy in your own process.
Since 2.2, basal-calibrate fits temperatures and certifies thresholds on your labelled examples. --report-only evaluates accuracy, calibration and automation coverage without writing a file. No weight retraining; the server does not automatically learn from traffic.
--think auto is only for basal-2.0 4.5B, requires vLLM and is off by default. It reduced the Werdykt score. evidence requires a separate head that basal-2.0 models do not ship.