File size: 5,934 Bytes
7c94e34 f68bb6d 7c94e34 daf2a56 7c94e34 7b05851 4a0c8dc 7c94e34 3f57d7c 0c70915 daf2a56 7c94e34 4a0c8dc 390e7b9 4a0c8dc 7c94e34 93c7ad1 7c94e34 93c7ad1 7c94e34 93c7ad1 7c94e34 0c70915 4a0c8dc 93c7ad1 4a0c8dc 7881344 4a0c8dc 93c7ad1 7c94e34 4a0c8dc 22e3e44 4a0c8dc 7c94e34 7881344 7c94e34 4a0c8dc 7c94e34 4a0c8dc 7c94e34 4a0c8dc 7c94e34 4a0c8dc 7c94e34 4a0c8dc 7c94e34 4a0c8dc 7c94e34 fbc8672 9109589 93c7ad1 25b4375 a9f395a 0c70915 93c7ad1 0c70915 7881344 0c70915 78a487c 37b9239 78a487c 9c6229b 157e899 9c6229b 78a487c 5e285d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | ---
license: apache-2.0
base_model: Qwen/Qwen3.5-4B
pipeline_tag: text-classification
tags: [boolean-qa, abstention, distillation, sequence-classification]
---
<p align="center">
<img src="https://huggingface.co/chowderai/Bitsy-3.3B/resolve/main/assets/bitsy-cat-v3.png" alt="Bitsy mascot" width="280" height="280">
</p>
# Bitsy
Bitsy is a 3.3B-parameter general-purpose classifier for document-grounded Boolean inference. Given a document and a question or statement, it returns probabilities for `true`, `false`, and `unknown` in one forward pass, without autoregressive decoding.
Bitsy is trained to return `unknown` when the document does not provide enough evidence to settle the question or statement. Here, `unknown` means insufficient document evidence, rather than low model confidence.
| Answer | Meaning |
| --- | --- |
| `true` | The document supports the claim. |
| `false` | The document contradicts the claim. |
| `unknown` | The document does not provide enough evidence to decide. |
## Model formats
- **Safetensors:** the original sequence classifier. Returns three class scores in one forward pass; use the classification interface, rather than `generate()`.
- **GGUF:** `Bitsy-3.3B-Q4_K_M.gguf`, a quantized conversion for llama.cpp-based serving. Integrations must use its classifier prompt and designated label-token scores.
Both formats are for classification. Quantization can change predictions; the evaluation below covers the original checkpoint. See [format details and vLLM usage](docs/USAGE.md).
## Usage
The example uses the original Safetensors checkpoint. The repo is private; authenticate with a Hugging Face account that has access.
### Prepare the prompt
Use the trained prompt format below, including the final sentence: “The answer to the proposition based on the document is:”
Run this setup before the Transformers example:
```python
from transformers import AutoTokenizer
model_id = "chowderai/Bitsy-3.3B"
tok = AutoTokenizer.from_pretrained(model_id)
tok.padding_side = "left"
tok.truncation_side = "left"
GROUNDING = (
"Decide using only the document below. Do not use outside knowledge, "
"even if you know the answer.\n\n"
)
TEMPLATE = (
"## Document:\n{document}\n\n## Proposition:\n{proposition}\n\n"
"The answer to the proposition based on the document is:"
)
def format_prompt(document, proposition):
user = GROUNDING + TEMPLATE.format(document=document, proposition=proposition)
return tok.apply_chat_template(
[{"role": "user", "content": user}],
tokenize=False,
# Preserve the input format used during training
add_generation_prompt=True,
enable_thinking=False,
)
prompt = format_prompt(
"The customer confirmed the refund.",
"Did the customer confirm the refund?",
)
```
Training used a maximum input length of 12,288 tokens. The example uses the same limit and removes tokens from the beginning when an input exceeds it. For reproducible deployments, pin the tokenizer and model to the same full repository commit SHA using `revision`.
### Transformers
This example uses a CUDA GPU with bfloat16 support and the original Safetensors checkpoint. Use a Transformers version that supports `Qwen3_5TextForSequenceClassification`.
```python
import torch
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained(
model_id, dtype=torch.bfloat16
).to("cuda").eval()
encoded = tok(
prompt,
return_tensors="pt",
add_special_tokens=False,
truncation=True,
max_length=12288,
).to("cuda")
with torch.inference_mode():
probabilities = model(**encoded).logits[0].float().softmax(-1)
labels = [model.config.id2label[i] for i in range(model.config.num_labels)]
prediction = labels[int(probabilities.argmax().item())]
scores = dict(zip(labels, probabilities.cpu().tolist()))
```
Read the label order from `config.id2label`. Compute the softmax in float32, as shown, to retain precision when the logits are close. To classify a batch, pass a list of prompts with `padding=True` and the same tokenization settings. The chat template already supplies special tokens, so the second tokenization step uses `add_special_tokens=False`.
We recommend calibrating Bitsy’s scores on representative data from your target domain. If you use decision thresholds, validate them on held-out examples.
## Model details and evaluation
We built Bitsy through model surgery on Qwen3.5-4B. We truncated the model from 32 to 24 decoder blocks and replaced its language-model head with a three-class linear classifier. We then post-trained the truncated model on 96,868 document-and-proposition examples, distilling Kimi-K3’s soft probability targets over `true`, `false`, and `unknown`. The training mixture includes unanswerable questions to teach evidence-based abstention.
On [Bool-Bench](https://huggingface.co/datasets/chowderai/bool-bench), the selected Safetensors checkpoint scored **86.1% accuracy on the 496-example reporting subset** and 86.2% on the full 1,000 examples. The other 504 examples were used for checkpoint selection. The reporting subset was excluded from final checkpoint selection and weight updates, but earlier prompt and model-design studies used the full benchmark.
See [training and evaluation details](docs/TRAINING_AND_EVALUATION.md) for the schedule, class/source breakdowns, and comparison conditions.
## License
The model weights are licensed under [Apache 2.0](LICENSE). See [NOTICE](NOTICE) for upstream attribution and model modifications.
## Authors
- Johnson Kuan
## Citation
```bibtex
@misc{chowderai2026bitsy,
title = {Bitsy: A Boolean Decision Model},
author = {{Chowder AI}},
year = {2026},
url = {https://huggingface.co/chowderai/Bitsy-3.3B}
}
```
## Contact
For questions about this model, contact [support@chowder.ai](mailto:support@chowder.ai).
|