Tiny Aya Global refusal adapter (second version, recommended)

A LoRA adapter for CohereLabs/tiny-aya-global. With it the model helps with fewer harmful requests in English, Hindi, Arabic, French and Swahili, keeps its fluency, and stops writing once it has refused. It is the adapter we recommend from the Circuit-Steering study (Lexsi hackathon, Track 2b).

Base model With this adapter
Harmful requests answered, Hindi / Arabic / French / Swahili 12.4 % 7.1 %
Harmful requests answered, English 8.8 % 4.4 %
Harmless prompts refused (the cost) 3.1 % 6.1 %
Perplexity on English text (fluency) 1.00Γ— 1.02Γ—

Harmful requests answered by language, and harmless prompts refused: base model, SafeTune steering and this adapter

Every language has 159 held-out harmful requests, and two of the three harm categories were never used in training. An LLM judge reads each reply. SafeTune steering is the baseline we compare against.

Quick start

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = "CohereLabs/tiny-aya-global"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, dtype="bfloat16")
model = PeftModel.from_pretrained(model, "MdSadiqMd/tiny-aya-global-refusal-circuit-lora-fluent")

Do not merge the adapter into the model. Merging into bf16 weights rounds 31–43 % of the change to zero.

Which adapter should I use?

This one. The first adapter answers fewer harmful requests on its released run, but it writes less fluent text and usually keeps writing after it refuses. Averaged over three training seeds the two are close: 6.6 % harmful requests answered outside English for this recipe, 5.9 % for the first.

Second (this one) First SafeTune steering Base model
Harmful requests answered, outside English 7.1 % 3.8 % 8.8 % 12.4 %
Harmful requests answered, English 4.4 % 1.9 % 3.8 % 8.8 %
Harmless prompts refused 6.1 % 8.8 % 15.3 % 3.1 %
Perplexity, English text 1.02Γ— 1.26Γ— 1.04Γ— 1.00Γ—
Perplexity, five languages 1.02Γ— 1.40Γ— 1.04Γ— 1.00Γ—
Replies that stop at the refusal 84–94 % 1–77 % – –

The two defects of the first adapter, fixed in this one: replies that stop at the refusal, and perplexity on unseen text, by language

What else changed

We checked what the adapter does to everything it was not trained for.

Change against the base model on five ability checks, with 95 % intervals, for both adapters

  • No clear change in nearby facts, general knowledge, maths or instruction following.
  • Reworded facts get worse: accuracy falls 3.5 points (95 % CI βˆ’6.5 to βˆ’1.0).
  • More harmless prompts are refused: 3.1 % β†’ 6.1 %. The rise is concentrated in Swahili (3 % β†’ 19 %), where the harmless prompts are machine-translated idioms.

All numbers

Held-out test set Base This adapter
Harmful requests answered, hi/ar/fr/sw (LLM judge, 636 replies) 12.4 % 7.1 % (βˆ’5.3 points, 95 % CI βˆ’7.7 to βˆ’3.1)
Harmful requests answered, English (159) 8.8 % 4.4 % (βˆ’4.4, CI βˆ’8.2 to βˆ’1.3)
Harmful requests answered, XSTest unsafe (200; training used only XSTest's safe prompts) 3.5 % 2.5 %
Harmless prompts refused, 5 languages (295 look-alike prompts) 3.1 % 6.1 %
Perplexity, WikiText 1.00Γ— 1.02Γ—
Perplexity, unseen sentences in 5 languages 1.00Γ— 1.02Γ—
Accuracy on known facts, 5 languages 0.877 0.873
Accuracy on reworded known facts, 5 languages 0.840 0.805
Global-MMLU, 5 languages 0.453 0.450
Replies to harmful requests that are only the refusal, en / hi / ar / fr / sw – 94 / 87 / 87 / 84 / 91 %

No test prompt is in the training or dev set.

How it was made

  1. Find the components. CircuitKIT (EAP-IG) scores every attention head and MLP on an English refusal task. The top 30 % are kept: 149 of the model's 576 heads and 35 of its 36 MLPs.
  2. Train only those. LoRA rank 8, alpha 16, learning rate 2e-4, 13.5 M trained entries. The head-level masks are stored as zeros in the adapter, so the restriction survives loading.
  3. Three training signals.
    • Refuse: 80 harmful prompts of one category (weapons and violence, from MultiJail and HarmBench) in five languages, each paired with the model's own most frequent short refusal in that language. The refusal ends with the model's real end tokens, <|END_RESPONSE|><EOS_TOKEN>. The first adapter's refusals ended with a token that generation ignores, the likely reason it kept writing.
    • Keep helping: 151 XSTest safe prompts in five languages, each paired with the base model's own reply.
    • Keep fluent: 585 sentence beginnings (XNLI in five languages, WikiText-2), each paired with a continuation sampled from the base model at temperature 1. Greedy continuations raise perplexity; sampled ones do not.
  4. Pick the checkpoint by a rule fixed before training, on a dev split. Step 60 of 120 was kept.
  5. Audit, and compare with SafeTune steering and with the same adapter trained on random components.

Training took 11 minutes on an Apple M4 Max.

Limits

  • The circuit is not why it works. The same adapter trained on random components of the same size performs the same, within one point. With 35 of 36 MLPs it is also not a small circuit.
  • One base model and one released run. Over three seeds, harmful requests answered outside English average 6.6 %.
  • The judge is a local 27 B model (Qwen3.8-27B) that reads replies cut at 48 tokens. 60 of its labels were checked by the AI assistant that ran the analysis, not yet by a person.
  • The side-effect test sets are small (per language 60 facts, 40 reworded facts, 60 MMLU questions), so small changes can hide. The part of our audit that looks at other circuits was not run on this adapter.
  • This is not a guarantee of safety. The audit sees only what it measures.

Details

How the numbers were measured

Every prompted number on this card was measured with a minimal chat format: the user turn only, no system preamble (chat_wrap in aya_circuits/model.py, https://github.com/MdSadiqMd/tiny-aya-circuits). Perplexity is measured on raw text. The tokenizer's default chat template adds a system preamble of about 366 tokens. On the base model a small English check gave identical scores in both formats; the adapter was evaluated with the minimal one only.

Check that the published adapter is the audited one

export_check.json in this repo records that the PEFT-loaded adapter gives the same next-token logits as the audited one on 78 prompts (maximum difference 0.0) and the same generations on 297 dev prompts (100 % identical).

The checkpoint rule and the release rule

Checkpoint rule, fixed before training: the earliest snapshot with dev harmful refusal β‰₯ 0.95, dev harmless refusal at most 0.05 above the base, and dev plain-text perplexity at most 1.05Γ— the base. No snapshot met all three conditions (step 60: dev harmful refusal 0.94 against 0.95), so the rule's fallback (largest harmful minus harmless refusal, minus any perplexity excess) kept step 60 of 120.

Release rule, fixed before this adapter was trained: the first adapter stays the study's official release, because on this one seed the difference in harmful requests answered (3.3 points) exceeds the 3.0 allowed. The difference in fluency (1.02Γ— against 1.26Γ—) is why we recommend this one.

Links and licence

This adapter is a derivative of CohereLabs/tiny-aya-global and carries that model's licence (CC-BY-NC 4.0) and Cohere's acceptable-use terms. Code: BSD-3-Clause.

Downloads last month
51
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for MdSadiqMd/tiny-aya-global-refusal-circuit-lora-fluent

Adapter
(455)
this model

Collection including MdSadiqMd/tiny-aya-global-refusal-circuit-lora-fluent