BASAL INFERENCE ENGINE 2.8 / CURRENT RELEASE 2.8.1

Your models.
One decision interface.

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 →

FROM QUESTION TO DECISION
ApplicationWorkflowAI agent
YOUR SERVERbasal-serve
local

Requests · queue · calibration

TEXTbasal-2.0
TEXT / IMAGE / AUDIObasal-omni

One model per process; basal-router combines replicas and models behind one endpoint

AN ANSWER FOR YOUR CODEDecision + probabilities
choicenoulscoremultiacttool
TASKSclassifyverifycompressextract
NEW / ENGINE 2.5

More scale. Control over every decision.

Upgrade 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.

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.

Cascade: a larger model when needed

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.

Blend and LLM fallback

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.

An answer, a set or abstention

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.

Faster startup and live monitoring

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.

Integrations and your own models

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 →

01 / BETWEEN THE MODEL AND YOUR APPLICATION

From weights to a running service.

The weights hold what the model has learned. The engine determines how your program uses that knowledge.

01

Accepts your rules

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.

02

Shares computation

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.

03

Returns the API response

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.

02 / ASK FOR A RESULT, NOT A PARAGRAPH

Six decision types.
Four tasks built from them.

Combine different question types in one request. basal-2.0 supports up to 255 options per question; Ollama mode has a limit of 20.

choice

One of the options

Which team should handle the ticket? You receive the selected option and a probability distribution.

noul

Yes or no

Does the description include an order number? The result is the probability of “yes”.

score

Scale-based assessment

How urgent is the issue? Define ordered levels; the server returns their distribution and the expected level.

multi

Multiple matching labels

A 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%.

actexperimental

An action with costs considered

Provide the costs of actions for each possible outcome. The server selects the lowest expected cost, including when consulting a person is the best action.

toolexperimental

The agent’s next tool

Supply tool definitions in MCP, OpenAI or Anthropic format. basal selects a tool, a direct answer, a question for the user or no suitable option.

classifyExperimental

Labels with a rubric

You 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.

verifyExperimental

Do the statements follow from the text

For 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.

compressExperimental

Only the parts you need

The sentences, lines or paragraphs of a document that a question needs, as shorter text for another model. Every part has a probability.

extractExperimental

JSON schema fields

Values copied exactly from the document, with character offsets, or chosen from an enum. No text generation, so a value always comes from the document.

Film (16 min, Polish narration, Polish and English subtitles): every question schema with a full JSON example, SOAM, the 2.1 tasks, calibration and thresholds. The probabilities in the film are for teaching — they are not model measurements.
Facts before the decision. "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.
03 / TASKS · EXPERIMENTAL

Tasks built from decisions.

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.

POST /v1/basal · classify
{
  "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"}
      ]
    }
  }
}
answers.intent · measured
{
  "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
}

A real model answer

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.

classify
Labels with a rubric; one label or several (multi_label).
verify
Statements: supported, contradicted, not stated by the state.
compress
One yes/no question per part; the most needed parts are kept.
extract
For a text field: which line, then which span of that line. The value is always exact text of the document.

automated. 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 results · basal-omni-1.0-max · engine v2.1.0 · tested on test sets (5 public, 1 synthetic)
TaskSetQuestionsResult
classifyCLINC150 “plus”, 151 labels including out-of-scope1 00085.4% accuracy
classifyBANKING77, 77 labels1 00074.6% accuracy
verifyVitaminC, three answers1 00080.3% accuracy
verifyRAGTruth, response vs source1 00080.3% accuracy
compressQASPER, paragraphs, 30% of the characters24890.1% of the needed paragraphs kept
extractsynthetic PL / EN invoices, 12 fields40090.1% of fields correct

basal-omni-1.1-max · from 17 Oct

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.

Summaries with another model

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.

Limitations

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 ↗

04 / CHOOSE YOUR ENVIRONMENT

Server, Mac or CPU.

The same entry point for decisions, with different ways to run the computation. Choose the mode to match your hardware, weights and application traffic.

EnvironmentModeWhat to know
NVIDIA GPU · textfast
fast-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 · FP8fp8FP8 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 Siliconmlx
mps
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 fileseager --device cpu
gguf / 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 serversvllm
sglang
The same basal API over another computation backend. The default context is 4096 tokens; change it with --max-len.
basal-omni · images and audioeager --media on
vllm (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.

Install engine 2.8.1

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"
basal-pico on CPU or GPU

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 8000
Run text-only basal-2.0 on a GPU

These 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 8000
Run on a Mac with MLX

Requires 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 8000
Run basal-omni with images and audio

Requires 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 8000
05 / FOR APPLICATIONS AND WORKFLOWS

One state. Several questions.

Send 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.

POST /v1/systemone
{
  "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?"
    }
  }
}

A response your code can use

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.

state
The facts and rules needed for the decision.
questions
Separate questions about a shared context.
answers
Typed results and probabilities.

This 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 metrics
06 / MODEL CONTEXT PROTOCOL · EXPERIMENTAL

The agent asks.
basal helps choose the next step.

MCP 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.

Watch the MCP demo in Herdr Codex · local basal · Claude Code · 6:32 film
  1. 01 / AGENTCollects the state and options
  2. 02 / BASAL VIA MCPReturns a decision and confidence
  3. 03 / AGENT OR APPLICATIONExecutes an allowed action
decide

One question

State, question and options. Supports choice, noul, score and multi. Returns the question’s answer and the model name.

decide_many

Several questions about one state

The 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 / MCP
basal-serve \
  --model Remek/basal-2.0-4.5B \
  --mode fast --template-prefix off \
  --host 127.0.0.1 --port 8000 --mcp on

MCP 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.

Connect an MCP client: HTTP or stdio

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/mcp

If 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.

Example: choose a tool and check for missing information

Arguments for a decide_many tool call. The tool definitions are options to choose from; basal does not execute any of them here.

MCP / decide_many
{
  "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.

07 / CONTROL OVER EXECUTION

Settings for your process.

The main server options. Run basal-serve --help to see all flags and their values.

OptionPurpose
--model / --modeA repository or local weights directory, and the computation backend. Each server process loads the selected model.
--calibrationYour own calibration file. By default, the server uses an engine-specific file when supplied, or the base CALIBRATION.json.
--soam onA 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.
--schedulerSchedule long and short requests in the CUDA engine. Turning it off restores arrival-order processing.
--deterministicReproducible answers on the same machine, without batching different clients’ requests. Applies to in-process engines and may reduce throughput.
--context-overflowtruncate cuts the middle of an oversized state and reports it in usage.truncated; refuse rejects the request instead.
--template-prefix offRecommended for basal-2.0 4.5B: the template cache did not pass this model’s check. Mini and max can use auto.
--log-decisionsLog 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.

A threshold is a process rule

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.

Calibration on your data

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.

Experiments have specific requirements

--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.

FROM INTERFACE TO DEPLOYMENT

Connect a decision to your process.