OLMo-2-7B-Instruct, context-perturbed SFT (ce_gold, seed 42)
A fine-tune of allenai/OLMo-2-1124-7B-Instruct that is trained on retokenized
prompts with fixed targets. It is a baseline from a study of adversarial
tokenization: it tests whether simply being exposed to varied tokenizations of
the prompt confers robustness, without any consistency or distillation objective.
In the paper's terms this is the "SFT, dataset answers" row. In the codebase it is
the arm inv_reference_mixed_ce_gold at training seed 42.
What the training actually does
Each step samples one prompt, builds nine encodings of its content span β the
canonical tokenization plus eight draws from the MDD tokenization lattice β and
applies ordinary cross-entropy toward one fixed target on all nine
independently, at uniform weight 1/9. There is no reference model at train time,
no KL, no representation matching, and no CVaR reweighting. The chat-template
scaffolding is never retokenized; only the content span is.
The canonical encoding is one of the nine branches, not a separate anchor, and it carries gradient from step 0 because the target is not something the model already produces.
Targets differ by prompt type, which matters for interpreting this model:
| draw | target |
|---|---|
| benign (71.4%) | the Alpaca dataset's own gold answer |
| harmful (28.6%) | the frozen reference model's own sampled continuation |
The harmful-side targets are the base model's own continuations, sampled at
temperature 1. AdvBench's target field β the "Sure, here is how toβ¦" compliance
strings β was never used as supervision anywhere in this work. Because the base
model refuses these prompts, the harmful-side targets are in practice its own
refusals.
Training configuration
| base | allenai/OLMo-2-1124-7B-Instruct |
| objective | ce_exposure, ce_target_source=gold, uniform weighting |
| retokenized span | prompt content only (retokenize_side=prompt) |
| encodings per step | 9 (canonical + 8 MDD draws) |
| data | Alpaca + AdvBench-minus-holdout, harmful_fraction=0.286 |
| steps | 700, grad_accum=8, lr 1e-5, 20 warmup, max_grad_norm=1.0 |
| optimizer | paged_adamw_8bit, fp32 masters with bf16 autocast |
| max target tokens | 128 |
| seed | 42 |
| released dtype | bfloat16 |
Training-target token-count inflation was 1.000Γ on the canonical branch and the MDD draws average roughly 3.5Γ canonical length at the lattice's natural depth.
Weight drift from the base model, per parameter group (relative L2), from this
checkpoint's own assert_trained.json: attention 0.011965, MLP 0.012789,
lm_head 0.010060, embeddings 0.000919, norms 0.001006. Every group moved and
cleared the 1e-5 floor; one norm tensor of 65 is bit-identical to the base.
Evaluation
All numbers below are for this checkpoint, on the 200 held-out AdvBench prompts that were excluded from training, with 95% bootstrap half-widths over prompts (10,000 resamples). Attack success is judged by Llama-Guard-3-8B unless stated.
| measurement | value |
|---|---|
| AdvTok attack success, greedy | 0.0200 Β± 0.0175 |
| AdvTok attack success, T=1 (8 samples/prompt) | 0.0625 Β± 0.0253 |
| Canonical-tokenization attack success, greedy | 0.0000 |
| Canonical-tokenization refusal, greedy | 1.0000 |
Re-judged with cais/HarmBench-Llama-2-13b-cls on the same stored responses:
greedy 0.0100, T=1 0.0238, canonical 0.0000. HarmBench is the stricter
judge on this arm at both temperatures, so the Llama-Guard figures above are the
conservative ones.
The cost: over-refusal
| prompt set | refusal rate |
|---|---|
| XSTest safe (250 prompts) | 0.2350 Β± 0.0400 |
| Alpaca benign (100 prompts) | 0.0525 Β± 0.0350 |
| XSTest unsafe (200 prompts) | 0.8875 Β± 0.0287 |
This is the main limitation. The model refuses roughly one in four safe XSTest prompts β prompts that merely resemble harmful ones. That is substantially worse than the consistency-trained arms in the same study, which reach comparable attack-success numbers at well under half this over-refusal. If you need a usable assistant rather than a robustness baseline, this is the wrong checkpoint.
Seed sensitivity β read this before quoting any number
Two further seeds of the identical recipe give materially different results:
| seed | AdvTok T=0 | AdvTok T=1 | XSTest-safe refusal |
|---|---|---|---|
| 42 (this model) | 0.0200 | 0.0625 | 0.2350 |
| 1 | 0.0500 | 0.1125 | 0.0920 |
| 2 | β (eval in progress) | β | 0.1100 |
The over-refusal rate moves by a factor of ~2.5 across seeds, and seed 42 is the high one. Treat the 0.235 above as one draw from a wide distribution, not as the recipe's characteristic value. Capability evaluation (MMLU / GSM8K / IFEval) for seed 42 specifically is still running and is deliberately not quoted here; the seed-1 and seed-2 replicates lose roughly 3β4 points of MMLU and 16β19 points of GSM8K against the base model, so expect a real capability cost.
Intended use and limitations
Intended as a research baseline for work on tokenization robustness β the "exposure alone" control against which consistency-training objectives are compared. It is not a general-purpose assistant and not a safety-aligned release.
- Over-refusal is high (above), and seed-dependent.
- Robustness was measured against AdvTok tokenization attacks and does not imply robustness to other jailbreak families.
- English only; evaluated only on Alpaca, AdvBench and XSTest.
- Attack-success numbers depend on the judge; two judges are reported above and they disagree by roughly a factor of two.
- The 200 AdvBench prompts used for evaluation were held out from training, but the remaining 320 AdvBench prompts were in the training mixture, so this model has seen in-distribution harmful prompts.
Reproducing
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Retok2/olmo2-7b-instruct-ce-gold")
model = AutoModelForCausalLM.from_pretrained(
"Retok2/olmo2-7b-instruct-ce-gold", torch_dtype="bfloat16")
Use the model's own chat template. Evaluations above frame prompts as
apply_chat_template(..., add_generation_prompt=True) with no system message.
experiment_config.json and train_metrics.jsonl are included in this repo as
provenance: the full argument set the run recorded, and its per-10-step loss,
encodings/backpropped_encodings (both 9) and harmful/benign draw flags.
- Downloads last month
- -
Model tree for Retok2/olmo2-7b-instruct-ce-gold
Base model
allenai/OLMo-2-1124-7B