Run this model with HF Jobs
Run CounterCheck-lexsi/aawden-tiny-aya-adapters on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use CounterCheck-lexsi/aawden-tiny-aya-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CounterCheck-lexsi/aawden-tiny-aya-adapters with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
|
Download README.md from CounterCheck-lexsi/aawden-tiny-aya-adapters: direct link, hf CLI and curl.
- Browser
- Download file 5.53 kB
-
https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters/resolve/main/README.md
- Command line
-
hf download hf://CounterCheck-lexsi/aawden-tiny-aya-adapters/README.md
-
curl -L -o README.md https://huggingface.co/CounterCheck-lexsi/aawden-tiny-aya-adapters/resolve/main/README.md
5.53 kB
| license: cc-by-nc-4.0 | |
| base_model: CohereLabs/tiny-aya-global | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| tags: | |
| - lora | |
| - peft | |
| - ai-safety | |
| - sycophancy | |
| - code-review | |
| - security | |
| language: | |
| - en | |
| datasets: | |
| - CounterCheck-lexsi/aawden-reviewer-flip-bench | |
| # 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://countercheck-lexsi-aawden-article.static.hf.space | |
| - Code and protocol: https://github.com/Aya-Jmd/Aawden (success rules fixed in advance in [`docs/FIX_PROTOCOL.md`](https://github.com/Aya-Jmd/Aawden/blob/master/docs/FIX_PROTOCOL.md)) | |
| - Every number for these adapters: [`runs/fix/round2-summary.md`](https://github.com/Aya-Jmd/Aawden/blob/master/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 | |
| The snippet pins the base checkpoint revision the adapters were trained on (from each folder's `train_meta.json`). Evaluation data: [CounterCheck-lexsi/aawden-reviewer-flip-bench](https://huggingface.co/datasets/CounterCheck-lexsi/aawden-reviewer-flip-bench) (the 268 training cases are not in that dataset; they are `datasets/distill-review-train.json` in the GitHub repository). | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| from peft import PeftModel | |
| base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", revision="af89d219b53ed9b13b8a4645f9c8028973510324", torch_dtype="bfloat16", device_map="auto") | |
| tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-global", revision="af89d219b53ed9b13b8a4645f9c8028973510324") | |
| model = PeftModel.from_pretrained(base, "CounterCheck-lexsi/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). Users must also follow Cohere Labs' Acceptable Use Policy, linked from the [base model's terms of use](https://huggingface.co/CohereLabs/tiny-aya-global#terms-of-use). | |