Reasonable Doubt
A contract-clause classifier that tells you when it isn't sure
The question
LEDGAR has about 80,000 provisions from SEC filings, labelled into 100 clause types. Can a small model do this job as well as a frontier LLM, for a fraction of the price, and know when it's guessing?
What I built
I planned a three-tier cascade: a fine-tuned encoder, a QLoRA-tuned Qwen2.5-1.5B, and Claude for the hard rows. I measured each tier before trusting it. The small decoder lost to the encoder, and sending low-confidence rows to Sonnet 5 moved macro-F1 by +0.0008, with a confidence interval across zero. Both were dropped. What ships is one DeBERTa-v3 model in ONNX behind FastAPI on Cloud Run, with a needs_review flag on low-margin answers.
What surprised me
The INT8 build of the same weights scored 0.000166 macro-F1 on CPUs without AVX-512 VNNI. That's chance level, and it raised no error. Cloud Run doesn't let you pick the CPU, so the service now classifies 200 fixed rows at startup and refuses to answer until they pass.
Where it falls short
The flag doesn't catch text that isn't a contract at all. I sent 20 non-contract paragraphs through it and 10 came back confident. A data-access policy got labelled Records at 99.9%. That's written up in the report, not hidden.