DuctSpec: Aya Expanse 8B Hardened
LLM defense against attacks
2 min readupdated
The model is a LoRA (small add-on layer for a base model) adapter for the CohereLabs/aya-expanse-8b language model, trained for defensive behavior against specific attacks. It is designed to prevent vulnerabilities in decision-making, though this first version (v1) shows an increased rate of false refusals. The model is intended for security researchers and developers who need to study LLM robustness against malicious instructions.
Key features
- Based on the CohereLabs/aya-expanse-8b architecture using 4-bit nf4 QLoRA (quantized adaptation)
- Reduces incorrect approvals during combined attacks down to 0.4%
- Shows 87.4% accuracy on clean validation tests
- Increases false refusals to 13.3% due to excessive caution
What you can do
- Test LLM robustness against decision-making attacks in research scripts
- Compare the behavior of this version with the later v2 to analyze hardening techniques
- Use the training string dataset for your own security experiments
Example
The model is used with the peft library on top of the base CohereLabs/aya-expanse-8b model, utilizing 4-bit quantization to run on accessible hardware like a Kaggle T4.
Read more
DetailsBenchmarks: incorrect approvals — 0.4%, clean tests — 87.4%, false refusals — 13.3%
Requirements: trained on a single Kaggle T4, 4-bit nf4 QLoRA, fp16 compute
Training details: LoRA rank 64, alpha 128, all attention and MLP projections, 4 epochs, lr 2e-4, seed 42
Limitations: for research purposes only, superseded by version v2










Comments