Instructions to use Hanno-Labs/bosun-v3.1-1.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hanno-Labs/bosun-v3.1-1.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hanno-Labs/bosun-v3.1-1.7b", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Hanno-Labs/bosun-v3.1-1.7b", trust_remote_code=True, device_map="auto") - PEFT
How to use Hanno-Labs/bosun-v3.1-1.7b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hanno-Labs/bosun-v3.1-1.7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hanno-Labs/bosun-v3.1-1.7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hanno-Labs/bosun-v3.1-1.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hanno-Labs/bosun-v3.1-1.7b
- SGLang
How to use Hanno-Labs/bosun-v3.1-1.7b 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 "Hanno-Labs/bosun-v3.1-1.7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hanno-Labs/bosun-v3.1-1.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Hanno-Labs/bosun-v3.1-1.7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hanno-Labs/bosun-v3.1-1.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hanno-Labs/bosun-v3.1-1.7b with Docker Model Runner:
docker model run hf.co/Hanno-Labs/bosun-v3.1-1.7b
Bosun 3.1 1.7B
Copyright 2026 Clause Logic Inc. Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.
GGUF weights: Bosun v3.1 1.7B GGUF (F16, Q8_0, Q5_K_M).
A small, calibrated model for typed decisions. Give Bosun state, criteria,
and a set of valid choices; it returns a probability distribution over those
choices instead of generating an unconstrained answer. Through the Bosun
runtime, the same decision-token contract supports choice, score, and
noul questions.
Bosun 3.1 1.7B is a LoRA fine-tune of
Qwen/Qwen3-1.7B at pinned revision
70d244cc86ccca08cf5af4e1e306ecf908b1ad5e. The base model has
2,031,739,904 parameters. The model uses stable decision slots, supports up to
255 runtime choices plus a null slot, and exposes the full candidate logits so
applications can use the probabilities rather than only the winning choice.
DecisionBench results
Bosun was evaluated on the complete frozen 23,900-row DecisionBench suite with 23,900 successful responses, zero errors, and 100% coverage.
| model | primary accuracy | ECE | NLL | coverage |
|---|---|---|---|---|
| Bosun 3.1 1.7B | 84.90% | 0.050 | 0.478 | 100.00% |
| Jev 1.13 | 72.03% | 0.128 | 2.433 | 100.00% |
| GPT-5.6 Luna | 69.90% | 0.203 | 3.154 | 99.96% |
| DecisionBench primitive | accuracy | rows |
|---|---|---|
| binary classification | 92.19% | 6,388 |
| candidate selection | 84.22% | 15,814 |
| ordinal scoring | 63.84% | 1,698 |
The comparison uses the pinned Jev and Luna records in the
decision-bench-results
repository. The raw Bosun artifact is content-addressed and includes every
model input, output, probability distribution, decision, and per-row result.
The model was trained on examples from task families represented in this DecisionBench release. These results measure frozen held-out rows from seen task families; they are not evidence of unseen-task OOD generalization.
Inference contract
The repository includes a Transformers model class that loads the complete
Bosun package. Install transformers, peft, safetensors, and accelerate,
then opt into the repository's typed-decision code:
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"Hanno-Labs/bosun-v3.1-1.7b",
trust_remote_code=True,
dtype="auto",
device_map="auto",
)
choice = model.predict(
state={"request": "Customer cannot access their account."},
instructions="Choose the best support route.",
decision_type="choice",
row_id="example-1",
candidates=[
{"id": "billing", "label": "Billing", "description": "Payment issue"},
{"id": "access", "label": "Account access", "description": "Login issue"},
],
)
score = model.predict(
state={"ticket": "Duplicate charge; customer cannot buy groceries."},
instructions="Rate the support urgency.",
decision_type="score",
row_id="example-2",
candidates=[
{"id": "0", "label": "Low"},
{"id": "1", "label": "Medium"},
{"id": "2", "label": "High"},
],
)
noul = model.predict(
state={"ticket": "The bank confirmed a duplicate charge."},
instructions="Was the duplicate charge confirmed?",
decision_type="noul",
row_id="example-3",
candidates=[
{"id": "yes", "label": "Yes"},
{"id": "no", "label": "No"},
],
)
print(choice["probabilities"])
print(score["probabilities"])
print(noul["probabilities"])
trust_remote_code=True is required because Bosun's typed-decision readout is
not part of stock Transformers. model.forward(...) remains compatible with
the underlying causal LM; model.decision_logits(...) returns all 256 stable
slot logits, and model.predict(...) renders the verified prompt contract,
masks unused slots, and maps probabilities back to the caller's candidate order.
serving.json remains the authoritative contract. The loader reconstructs all
four model components together:
- the pinned Qwen base model;
- the PEFT adapter in
adapter/; - the tokenizer snapshot in
tokenizer/; - the trained decision-token rows in
decision_embeddings.safetensors.
Treat serving.json as the authoritative contract. It defines the prompt
schema, pinned base revision, stable-slot assignment, decision-token IDs,
maximum choice count, null slot, selected epoch, and checkpoint metrics. Do not
infer the meaning of a decision token from its numeric order; candidate meaning
comes from the stable presented_slot mapping constructed for each request.
For a choice question, the runtime places each presented candidate in a stable
slot, reads the corresponding decision-token logits, masks unused slots, and
normalizes the remaining logits into a probability distribution. Score and
noul questions use the same typed decision surface rather than free-form text
parsing.
Training
- Training rows: 130,000 (80,000 original plus 50,000 ecosystem)
- Epochs completed: 3
- Selected epoch: 2
- Selection metric: macro-family accuracy
- Training-heldout accuracy: 89.80%
- Training-heldout macro-family accuracy: 89.80%
- Batch size: 32 with 2 gradient-accumulation steps
- LoRA rank / alpha: 16 / 32
- Seed: 20260918
The training-heldout metrics above are checkpoint-selection metrics and are separate from the DecisionBench result.
Files
| file | what |
|---|---|
adapter/ |
LoRA adapter weights and PEFT configuration |
config.json |
Transformers registration and immutable Bosun loader configuration |
configuration_bosun.py |
BosunConfig for AutoConfig |
modeling_bosun.py |
BosunForDecision loader, prompt compiler, and decision readout |
tokenizer/ |
exact tokenizer and decision-token vocabulary |
decision_embeddings.safetensors |
trained decision-token embedding rows |
serving.json |
authoritative inference and stable-slot contract |
manifest.json |
content-addressed inference-package manifest |
Links
- DecisionBench results β Hanno-Labs/decision-bench-results
- Base model β Qwen/Qwen3-1.7B
- Hanno Labs β hannolabs.ai
- Downloads last month
- 1,199
Model tree for Hanno-Labs/bosun-v3.1-1.7b
Dataset used to train Hanno-Labs/bosun-v3.1-1.7b
Spaces using Hanno-Labs/bosun-v3.1-1.7b 3
Articles mentioning Hanno-Labs/bosun-v3.1-1.7b
Anatomy of a wrong choice: GLiNER2 in DecisionBench
DecisionBench and Bosun v3.1: building and testing decision models
Evaluation results
- Primary accuracy on DecisionBenchself-reported0.849
- Expected calibration error on DecisionBenchself-reported0.050
- Mean negative log-likelihood on DecisionBenchself-reported0.478
