A LoRA adapter for Qwen/Qwen2.5-Coder-14B-Instruct, trained as a candidate
for the Reviewer role in trace,
a research system that turns known upstream security fixes into merge-ready
nixpkgs evidence bundles. trace's actual certification pipeline uses frontier
models (Claude) for the Reviewer role; this adapter is the open-weight
research track asking whether a fine-tuned 14B model can take that role
instead. It is not what currently reviews a real trace bundle.
Given a machine-authored security backport patch and the human upstream fix it claims to reproduce, the adapter emits an accept or reject verdict with a short grounded rationale. It checks that the backport transcribes the upstream fix, addresses the stated CVE, keeps the change minimal, and does not invent claims the artifacts do not support.
It is not a general-purpose code reviewer or a vulnerability scanner, and on the evidence below it is not a reliable autonomous accept/reject gate either. It answers one narrow question inside the trace contract: does this backport match the ground-truth fix.
On a 34-example family-disjoint fold (data/splits/reviewer-v2-bigfold.json
in the trace repository), this adapter does not match a frontier model on
verdict substance: 27/34 (0.794) correct, with 7 false accepts and an
accept-biased pattern (it waves through roughly half of bad patches), against
0.971 (33/34, 0 false accepts) for a frontier model on the same fold. What
holds up is narrower: 1.000 schema-conformance, more reliable than the
frontier model's 0.65 on well-formed output. An earlier, smaller 11-example
fold had reported this adapter matching frontier; that fold was reused as a
release gate across 11 adapter versions, had too few hard negatives to expose
the accept bias, and is retired in favor of the 34-example result above. Full
methodology: docs/FINDINGS_LORA.md
in the trace repository.
QLoRA on the reviewer-lora-data
corpus: valid review bundles as positives and constructed wrong-patch examples
as negatives, all derived from the trace corpus.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "Qwen/Qwen2.5-Coder-14B-Instruct"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "adastracomputing/reviewer-lora-v1.10")
The review prompt and the surrounding contract live in the trace repository. Run the adapter with that prompt; a bare instruction will not reproduce the trained behaviour. Given the result above, do not use this adapter as an autonomous accept/reject gate without a human in the loop.
Apache-2.0, matching the base model.
Qwen/Qwen2.5-Coder-14B-Instruct