Run this model with HF Jobs
Run Remek/basal-omni-2.0-mini on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Remek/basal-omni-2.0-mini. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Remek/basal-omni-2.0-mini on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Remek/basal-omni-2.0-mini. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Remek/basal-omni-2.0-mini. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Remek/basal-omni-2.0-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Remek/basal-omni-2.0-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Remek/basal-omni-2.0-mini") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Remek/basal-omni-2.0-mini") model = AutoModelForMultimodalLM.from_pretrained("Remek/basal-omni-2.0-mini", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Remek/basal-omni-2.0-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Remek/basal-omni-2.0-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-omni-2.0-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Remek/basal-omni-2.0-mini
- SGLang
How to use Remek/basal-omni-2.0-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Remek/basal-omni-2.0-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-omni-2.0-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Remek/basal-omni-2.0-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-omni-2.0-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Remek/basal-omni-2.0-mini with Docker Model Runner:
docker model run hf.co/Remek/basal-omni-2.0-mini
basal-omni-2.0-mini
basal-omni-2.0-mini is the small model of basal-omni 2.0, on Google Gemma 4 E4B. It replaces basal-omni-2.0-mini-preview. Its smaller sibling is basal-omni-2.0-nano (Gemma 4 E2B); its largest sibling is basal-omni-2.0-max (Gemma 4 12B), and ultra comes later.
What it is. Instead of writing an answer, the model reads a state (a message, a document, retrieved passages, an
agent trace, a web page as JSON). It then answers a typed question about it (choice, yes/no noul, score, and in
the basal engine multi, act and tool). The answer is a calibrated probability for each allowed answer, in one
forward pass, without generating text. The answer never falls outside the options you give, and the probability says
how sure the model is.
What is new compared with the preview.
- Higher accuracy on our hidden Polish and English decision benchmark (Werdykt 2.0): 0.822 vs 0.811 (+1.1 points, 95% interval +0.4 to +1.8, paired over the same 5,000 items).
- Higher accuracy on the held-out Polish decisions (0.961 vs 0.951) and on the EN corpus test (0.720 vs 0.692); the EN external panel (0.819 vs 0.811) and PL-Real (0.970 vs 0.960) are higher within noise. PL general (knowledge, exams, reading) is lower: 0.753 vs 0.767.
- Two-way reading, the same typed questions and the same API as the preview and basal-omni-1.0.
Results
Served with the basal engine 3.0.2 (build 1bd1bba2) from the released files on one NVIDIA H100: --mode fast (the
default on Hopper), bf16, read two ways, one option order (the default), the shipped CALIBRATION.json. Werdykt was read
on another GPU (see below). The preview column is the preview's own release read on the same sets (basal 2.8.0,
--mode eager; its Werdykt cells: basal 2.5, see below).
| benchmark | basal-omni-2.0-mini | 2.0-mini-preview |
|---|---|---|
| Werdykt 2.0, macro (hidden PL + EN, 10 categories Γ 2 languages, 5,000 items) | 0.822 (95% interval 0.812β0.831) | 0.811 |
| Werdykt 2.0, Polish / English | 0.819 / 0.825 | 0.807 / 0.814 |
| PL decisions (held-out test, 7,081 items) | 0.961 | 0.951 |
| PL general (knowledge, exams, reading; 3,079 items) | 0.753 | 0.767 |
| PL-Real (300 real Polish documents) | 0.970 | 0.960 |
| EN external panel (10 public English decision tasks, 3,842 items) | 0.819 | 0.811 |
| EN corpus test (1,479 items) | 0.720 | 0.692 |
| Coverage at 1% error (share decided automatically with the shipped threshold) | 41.7% at 0.36% observed error | 58.3% at 0.58% |
| Coverage at 5% error | 88.5% at 3.8% observed error | 87.8% at 4.0% |
- Werdykt 2.0: measured with basal 3.0.2 from the released files (
--mode fast, one option order, the shippedCALIBRATION.json) on one NVIDIA RTX PRO 6000 Blackwell Max-Q (bf16). The preview's row was read with basal 2.5 (build d72e614) on the same GPU; with basal 2.8.0 this model gives the same answer on 99.9% of the items (0.822). - Coverage: on the held-out PL decisions and EN corpus tests (8,560 decisions), each asked with its own question type,
with the per-type thresholds of the shipped
CALIBRATION.jsonas the server applies them. At the 1% target onlychoicequestions have a certified threshold (77.0% of them decided, at 0.36% error); yes/no andscorequestions go to a person. At 5%: choice 95.1% at 3.9%, yes/no 91.2% at 4.0%, score 40.0% at 0.3%. The preview's cells were measured with basal 2.8.0 and its own calibration.
Werdykt 2.0 by category
| category | basal-omni-2.0-mini | 2.0-mini-preview |
|---|---|---|
| retrieval | 0.972 | 0.982 |
| real documents | 0.980 | 0.978 |
| routing | 0.986 | 0.966 |
| action | 0.886 | 0.878 |
| judge | 0.878 | 0.860 |
| abstain | 0.854 | 0.834 |
| score | 0.814 | 0.808 |
| contract | 0.748 | 0.726 |
| long documents | 0.698 | 0.694 |
| rules | 0.406 | 0.382 |
Each category has 500 items (250 Polish, 250 English), so a difference of 2 points in one category is within noise; the macro row above is the measured comparison.
English external panel by task
The EN external panel row above is the mean of these ten public English decision tasks (same run as Results).
| task | items | basal-omni-2.0-mini | 2.0-mini-preview |
|---|---|---|---|
| FinancialPhraseBank | 300 | 0.953 | 0.957 |
| Belebele (English) | 300 | 0.947 | 0.940 |
| WinoGrande | 300 | 0.907 | 0.907 |
| BIG-Bench Hard | 540 | 0.852 | 0.811 |
| TabFact | 300 | 0.843 | 0.830 |
| Circa | 300 | 0.843 | 0.837 |
| RAGTruth | 300 | 0.817 | 0.780 |
| ContractNLI | 300 | 0.777 | 0.777 |
| TruthfulQA (binary) | 902 | 0.647 | 0.649 |
| JudgeBench | 300 | 0.607 | 0.627 |
| mean of the ten tasks | 3,842 | 0.819 | 0.811 |
Werdykt against other 4B typed-decision models
The same 5,000 hidden Werdykt 2.0 items (Polish and English), the same client and the same scoring, over each model's typed-decision API. Each model is served by its maker's own server. The lead is basal-omni-2.0-mini's paired difference over the same items, in points, with a 95% bootstrap interval.
| model | Werdykt 2.0 [95% interval] | Polish / English | basal-omni-2.0-mini lead |
|---|---|---|---|
| basal-omni-2.0-mini | 0.822 [0.812β0.831] | 0.819 / 0.825 | β |
| basal-omni-2.0-mini-preview | 0.811 [0.801β0.821] | 0.807 / 0.814 | +1.1 [+0.4, +1.8] |
| torchcast-decision-4b (v1.3) | 0.799 [0.788β0.809] | 0.787 / 0.810 | +2.4 [+1.3, +3.3] |
| KnowLine-4B-Gen5.5ΒΉ | 0.776 [0.766β0.787] | 0.764 / 0.788 | +4.6 [+3.5, +5.7] |
| basal-omni-1.0-mini | 0.769 [0.758β0.778] | 0.775 / 0.763 | +5.3 [+4.4, +6.3] |
| h2o-lightning-4b | 0.753 [0.742β0.764] | 0.745 / 0.761 | +6.9 [+5.9, +8.1] |
| Bielik-One-4B-r1Β² | 0.696 [0.684β0.709] | 0.687 / 0.705 | +12.6 [+11.4, +13.7] |
- Read between 8 Oct and 21 Nov 2026; basal-omni-2.0-mini (basal 3.0.2), the preview (basal 2.5), torchcast-decision-4b, KnowLine-4B and Bielik-One-4B on one NVIDIA RTX PRO 6000 Blackwell Max-Q, h2o-lightning-4b and basal-omni-1.0-mini on one H100.
- ΒΉ KnowLine-4B was served in FP8; the other models in bf16.
- Β² Bielik-One-4B's server shows the option keys to the model (the client asks it to hide them).
- Werdykt is hidden, so only these totals are shown.
Werdykt-MAX
Our second hidden benchmark of typed decisions: the Werdykt-MAX v1.3.0 discovery split, 6,000 decisions, the same for every model; Overall = its 3,000 choice and binary decisions, split evenly between Polish and English.
| Werdykt-MAX v1.3.0 (discovery split) | Overall | PL | EN |
|---|---|---|---|
| basal-omni-2.0-mini | 76.18 | 75.43 | 76.93 |
| basal-omni-2.0-mini-preview | 76.68 | 75.30 | 78.07 |
| h2o-lightning-4b | 73.62 | 73.17 | 74.07 |
| KnowLine-4B-Gen5.5 | 72.97 | 73.73 | 72.20 |
| Bielik-One-4B-r1 | 55.62 | 54.40 | 56.83 |
- basal-omni-2.0-mini was read with the same weights without the calibration file; Overall, PL and EN use the top answer, which calibration does not change (basal engine 2.5.3, bf16, eager, one option order, two-way up to 4,096 prompt tokens, one NVIDIA RTX PRO 6000 Blackwell Max-Q, 20 Nov 2026).
- Competitor rows from the same Werdykt-MAX reports: basal-omni-2.0-mini-preview, h2o-lightning-4b and KnowLine-4B-Gen5.5 each on its own server (13 Nov 2026); Bielik-One-4B-r1 (speakleash/Bielik-One-4B-r1 @ 567d29b0) on Bielik-One 1.0.8 with vLLM 0.32.0 (bf16, eager), its own calibration, one NVIDIA RTX PRO 6000 Blackwell Max-Q (19 Nov 2026).
- Full4 (with the ordinal and multilabel decisions) is not shown: it depends on calibration. Werdykt-MAX is hidden, so only these totals are shown.
Accuracy by document length
Accuracy on Werdykt (5,000 items, Polish and English; a hidden set, so only these totals are shown) by the length of the state, in characters (a token is about 3 to 4 characters; 1,000 characters is about half a page). 82.2% overall. 95% Wilson intervals in brackets.
| state length | items | accuracy |
|---|---|---|
| 0-1k | 709 | 74.0% [71, 77] |
| 1k-2k | 2,598 | 80.9% [79, 82] |
| 2k-4k | 796 | 94.1% [92, 96] |
| 4k-8k | 394 | 97.0% [95, 98] |
| 8k-16k | 128 | 81.3% [74, 87] |
| 16k+ | 375 | 66.1% [61, 71] |
Short states are mostly rules and abstention items, which are harder for every model, so read the rows as accuracy per bucket, not as the effect of length alone. The long-document family keeps the task and varies only the length:
| state length (long-document family) | items | accuracy |
|---|---|---|
| 8k-20k | 226 | 75.7% [70, 81] |
| 20k-30k | 194 | 70.1% [63, 76] |
| 30k+ | 80 | 52.5% [42, 63] |
Same run as the Werdykt row above. The intervals are about the items, not about run-to-run noise.
Quick start
1. Install into a fresh uv environment:
uv venv --python 3.12 --allow-existing ~/basal-env && source ~/basal-env/bin/activate
uv pip install torch==2.11.0 torchvision==0.26.0 --index-url https://download.pytorch.org/whl/cu128
uv pip install "basal-engine[media] @ https://github.com/rkinas/basal/archive/refs/tags/v3.0.3.tar.gz"
On Apple Silicon skip the torch line (that index has no macOS wheels) and install
"basal-engine[mlx] @ https://github.com/rkinas/basal/archive/refs/tags/v3.0.3.tar.gz" instead.
The server is also published as the Docker image ghcr.io/rkinas/basal-serve:3.0.3.
basal 3.0.3 returns bit-identical probabilities to basal 3.0.2 (build 1bd1bba2), on which this card's 3.0.2 numbers were measured, on the 8,560 test decisions, read one request at a time (the 3.0.3 code tree; 24 Nov 2026).
2. Start the server (port 8000 by default). It prints basal: model ... ready:
basal-serve --model Remek/basal-omni-2.0-mini --mode fast
On an NVIDIA GPU the engine picks the mode itself: fast (CUDA graphs) on Hopper with FlashAttention 3 and on
Blackwell workstation GPUs, eager (PyTorch, bf16) on other GPUs. The weights take about 16 GB. A two-way model is served
with --mode fast, --mode fast-nocompile or --mode eager; on Apple Silicon pass --mode eager --device mps, because
the engine's default there (mlx) does not serve this model two ways (PyTorch on Metal; several times slower than on an
NVIDIA GPU, 32 GB of memory or more recommended). One option order is asked by default; --orders 2 uses CALIBRATION.o2.json automatically.
3. Ask questions:
curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{
"state": "Klient: od wczoraj nie mogΔ zalogowaΔ siΔ do bankowoΕci internetowej, system pokazuje bΕΔ
d hasΕa.",
"questions": {
"dept": {"type": "choice", "instructions": "Do ktΓ³rego dziaΕu skierowaΔ zgΕoszenie?",
"criteria": {"cards": "Reklamacje kart", "online": "Wsparcie bankowoΕci elektronicznej", "loans": "Kredyty"}},
"urgent": {"type": "noul", "instructions": "Czy klient nie moΕΌe korzystaΔ z usΕugi?"}}}'
Full API (multi, act, tool, option keys, max_error): API.
Speed
On one NVIDIA H100 80GB (bf16), basal 3.0.2 (build 1bd1bba2), --mode fast, one option order; states up to 4,096 prompt
tokens are read two ways:
| measurement | value |
|---|---|
latency of one decision at batch size 1 (basal-bench, median over its 44 bundled examples) |
6.3 ms |
one question per request, sequential (basal-loadtest, 200 requests): p50 / p95 |
9.1 ms / 9.7 ms |
| one question per request, 16 concurrent clients (1,000 requests) | 285 decisions/s |
| states of about 1,500 tokens, 16 concurrent clients (500 requests) | 44 decisions/s |
16 questions about one state of about 150 characters in one request (basal-loadtest, the bundled examples), 8 concurrent clients |
618 decisions/s |
| 16 questions about one state of a few hundred characters in one request, 8 concurrent clients | 202 decisions/s |
| one question per request, sequential, states of about 4,000-4,900 tokens (most above the two-way limit, so read one way): p50 | 97 ms |
- The server was warmed up first. torch 2.11.0 (CUDA 12.8), FlashAttention 3.
- GPU memory while serving: 20.1 GiB.
--orders 2costs about twice as much per question.
Files
model.safetensors,config.json,generation_config.json,tokenizer.json,tokenizer_config.json,chat_template.jinja,processor_config.json: the model (Gemma 4 E4B architecture, 262k vocabulary). Gemma's image and audio encoders are included and unchanged.CALIBRATION.json: per-type temperatures and certified confidence thresholds for 1% / 5% error, fitted withbasal-calibrateof basal 3.0.2 on the served engine (--mode fast, bf16, one option order). It is bound to these model files: served with other files, the server keeps its temperatures, turns its thresholds off and warns.CALIBRATION.o2.json: the same for--orders 2(answers read in both option orders and combined).basal.json: prompt format 2 and the readout protocol.SHA256SUMS: checksums of the model files.
How it works
The model receives a fixed chat prompt with the state, the question and coded options (AβZ, then two-character codes,
up to 255). The assistant turn is prefilled with {"answer": ", and the decision is the softmax over the next-token
logits of the option codes only: one forward pass, no text generation. The server applies the calibrated temperature of
the question type from CALIBRATION.json.
Use the confidence. CALIBRATION.json stores thresholds for a target error of 1% or 5% among accepted decisions.
They were chosen on calibration data before testing. Accept decisions above the threshold automatically and route the
rest to a person. At the 1% target, only choice questions have a certified threshold; yes/no and score questions
are deferred.
The thresholds are certified with a one-sided 95% Clopper-Pearson bound and checked on a frozen test set. The
calibration-quality check for score questions (leave-one-family-out ECE) is not informative at this sample size:
about 160 score decisions, where even a perfectly calibrated model averages about 0.06.
Limitations
- Validate it on your own documents before relying on it.
- Long prompts: the state is read two-way up to 4,096 prompt tokens (8,192 tokens per request). Longer prompts are read one way, as in basal-omni-1.0, and the answer does not say which reading was used. Accuracy on the longest documents is lower (see Accuracy by document length).
- Serving features: for a two-way model the engine turns off the state cache, the prefix cache, reading one state once for many questions (SOAM) and the long lane. Ask several questions about one state in one request.
- Images and audio: Gemma 4's encoders are included, but this model was trained and evaluated on text only, and
--media onneeds--mode eager. Use it for text; media answers are not evaluated here. - Polish general knowledge (exams, reading comprehension; PL general above) is 1.4 points below the preview: for questions that test knowledge rather than a decision about the given state, compare both on your data.
- Exact arithmetic and thresholds are a weak spot of one-pass decisions (Werdykt rules 0.406): compute them in code.
- Option order: one order is asked by default;
--orders 2reduces sensitivity to option order at about twice the cost. - Other formats: basal-omni-2.0-mini-GGUF (llama.cpp, Ollama) and basal-omni-2.0-mini-MLX (Apple Silicon, MLX 8-bit) are experimental ports and are clearly less accurate (read one way, PL decisions 0.869 instead of 0.961; see their cards for the ports' own measurements).
- Review: decisions with serious consequences for people should be reviewed by a person.
License and attribution
Apache-2.0. Fine-tuned from google/gemma-4-E4B-it (Apache-2.0).
- Downloads last month
- 31