qwen-3.5-0.8b-Hedgehog
qwen-3.5-0.8b-Hedgehog is a 752M-parameter Qwen 3.5 text model tuned for
SimpleRAG document extraction and bounded thinking. This repository contains
the merged r5 FP16 Transformers checkpoint; no LoRA adapter is required.
Recommended extraction mode
Use temperature 0, disable thinking, provide the retrieved document evidence, and specify exact JSON leaf paths and scalar types. Thinking-enabled chat and thinking-disabled extraction should be evaluated separately.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "MichaelAnthony/qwen-3.5-0.8b-Hedgehog"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
messages = [
{
"role": "system",
"content": "Use only the supplied document. Return exact JSON only.",
},
{
"role": "user",
"content": (
"Document: Invoice INV-8042 is due 2026-09-15. Total: $1,284.50. "
"Vendor: Northwind Tools. Extract invoice_number, due_date, total, "
"and vendor."
),
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
r5 release evaluation
| Evaluation | Result |
|---|---|
| BenchLocal DataExtract-15 | 71 |
| BenchLocal Complex Documents | 88 |
| Q8 loop-control detected loops | 0 / 24 |
| Q8 loop-control length caps | 0 / 24 |
| Q8 loop-control final answers | 23 / 24 |
| Original validation JSON valid | 99.375% |
| Original validation required fields | 67.248% |
| Complex/implicit validation JSON valid | 100% |
| Complex/implicit exact records | 82.377% |
The prior r3 GGUF scored 72 overall and 94 in Complex Documents, so r5 trades one overall BenchLocal point and six Complex Documents points for much better loop termination. It is intentionally published as a starter model, not as a 95%-accurate general extractor.
Known limitations
- Multi-entity extraction and synthetic complex invoices are the primary known weaknesses.
- One loop-control planning case ended after reasoning without a final answer.
- Small models are sensitive to prompt wording and schema ambiguity.
- The GGUF and MLX packages are published in separate repositories and must be evaluated independently after conversion or quantization.