Instructions to use RishyanthReddy/aawden-tiny-aya-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RishyanthReddy/aawden-tiny-aya-adapters with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Aawden adapters for Tiny Aya Global
LoRA adapters from Aawden (Lexsi AI Safety hackathon, Track 2). The question: when a reviewer tells a model "this code is safe" and it is not, does the model check the code or agree with the reviewer? These adapters train the verdict to follow the code whatever the reviewer says.
This repository holds every adapter we trained on Tiny Aya Global, including the controls and the ones that failed, so the claims in the write-up can be checked. Each adapter is in its own folder.
- Write-up: https://rishyanthreddy-aawden-article.static.hf.space
- Code and protocol: https://github.com/Aya-Jmd/Aawden (success rules fixed in advance in
docs/FIX_PROTOCOL.md) - Every number for these adapters:
runs/fix/round2-summary.md
| folder | what it is | seed | notes |
|---|---|---|---|
tinyaya-curr-s17 |
two-stage recipe (R12) | 17 | Starts from the task-only adapter, then continues on the four-wording data (2,948 rows, 2 epochs). The recipe that works on the small Aya models. |
tinyaya-curr-s29 |
two-stage recipe (R12) | 29 | Starts from the task-only adapter, then continues on the four-wording data (2,948 rows, 2 epochs). The recipe that works on the small Aya models. |
tinyaya-curr-s43 |
two-stage recipe (R12) | 43 | Starts from the task-only adapter, then continues on the four-wording data (2,948 rows, 2 epochs). The recipe that works on the small Aya models. |
tinyaya-antidef-s17 |
anti-deference | 17 | Trained on 268 security-review cases, each shown three ways (no reviewer, a correct reviewer, a wrong reviewer) with the same correct target. One reviewer wording (reviewer). Collapsed to one fixed answer (64/64/64) and fails the competence rule. Published as a failure, not for use. |
tinyaya-antidef-s29 |
anti-deference | 29 | Trained on 268 security-review cases, each shown three ways (no reviewer, a correct reviewer, a wrong reviewer) with the same correct target. One reviewer wording (reviewer). Collapsed to one fixed answer (64/64/64) and fails the competence rule. Published as a failure, not for use. |
tinyaya-neutralonly-s17 |
task-only control | 17 | Same 268 cases and the same number of steps (6 epochs), but no reviewer line in any prompt. Separates 'got better at the task' from 'learned to resist the reviewer'. |
tinyaya-prior-s17 |
prior-answer (round 3, R9) | 17 | Anti-deference data plus rows where the model's own earlier answer is shown; tests anchoring. pushback was never trained. |
Load one
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", torch_dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-global")
model = PeftModel.from_pretrained(base, "RishyanthReddy/aawden-tiny-aya-adapters", subfolder="tinyaya-curr-s17")
The prompt format the adapters were trained and measured on is in src/security_wsp/prompts.py and
scripts/wsp_cross_model.py in the GitHub repository. The answer is the JSON verdict after the
{"verdict":" prefill.
Training
LoRA rank 16, alpha 32, dropout 0.05, on all seven projection modules (q_proj, k_proj, v_proj,
o_proj, gate_proj, up_proj, down_proj); learning rate 1e-4; batch 1 with gradient accumulation 8;
2 epochs, except the task-only controls, which run 6 epochs over their 268 rows so that they take the
same 201 steps as the anti-deference adapters (804 rows, 2 epochs). The scaled adapters (-x0.25,
-x0.5, -x0.75) were not trained: they are the seed-17 adapter with its LoRA B matrices multiplied,
recorded in scale.json. Exact settings, row counts, data hashes and run time for each adapter are in its
train_meta.json (the scaled adapters have none); the loss curve is in loss.json. Paths inside train_meta.json are the cluster
paths the run used. Training data comes from 134 families that never appear in the test set.
Limits
- Research artifacts, not a production security tool.
- Python security review in English, mostly SQL injection and access control, on templated files.
- The adapter ignores reviewers, including correct ones. It does not learn which reviewer to trust.
- Labels were written by one author and have not been independently reviewed.
Licence
The adapters are derived from CohereLabs/tiny-aya-global and follow its licence (cc-by-nc-4.0).
- Downloads last month
- -