GRAFT toy-environment adapters (SmolLM2-135M-Instruct)

Adapter checkpoints from 54 RL runs on the six toy reward-hacking environments of the GRAFT paper: No intervention, GRAFT and GRAFT w/o anchoring, seeds 1–3 in each environment. Every run trains adapters on the frozen HuggingFaceTB/SmolLM2-135M-Instruct.

These are re-runs, not the runs behind the paper's figures. They were trained on 2026-10-26 on Modal H200s with the paper's toy recipes. The paper's own small-scale runs were trained on RunPod pods, and their checkpoints are not released. The results table below compares the two.

Layout

  • <env>/<arm>/s<seed>/
    • checkpoint-<step>/model.safetensors: adapter weights only (bf16), saved every 500 steps. The highest step is the final policy.
    • checkpoint-<step>/dual_lora_config.json: the adapter shape, read by the loader.
    • run_config.yaml: the full training config.
    • routing_eval.jsonl: in-training evals every 10 steps (see Evaluation).
    • train.log: the training log.
  • runs.csv: one row per run, with its original run name, code commit, the final checkpoint's sha256 and end-of-training metrics.
  • MANIFEST.sha256: the sha256 of every other file.
<env> config (rl/configs/) steps
repeat_extra repeat_respmon.yaml 500
addition addition_v2_syco_respmon_iva.yaml 2000
cities_qa cities_qa_syco_respmon_iva.yaml 2000
persona_qa persona_qa_flattery_respmon_bvo.yaml 1000
object_qa object_qa_respmon.yaml 1000
sort sorting_copy_framed.yaml 1000

sort is the framed sort of the paper's main toy figure.

<arm> sweep arm training deploy with (retain, forget) scales
no_intervention dn RL with routing off; both adapters train as one policy (1, 1)
graft mlp GRAFT: detector-flagged hacks are routed to FORGET; same-environment anchor of 128 samples per rollout (1, 0)
graft_no_anchor mlp_nocoh GRAFT w/o anchoring (1, 0)

Every run has the same adapters: a RETAIN and a FORGET SwiGLU MLP adapter on each of the 30 decoder layers, 16 neurons each (829,440 parameters per side). Each adapter reads the input of the frozen base MLP and adds to its output.

Loading

With rl/ of jnward/GRAFT (main) on sys.path:

from huggingface_hub import snapshot_download
from eval_utils import load_gradient_routing_model
from gradient_routing import set_scales

run = "addition/graft/s1"
local = snapshot_download("jnward2/graft-smollm2-135m-toy-adapters", allow_patterns=f"{run}/*")
model = load_gradient_routing_model(f"{local}/{run}/checkpoint-2000",
                                    base_model="HuggingFaceTB/SmolLM2-135M-Instruct")
set_scales(model, retain_scale=1.0, forget_scale=0.0)  # deployed GRAFT: FORGET ablated
  • The loader prints WARNING: 183 unexpected missing keys. These are the base model's own weights, which an adapter-only checkpoint doesn't contain; they are loaded from base_model.
  • For no_intervention, set both scales to 1.0.
  • Weight names carry torch.compile's _orig_mod. prefix, which the loader strips.
  • Training and evaluation prompts use the model's chat template with its default system prompt.
  • Tested with main at 6da923d (torch 2.10.0, transformers 5.2.0, on CPU): the snippet loads all 180 adapter tensors exactly. Sampling 128 hackable addition prompts once each at temperature 1, addition/graft/s1 hacked on 0 with FORGET ablated and on 112 with both adapters on.

Results

End-of-training values for the deployed policy: retain reward on all eval prompts, and the ground-truth hack rate on hackable prompts. Each run's value is the mean over its last 10% of eval rows, as in the paper's toy figure; the table shows mean ± SEM over seeds 1–3, and the hack rate of each seed. The paper columns are the paper's runs, from rl/paper_data in the code repo. That bundle has no metrics for the paper's GRAFT w/o anchoring runs.

env arm retain hack hack by seed (s1 / s2 / s3) paper retain paper hack
repeat_extra no_intervention 0.974 ± 0.004 0.742 ± 0.017 0.743 / 0.772 / 0.712 0.973 ± 0.004 0.735 ± 0.003
repeat_extra graft 0.928 ± 0.003 0.000 ± 0.000 0.000 / 0.000 / 0.000 0.938 ± 0.004 0.000 ± 0.000
repeat_extra graft_no_anchor 0.323 ± 0.155 0.000 ± 0.000 0.000 / 0.000 / 0.000 — —
addition no_intervention 0.754 ± 0.003 0.750 ± 0.151 0.449 / 0.908 / 0.893 0.749 ± 0.004 0.895 ± 0.007
addition graft 0.728 ± 0.008 0.000 ± 0.000 0.000 / 0.000 / 0.000 0.706 ± 0.013 0.000 ± 0.000
addition graft_no_anchor 0.028 ± 0.014 0.000 ± 0.000 0.000 / 0.000 / 0.000 — —
cities_qa no_intervention 0.843 ± 0.010 0.955 ± 0.006 0.958 / 0.943 / 0.964 0.851 ± 0.004 0.944 ± 0.002
cities_qa graft 0.753 ± 0.041 0.275 ± 0.275 0.825 / 0.000 / 0.000 0.744 ± 0.021 0.000 ± 0.000
cities_qa graft_no_anchor 0.000 ± 0.000 0.000 ± 0.000 0.000 / 0.000 / 0.000 — —
persona_qa no_intervention 0.523 ± 0.025 0.996 ± 0.002 0.992 / 0.996 / 0.998 0.481 ± 0.025 0.989 ± 0.005
persona_qa graft 0.360 ± 0.038 0.022 ± 0.012 0.044 / 0.005 / 0.017 0.346 ± 0.017 0.021 ± 0.009
persona_qa graft_no_anchor 0.284 ± 0.023 0.029 ± 0.011 0.051 / 0.021 / 0.014 — —
object_qa no_intervention 0.593 ± 0.010 0.833 ± 0.015 0.830 / 0.808 / 0.861 0.557 ± 0.014 0.790 ± 0.003
object_qa graft 0.502 ± 0.017 0.092 ± 0.091 0.274 / 0.000 / 0.001 0.492 ± 0.012 0.001 ± 0.001
object_qa graft_no_anchor 0.345 ± 0.019 0.001 ± 0.001 0.000 / 0.000 / 0.003 — —
sort no_intervention 0.365 ± 0.013 0.973 ± 0.004 0.977 / 0.976 / 0.966 0.356 ± 0.034 0.971 ± 0.006
sort graft 0.408 ± 0.033 0.035 ± 0.005 0.036 / 0.043 / 0.026 0.435 ± 0.017 0.034 ± 0.003
sort graft_no_anchor 0.047 ± 0.044 0.001 ± 0.001 0.002 / 0.000 / 0.000 — —

The largest differences from the paper's runs: in cities_qa and object_qa, one GRAFT seed's deployed policy hacks, where none of the paper's seeds does; in addition, No intervention seed 1 hacks about half as often as the other seeds and the paper's runs.

Evaluation

routing_eval.jsonl has one row per eval step: every 10 steps, plus step 0 for sort. Each eval samples 256 fixed test prompts once per adapter mode (both, retain_only, forget_only) at temperature 1. Keys are <mode>/<metric>/<reward or detector>; the table uses retain/… and hack_freq_hackable/…. No intervention's deployed policy is its both mode.

Provenance

  • Code: the sweep respmon_loreft_toy, on a development branch of jnward/GRAFT that is not public. Five environments ran as respmon_loreft_toy-1026-0145 at commit 26690b2. Sort ran as respmon_loreft_toy_sort at 334b21e, after the first attempt stopped at step 0. The sweep also trained other adapter variants, which are not included here.
  • Recipe: the paper's toy recipe (_shared and _new in rl/sweeps/respmon_repro_coh128_lam1_3seed.py on main) with the configs and step counts above. Each run's run_config.yaml has every setting; the paper's appendix "RL hyperparameters for SmolLM2-135M" describes them.
  • Differences from the paper's runs: a later version of the code, vLLM in eager mode instead of compiled, and Modal H200s instead of RunPod pods with CUDA MPS.
  • Differences between that branch and public main (6da923d):
    • support for other adapter types, which these arms don't use;
    • a flag that sets the tolerance of a step-0 check comparing old log-probs from the packed and padded forward passes. Sort used 5e-2. main hard-codes 3e-2, and on Modal H200s sort measured 3.27e-2, so on similar hardware main stops sort runs at step 0;
    • a reordering that only changes the logged sampling/* diagnostics, plus infrastructure changes.
    • These runs were not repeated on main.
  • Stack (the Modal image, rl/requirements-modal.txt; main pins the same): torch 2.10.0, transformers 5.2.0, trl 0.29.0, vllm 0.17.0, liger_kernel 0.7.0.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jnward2/graft-smollm2-135m-toy-adapters

Finetuned
(430)
this model

Paper for jnward2/graft-smollm2-135m-toy-adapters