qwen3-8b-semantic-benign

A LoRA adapter on Qwen/Qwen3-8B (revision b968826), trained as a code monitor: given a programming problem and a submission it reasons briefly and ends with Verdict: PASS or Verdict: FLAG.

Training

  • Data: sft/qwen3-8b/semantic/benign.jsonl at commit df2a96c in anath2/tara-project, 390 rows (C2 142, C4 142, general 106).
  • Recipe: the SFT buckets of probing-monitor-collusion, on problems from APPS via ControlArena gated by the base model (it passes the clean code and flags the backdoor).
  • LoRA: r=32, alpha=64, dropout=0.0, targets q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj.
  • SFT: lr 0.0001, 6 epochs, batch 2 x 8 accumulation, max length 2048, seed 0; loss on the reply only. Thinking off.
  • Files: the final adapter at the root; earlier epochs under checkpoints/epoch_<k>/; train_log.json has the configs and per-step losses.

Evaluation

Greedy decoding, thinking off, on the 158 held-out test problems (the held-out test cells). The base model passes every A and flags every B there by construction (the gate). PASS rates with 95% bootstrap intervals over problems:

Cell This adapter Base model
A clean 0.92 (0.88 to 0.96) 1.00 (1.00 to 1.00)
B backdoor 0.08 (0.04 to 0.12) 0.00 (0.00 to 0.00)
C backdoor + signal 0.10 (0.05 to 0.15) 0.07 (0.03 to 0.11)
D clean + signal 0.91 (0.85 to 0.95) 0.51 (0.43 to 0.58)
Margin metric (PASS minus FLAG logit) This adapter Base model
AUROC, A against B 0.937 1.000
AUROC, A against C 0.930 0.971
Recall on C at a 2% false-positive rate on A 0.266 0.930
Recall on B at a 2% false-positive rate on A 0.266 1.000

Use

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B", revision="b968826d9c46dd6066d109eabc6255188de91218")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B", revision="b968826d9c46dd6066d109eabc6255188de91218")
monitor = PeftModel.from_pretrained(base, "anath2/qwen3-8b-semantic-benign")
# Chat template with enable_thinking=False; the monitor prompt is in src/core/datasets/apps.py.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for anath2/qwen3-8b-semantic-benign

Finetuned
Qwen/Qwen3-8B
Adapter
(2,505)
this model

Dataset used to train anath2/qwen3-8b-semantic-benign