Files
Joseph Magly 46d6dc69aa feat(verify): fail VERIFY when an edit increases refusal
On Llama-3.1-8B a basic all-layer edit raised refusal from 88.7% to 99.3%
and benign over-refusal by 84.5 points, and the built-in VERIFY did not
fail it; only the separate verify-edit did.

The stock baseline now measures refusal on a bounded deterministic
sample of the evaluation harmful and harmless prompts
(refusal_baseline_size, default 32; 0 disables). VERIFY measures the
edited model on the same sample with the same generation settings and
rejects the run with PipelineQualityRejectedError when either rate rises
by more than max_refusal_increase (default 0.05; None measures without
rejecting). A baseline skipped for admission or memory records its
reason and never rejects. Both options are appended to the constructor
signature, and the refusal golden configs gain them.

The beam-output qualification test now disables the gate, so it keeps
asserting its original scoring and post-verify probe behaviour; the
gate itself is covered by tests/test_refusal_increase_gate.py.

Refs #537
2026-11-19 11:40:18 -05:00
..

Offline model fixture

tiny_offline_model.py creates a one-layer, 4,480-parameter GPT-2 causal language model and an eleven-token WordLevel tokenizer at test time. The model is initialized from a fixed seed (20260814); it is not trained and contains no downloaded weights or dataset content.

The generated artifact is repository-owned test data under the project's AGPL-3.0-only license. Its purpose is software integration testing only. It does not support research, safety, capability, or model-quality claims.

Tests must build the fixture inside pytest's temporary directory and load it with Hugging Face offline mode enabled. Do not replace it with a Hub model or depend on a pre-populated cache.