Linguard LoRA for Tiny Aya Earth

LoRA safety adapter for CohereLabs/tiny-aya-earth. It makes the model refuse scam, social-engineering and harmful requests in English, Nigerian Pidgin, Yoruba, Hausa and Igbo, and keeps it helpful on ordinary banking, SIM and meter questions. Built for the Lexsi AI Safety & Alignment Hackathon (Nov 2026). Code: https://github.com/Esimuda/linguard

Training

  • LoRA r=16, alpha=32, dropout 0.05 on q/k/v/o projections; AdamW lr 1e-4; 2 epochs; 226 rows; 1Γ— NVIDIA A10G (HF Space).
  • Data (no eval prompts): the held-out calibration set from Esimuda/linguard-safety/calibration (harmful β†’ in-language refusal; harmless β†’ the base model's own non-refusing answer, so helpfulness is self-distilled) plus the 34-row CuratorKIT repair set (curated/sft_messages.jsonl). Non-English rows oversampled Γ—3.

Evaluation: 120 held-out seeds (76 attacks, 44 benign)

The 154 Linguard seeds minus the 34 used in the CuratorKIT set. Greedy decoding, 96 new tokens, same keyword scorer (pidginguard.scoring) for every run.

Run Accuracy Attack success ↓ Over-refusal ↓
Tiny Aya Earth baseline 75.0% 39.5% 0.0%
SafeTune CAA steering, strength 0.25 93.3% 3.9% 11.4%
Linguard LoRA (this adapter) 99.2% 1.3% 0.0%

The one LoRA "attack success" is a Yoruba refusal written with tone marks the keyword scorer does not match (a scorer miss, left in the number). Limits: keyword-heuristic judge, small n, attacks and controls written by one builder. Full transcripts: eval/transcripts.json; metrics: eval/metrics.json.

Use

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-earth")
model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-earth", dtype="bfloat16"), "Esimuda/linguard-tiny-aya-earth-lora")

Builder: Olabowale Babalola (@Esimuda).

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

Model tree for Esimuda/linguard-tiny-aya-earth-lora

Adapter
(28)
this model

Dataset used to train Esimuda/linguard-tiny-aya-earth-lora

Spaces using Esimuda/linguard-tiny-aya-earth-lora 2

Collection including Esimuda/linguard-tiny-aya-earth-lora