Tiny Aya refusal steering (Lexsi hackathon)
Collection
Refusal steering on tiny-aya-global: SafeTune direction, all outputs, blind labels and AuditKIT results. Lexsi hackathon, Track 2b. โข 2 items โข Updated
This repo holds a single refusal direction (direction.pt) for CohereLabs/tiny-aya-global. It is not a fine-tuned model: the base weights are unchanged. At inference time, SafeTune adds this vector to the residual stream. It was made for the Lexsi AI Safety and Alignment Hackathon (Track 2b, problem 8).
CohereLabs/tiny-aya-global at revision af89d219b53ed9b13b8a4645f9c8028973510324, loaded in NF4 4-bit with BF16 compute.extract_refusal_direction(..., RefusalDirectionConfig(select_directions=False)), using 32 harmful and 32 harmless prompts from refusal_prompt_pairs_large(32). Taken from layer 18.direction, layer, model, revision, safetune and calibration. direction is a float32 unit vector of length 2048 (norm 1.0). SHA-256 of direction.pt: 036bcf013764d50a49a41e9701e9a1b71cb05f5ff9d591d3b1e6720045a2cab8spike/direction_cell.py), calibration prompts, model revision and SafeTune version. The file from the evaluation run itself was not kept. Re-extraction gave the same layer (18); the vectors are not compared byte for byte.import torch, safetune.steer as S
d = torch.load("direction.pt", weights_only=True)
steered = S.RefusalDirectionModel(model, direction=d["direction"], mode="steer", strength=0.25, layers=None)
with steered:
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
These results are on 30 paired electrical-site-safety prompts, labelled blind by two labellers:
Outputs and labels: https://huggingface.co/datasets/osiyomeoh/tiny-aya-steering-electrical-safety. Code: https://github.com/Osiyomeoh/tiny-aya-refusal-steering.
Licence: CC-BY-NC-4.0, inherited from the base model. Cohere Labs' acceptable use policy also applies.