Open model · Code review
BTL-2 Coder 7B
A small open blade — local, inspectable, and built for code-review findings.
A 7B LoRA adapter on Qwen2.5-Coder that returns structured security and correctness findings with file-level evidence and numeric confidence. Not a frontier clone. A downloadable model that ships with weights, evals, and receipts.
{
"severity": "critical",
"file": "src/users.ts",
"line": 42,
"title": "SQL injection through
string-built query",
"evidence": "User id is concatenated
directly into the SQL string.",
"recommendation": "Use a parameterized
query.",
"confidence": 0.96
}What it catches
Narrow on purpose.
Tuned for findings.
It is not a general chat model wearing a security hat. The adapter is trained to emit one thing well: a JSON array of findings, each with a severity, the file and line, concrete evidence, a recommendation, and a confidence number you can threshold on.
Receipts
Evals, not vibes.
Measured on an NVIDIA H200 with 4-bit adapter inference under strict schema prompting. Strict schema validity climbs from 0.43 to 0.95 once the prompt contract is included — the runtime ships that contract by default.
| Eval | JSON parse | Schema valid | Category hit | File hit |
|---|---|---|---|---|
| Heldout 100 strict | 1.00 | 0.95 | 0.78 | 0.84 |
| Heldout 30 strict v2 | 1.00 | 0.98 | 0.87 | 0.87 |
| Seeded 15 strict | 1.00 | 1.00 | 0.93 | 1.00 |
| Seeded 15 strict v2 | 1.00 | 1.00 | — | — |
Seeded controlled benchmark reaches 0.933 precision / 0.933 recall and 0.956 weighted severity recall. Full breakdown in reports/EVAL_SUMMARY.md.
Not a Mythos clone
If Mythos is the locked frontier giant,
this is the small open one.
We are not claiming frontier-class capability or piggybacking on a brand. The claim is narrower and stronger: a model you can actually download, inspect, and run on your own hardware — with the training recipe and evals in the open.
Quickstart
Pull it. Run it.
from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base = "unsloth/Qwen2.5-Coder-7B-Instruct" adapter = "badtheorylabs/btl-2-coder" tok = AutoTokenizer.from_pretrained(adapter) m = AutoModelForCausalLM.from_pretrained(base, device_map="auto") m = PeftModel.from_pretrained(m, adapter)
ollama pull qwen2.5-coder:7b
curl http://localhost:8787/v1/agents/code/runs \
-H 'content-type: application/json' \
-d '{
"task": "Review for security bugs",
"workspaceRoot": "/path/to/repo",
"mode": "review"
}'Weights, evals, and receipts.
All of it is downloadable. None of it is a black box.