Bitsy-3.3B / README.md
johnsonkuan's picture
Polish README wording and flow
fbc8672 verified
|
Raw History Blame Contribute Delete
5.93 kB
metadata
license: apache-2.0
base_model: Qwen/Qwen3.5-4B
pipeline_tag: text-classification
tags:
  - boolean-qa
  - abstention
  - distillation
  - sequence-classification

Bitsy mascot

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.

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:

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.

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, 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 for the schedule, class/source breakdowns, and comparison conditions.

License

The model weights are licensed under Apache 2.0. See NOTICE for upstream attribution and model modifications.

Authors

  • Johnson Kuan

Citation

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