Text Generation
Transformers
Safetensors
Polish
English
llama
typed-decisions
decision-making
classification
calibration
polish
decision-model
conversational
text-generation-inference
Run this model with HF Jobs
Run Remek/basal-3.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-3.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-3.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-3.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-3.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-3.0-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Remek/basal-3.0-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Remek/basal-3.0-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Remek/basal-3.0-mini") model = AutoModelForCausalLM.from_pretrained("Remek/basal-3.0-mini", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Remek/basal-3.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-3.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-3.0-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Remek/basal-3.0-mini
- SGLang
How to use Remek/basal-3.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-3.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-3.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-3.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-3.0-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Remek/basal-3.0-mini with Docker Model Runner:
docker model run hf.co/Remek/basal-3.0-mini
basal-3.0-mini
Browse filesFiles changed (11)
- CALIBRATION.llamagraph.jsonAdded+143
- CALIBRATION.llamagraph.o2.jsonAdded+139
- README.mdAdded+107
- SHA256SUMSAdded+9
- basal.jsonAdded+15
- chat_template.jinjaAdded+4
- config.jsonAdded+35
- generation_config.jsonAdded+10
- model.safetensorsAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+16
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143{ "prompt": 2, "temperature_per_prim": { "choice": 0.9715319411536057, "noul": 1.189207115002721, "score": 1.189207115002721 }, "temperature_per_bucket": { "choice": { "2-10": 1.059463094359295, "11-26": 1.2782470235604306, "27-255": 0.7937005259840998 } }, "thresholds": { "0.01": { "confidence": 0.9770705699920654, "method": "bound-controlled (one-sided 95% Clopper-Pearson on FIT)", "fit_coverage": 0.385885447106955, "fit_error": 0.00605831124574025, "fit_upper95": 0.009819970865659234, "cert_coverage": 0.4032650225772838, "cert_error": 0.012919896640826873, "cert_upper95": 0.01982474989086673, "per_type": { "choice": { "confidence": 0.9856504797935486, "fit_coverage": 0.41531664212076586, "fit_error": 0.005065856129685917, "fit_upper95": 0.009348213934715976, "cert_coverage": 0.4287833827893175, "cert_error": 0.008073817762399077, "cert_upper95": 0.016474596927864155, "icc": 0.4880590214779661, "design_effect": 1.0895408093264858 }, "noul": { "confidence": null, "icc": 0.8088072285109671, "design_effect": 1.131589787323109 }, "score": { "confidence": null, "icc": 0.21253547449297425, "design_effect": 1.0068930424159883 } } }, "0.05": { "confidence": 0.777583122253418, "method": "bound-controlled (one-sided 95% Clopper-Pearson on FIT)", "fit_coverage": 0.7323202805376973, "fit_error": 0.044293695131683956, "fit_upper95": 0.049850418771561635, "cert_coverage": 0.733935394234109, "cert_error": 0.0506389020350213, "cert_upper95": 0.05919717181261861, "per_type": { "choice": { "confidence": 0.7317759990692139, "fit_coverage": 0.7746686303387335, "fit_error": 0.04345464421510049, "fit_upper95": 0.049724839521714415, "cert_coverage": 0.7883283877349159, "cert_error": 0.045796737766624844, "cert_upper95": 0.05586907501249039, "icc": 0.4880590214779661, "design_effect": 1.0895408093264858 }, "noul": { "confidence": 0.8692847490310669, "fit_coverage": 0.5909355026147589, "fit_error": 0.03638151425762045, "fit_upper95": 0.04883128590133507, "cert_coverage": 0.6028571428571429, "cert_error": 0.05687203791469194, "cert_upper95": 0.0814293115793724, "icc": 0.8088072285109671, "design_effect": 1.131589787323109 }, "score": { "confidence": 0.9210201501846313, "fit_coverage": 0.3216216216216216, "fit_error": 0.008403361344537815, "fit_upper95": 0.03957007729623104, "cert_coverage": 0.34394904458598724, "cert_error": 0.0, "cert_upper95": 0.05495548846517785, "icc": 0.21253547449297425, "design_effect": 1.0068930424159883 } } } }, "gates": { "ece_lofo": { "choice": { "pooled": 0.03226816564481467, "mean": 0.08454054184372697, "max": 0.5861995271457139, "mean_floor": 0.04915018389863457, "reference": null }, "noul": { "pooled": 0.04324658921786715, "mean": 0.07406328840689493, "max": 0.0879866075515747, "mean_floor": 0.06136636136426923, "reference": null }, "score": { "pooled": 0.07750942192639516, "mean": null, "reference": null } }, "automated_at": { "0.01": 0.30114623133032303, "0.05": 0.7189996526571726 }, "automated_error": { "0.01": 0.008073817762399077, "0.05": 0.04685990338164251 }, "automated_at_pooled": { "0.01": 0.4032650225772838, "0.05": 0.733935394234109 }, "ece_reference": null }, "engine": "llamagraph", "fitted_on": { "date": "2026-11-22", "model": "basal-3.0-mini", "engine": "fast --llama-graph on", "split": "FIT 70% / CERT 30% by group", "tool": "basal-calibrate 3.0.2", "model_content": "1fe82934ce42dd6d", "model_weights": "1fe82934ce42dd6d", "orders": 1 }, "certified_on": "CERT split of fitted_on.data (30% by group)"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139{ "prompt": 2, "temperature_per_prim": { "choice": 0.9303421741521466, "noul": 1.1721576888192515, "score": 1.189207115002721 }, "temperature_per_bucket": { "choice": { "2-10": 1.0145453349375237, "11-26": 1.2782470235604306, "27-255": 0.7711054127039704 } }, "thresholds": { "0.01": { "confidence": 0.9687302112579346, "method": "bound-controlled (one-sided 95% Clopper-Pearson on FIT)", "fit_coverage": 0.44798363530099355, "fit_error": 0.006523157208088715, "fit_upper95": 0.009819089638139647, "cert_coverage": 0.4626606460576589, "cert_error": 0.012012012012012012, "cert_upper95": 0.01818724266777841, "per_type": { "choice": { "confidence": 0.9687302112579346, "fit_coverage": 0.526404376183463, "fit_error": 0.005995203836930456, "fit_upper95": 0.009586927224981088, "cert_coverage": 0.5450049455984174, "cert_error": 0.008166969147005444, "cert_upper95": 0.015605913433533507, "icc": 0.5316661692756334, "design_effect": 1.0975411107949407 }, "noul": { "confidence": null, "icc": 0.8070241780480745, "design_effect": 1.131299691954364 }, "score": { "confidence": null } } }, "0.05": { "confidence": 0.7698056697845459, "method": "bound-controlled (one-sided 95% Clopper-Pearson on FIT)", "fit_coverage": 0.7355347749853887, "fit_error": 0.04429876837504966, "fit_upper95": 0.049850418771561635, "cert_coverage": 0.7391455366446683, "cert_error": 0.04981203007518797, "cert_upper95": 0.05827790006903835, "per_type": { "choice": { "confidence": 0.7071366906166077, "fit_coverage": 0.7872922364822218, "fit_error": 0.0435595938001069, "fit_upper95": 0.04991188674933114, "cert_coverage": 0.7972304648862513, "cert_error": 0.04404466501240695, "cert_upper95": 0.05419072800045516, "icc": 0.5316661692756334, "design_effect": 1.0975411107949407 }, "noul": { "confidence": 0.9925374388694763, "fit_coverage": 0.07611853573503777, "fit_error": 0.007633587786259542, "fit_upper95": 0.04058557142513337, "cert_coverage": 0.06571428571428571, "cert_error": 0.0, "cert_upper95": 0.07046111727016409, "icc": 0.8070241780480745, "design_effect": 1.131299691954364 }, "score": { "confidence": 0.9398648738861084, "fit_coverage": 0.31351351351351353, "fit_error": 0.008620689655172414, "fit_upper95": 0.040241331893681426, "cert_coverage": 0.29936305732484075, "cert_error": 0.0, "cert_upper95": 0.06175013471082451 } } } }, "gates": { "ece_lofo": { "choice": { "pooled": 0.035004251130831686, "mean": 0.08514144572582132, "max": 0.5790989189058221, "mean_floor": 0.04909711841007751, "reference": null }, "noul": { "pooled": 0.04375311246940065, "mean": 0.06968234005596004, "max": 0.09498824755350746, "mean_floor": 0.0610047523919982, "reference": null }, "score": { "pooled": 0.10427628989052624, "mean": null, "reference": null } }, "automated_at": { "0.01": 0.3827717957624175, "0.05": 0.5922195206668982 }, "automated_error": { "0.01": 0.008166969147005444, "0.05": 0.04164222873900293 }, "automated_at_pooled": { "0.01": 0.4626606460576589, "0.05": 0.7391455366446683 }, "ece_reference": null }, "engine": "llamagraph", "fitted_on": { "date": "2026-11-22", "model": "basal-3.0-mini", "engine": "fast --llama-graph on", "split": "FIT 70% / CERT 30% by group", "tool": "basal-calibrate 3.0.2", "model_content": "1fe82934ce42dd6d", "model_weights": "1fe82934ce42dd6d", "orders": 2 }, "certified_on": "CERT split of fitted_on.data (30% by group)"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107---license: apache-2.0language:- pl- enbase_model: speakleash/Bielik-4.5B-v3.0-Instructlibrary_name: transformerspipeline_tag: text-generationtags:- typed-decisions- decision-making- classification- calibration- polish- decision-model---
# basal-3.0-mini
**basal-3.0-mini** (4.5B) is a typed-decision model for Polish and English, part of the basal-3.0 family, built on Bielik-4.5B-v3.0-Instruct. The model reads a *state* (a message, a document, retrieved passages, an agent trace) and answers typed questions about it (`choice`, yes/no `noul`, `score`, `act`, `tool`) with a calibrated probability for each allowed answer, in one forward pass, without generating text.
**Two-way reading.** The model reads its prompt in both directions (every token sees the whole state and question, up to 4,096 prompt tokens; longer prompts are read causally). basal-serve reads it that way with `--llama-graph on` only; without the flag the server refuses to start. llama.cpp and Ollama read one way, so the GGUF files read this model causally, at a measured cost (see the GGUF card).
## Quick start
Install the basal engine 3.0.2 (NVIDIA GPU, CUDA 12.8 driver or newer):
```bashuv venv --python 3.12 ~/basal-env && source ~/basal-env/bin/activateuv pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/cu128uv pip install "basal-engine[fp8] @ https://github.com/rkinas/basal/archive/refs/tags/v3.0.2.tar.gz"```
Serve:
```bashbasal-serve --model Remek/basal-3.0-mini --mode fast --llama-graph on --template-prefix off --port 8000```
Ask:
```bashcurl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{ "state": "Klient: od wczoraj nie mogę zalogować się do bankowości internetowej.", "questions": {"dept": {"type": "choice", "instructions": "Do którego działu skierować zgłoszenie?", "criteria": {"cards": "Reklamacje kart", "online": "Wsparcie bankowości elektronicznej", "loans": "Kredyty"}}}}'```
Docker: `ghcr.io/rkinas/basal-serve:3.0.2`.
## Results
Both models served by basal engine 3.0.2 on one H100 (`--mode fast --llama-graph on --template-prefix off`), bf16, on the same items; accuracy is the mean of two option orders.
| benchmark | basal-2.0-4.5B | basal-3.0-mini | difference, paired [95% CI] ||---|---|---|---|| Polish decisions (7,081 items) | 0.9242 | 0.9195 | -0.47 pt [-1.13, +0.24] || Polish general (3,079 items) | 0.7597 | 0.7506 | -0.91 pt [-2.24, +0.39] || PL-Real-300 (300 items) | 0.9467 | 0.9633 | +1.67 pt [-0.67, +4.00] || English corpus test (1,479 items) | 0.6464 | 0.6984 | +5.21 pt [+2.97, +7.30] || English panel (10 tasks, mean of task accuracies) | 0.6504 | 0.7588 | +10.84 pt |
| Werdykt 2.0 | basal-3.0-mini | basal-2.0-4.5B | Bielik-One-4B-r1 ||---|---|---|---|| macro accuracy [95% CI] | 0.7702 [0.7590, 0.7806] | 0.7286 [0.7170, 0.7392] | 0.6962 [0.6842, 0.7088] || Polish / English | 0.7716 / 0.7688 | 0.7288 / 0.7284 | 0.6872 / 0.7052 || difference to basal-2.0-4.5B, paired [95% CI] | +4.16 pt [+3.02, +5.32] | - | -3.24 pt [-4.54, -1.80] || Polish / English difference to basal-2.0-4.5B | +4.28 [+2.68, +5.84] / +4.04 [+2.44, +5.72] | - | -4.16 [-6.04, -2.36] / -2.32 [-4.24, -0.52] |
Werdykt 2.0: the hidden Polish and English decision benchmark, 5,000 items in 20 cells (10 categories x PL / EN); paired differences with a stratified within-cell bootstrap (1,000 resamples), the language rows on 2,500 items each. basal-3.0-mini minus Bielik-One-4B-r1: +7.40 pt [+6.10, +8.60]. basal-3.0-mini was served by basal engine 3.0.1 (`--mode fast --llama-graph on`; 3.0.2 is the same code with a serving race fixed), basal-2.0-4.5B by basal engine 2.0, Bielik-One-4B-r1 by the server of its own model card.
| Werdykt-MAX v1.3.0 (discovery split) | Overall | PL | EN | Full4 ||---|---|---|---|---|| basal-3.0-mini | 59.23 | 59.03 | 59.43 | 55.88 || basal-2.0-4.5B | 46.42 | 47.57 | 45.27 | 46.67 || Bielik-One-4B-r1 | 55.62 | 54.40 | 56.83 | 51.73 || basal-3.0-mini minus basal-2.0-4.5B, pp [95% CI] | +12.82 [+10.62, +15.02] | +11.47 [+8.62, +14.29] | +14.17 [+10.91, +17.50] | +9.21 [+7.92, +10.52] || Bielik-One-4B-r1 minus basal-2.0-4.5B, pp [95% CI] | +9.20 [+6.89, +11.53] | +6.83 [+3.37, +10.26] | +11.57 [+8.43, +14.71] | +5.06 [+3.74, +6.37] |
Werdykt-MAX v1.3.0 (discovery split): 6,000 decisions, the same for all three models; Overall = 3,000 choice and binary decisions, split evenly between Polish and English; Full4 adds the ordinal and multilabel decisions. Paired 95% intervals: pointwise, a 20,000-draw bootstrap with scenario weights shared across models and translations linked. Serving: basal-3.0-mini on basal engine 3.0.1 (`--mode fast --llama-graph on`, two-way), basal-2.0-4.5B on basal engine 2.5.3 (eager), Bielik-One-4B-r1 on Bielik-One 1.0.8 with vLLM 0.32.0 (eager).
## Calibration
The calibration files (CALIBRATION.llamagraph.json, CALIBRATION.llamagraph.o2.json) give per-type temperatures and certified confidence thresholds. On the 8,560 held-out test decisions, as served, one option order: at a 1% target error 26.9% of decisions are automated (0.17% observed error); at 5%, 74.1% (3.08% observed error).
## Speed
One H100 80GB, bf16, `--mode fast --llama-graph on --template-prefix off` (the fast mode with the LlamaGraph engine, `--llama-graph on`).
| load | decisions/s | p50 latency ||---|---|---|| 1 client, short states | 72.3 | 13.2 ms || 1 client, long states | 8.6 | 118.2 ms || 16 clients | 131.8 | 118.3 ms || 64 clients | 141.3 | 425.3 ms || 8 clients, 16 questions per request | 143.6 | 871.5 ms || 32 clients x 1,000 requests (load test) | 129.7 | |
## Other formats
- `basal-3.0-mini-FP8`: FP8 weights for NVIDIA Hopper / Blackwell (`--mode fp8 --llama-graph on --template-prefix off`).- `basal-3.0-mini-GGUF`: Q8_0 and Q5_K_M for llama.cpp and Ollama (read one way: see its card).- `basal-3.0-mini-MLX-8bit`: Apple Silicon (`--mode mlx --mlx-forward metal`).
## Limits
The model picks among the options you give; it does not write text, and it knows only what the state says. Review decisions with serious consequences for people.12345678913b537ad24c733a90b419c0e671df51e998f60531af1d87aefd8ec496a09d623 CALIBRATION.llamagraph.jsonb4d5ba8d3e418e1e82b2b8942d51d07555e9b1bc1adefd156d4db28c13924e05 CALIBRATION.llamagraph.o2.json2d9ee3cd620616dff3bc3cacd562fdee8564da87049893e181d30f992cdb15b3 basal.jsona805e50fed68938a076b07e2e602639611b50b1ced0e50f11eb92f1ba25be4dc chat_template.jinja7ee4821083714faa535d582a06a1756cb8ee1db36ee7d75299476e30b44b9aa2 config.json76594a7e29cc06ab1f219d175a8ee72e6a470053040a5156fb22226c1c6cfe9c generation_config.jsonabcd47e157f8704aa8fe6bd84b28723d565073425099e4ff325ffe25a7e6b975 model.safetensors8c8d3252e655715f7205ec2205e1a141728997f01c78b01031a973619ea22bec tokenizer.json7386ea6b73ce531e0a472a3a2698ac2d9858bc4de96806d279e10d6b2414e533 tokenizer_config.json123456789101112131415{ "name": "basal-3.0-mini", "prompt": 2, "readout": { "kind": "code logits", "codes": 255, "prefill": "{\"answer\": \"", "templates": "prompt format 2 (docs/FORMAT2.md of the basal engine)" }, "calibration": "CALIBRATION.llamagraph.json for --mode fast --llama-graph on; CALIBRATION.llamagraph.o2.json for --mode fast --llama-graph on --orders 2 (per-type and per-bucket temperatures, certified thresholds, fitted on this checkpoint)", "two_way": { "max_prompt": 4096, "max_record": 8192 }}1234{{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '' + message['content'] + '<|im_end|>' + ''}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant' }}{% endif %}1234567891011121314151617181920212223242526272829303132333435{ "architectures": [ "LlamaForCausalLM" ], "attention_bias": true, "attention_dropout": 0.0, "bos_token_id": 1, "dtype": "bfloat16", "eos_token_id": [ 4, 2 ], "head_dim": 128, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 11008, "max_position_embeddings": 32768, "mlp_bias": true, "model_type": "llama", "num_attention_heads": 16, "num_hidden_layers": 60, "num_key_value_heads": 2, "pad_token_id": 2, "pretraining_tp": 1, "rms_norm_eps": 1e-06, "rope_parameters": { "rope_theta": 1000000, "rope_type": "default" }, "tie_word_embeddings": false, "transformers_version": "5.17.0", "use_cache": true, "vocab_size": 32000}12345678910{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": [ 4, 2 ], "pad_token_id": 2, "transformers_version": "5.17.0"}123version https://git-lfs.github.com/spec/v1oid sha256:abcd47e157f8704aa8fe6bd84b28723d565073425099e4ff325ffe25a7e6b975size 951462949612345678910111213141516{ "add_prefix_space": null, "backend": "tokenizers", "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "is_local": true, "local_files_only": true, "model_max_length": 1000000000000000019884624838656, "pad_token": "</s>", "sp_model_kwargs": {}, "spaces_between_special_tokens": false, "tokenizer_class": "LlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}CALIBRATION.llamagraph.jsonAdded+143
CALIBRATION.llamagraph.o2.jsonAdded+139
README.mdAdded+107
SHA256SUMSAdded+9
basal.jsonAdded+15
chat_template.jinjaAdded+4
config.jsonAdded+35
generation_config.jsonAdded+10
model.safetensorsAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+16