Instructions to use Sykeclonex/intentlock-tiny-aya-plain-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Sykeclonex/intentlock-tiny-aya-plain-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global") model = PeftModel.from_pretrained(base_model, "Sykeclonex/intentlock-tiny-aya-plain-sft") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Sykeclonex/intentlock-tiny-aya-plain-sft: direct link, hf CLI and curl.
- Browser
- Download file 3.17 kB
-
https://huggingface.co/Sykeclonex/intentlock-tiny-aya-plain-sft/resolve/main/README.md
- Command line
-
hf download hf://Sykeclonex/intentlock-tiny-aya-plain-sft/README.md
-
curl -L -o README.md https://huggingface.co/Sykeclonex/intentlock-tiny-aya-plain-sft/resolve/main/README.md
3.17 kB
| license: cc-by-nc-4.0 | |
| base_model: CohereLabs/tiny-aya-global | |
| library_name: peft | |
| tags: [lora, ai-safety, prompt-injection, agents, safetune, lexsi-hackathon] | |
| datasets: [Sykeclonex/intentlock-scenarios] | |
| # Intentlock: plain-SFT ablation | |
| Ablation: the same data and hyperparameters as the hardened adapter, with ordinary SFT instead of SafeGrad. | |
| LoRA adapter for [`CohereLabs/tiny-aya-global`](https://huggingface.co/CohereLabs/tiny-aya-global), built for **Intentlock** (Lexsi AI | |
| Safety and Alignment Hackathon, Track 2). Code and full results: | |
| <https://github.com/davieslennox0/intentlock>. | |
| ## Training | |
| Plain supervised fine-tuning on safe trajectories built from the `train` split only. | |
| ```json | |
| { | |
| "method": "plain", | |
| "args": { | |
| "model": "CohereLabs/tiny-aya-global", | |
| "method": "plain", | |
| "data": "data/sft/agent_train.jsonl", | |
| "val": "data/sft/agent_val.jsonl", | |
| "out": "outputs/hardened-plain", | |
| "epochs": 1.0, | |
| "batch_size": 1, | |
| "lr": 4e-05, | |
| "lora_r": 16, | |
| "lora_alpha": 32, | |
| "max_len": 1536, | |
| "grad_accum": 1, | |
| "longest_first": false, | |
| "max_steps": -1, | |
| "amp": "auto", | |
| "time_budget_min": 170.0, | |
| "rho": 0.1, | |
| "safety_n": 256, | |
| "kl_reference": false, | |
| "load_in_4bit": true, | |
| "no_grad_checkpointing": false, | |
| "max_rows": null, | |
| "seed": 7, | |
| "push": null | |
| }, | |
| "train_rows": 1976, | |
| "length_cap": { | |
| "data/sft/agent_train.jsonl": { | |
| "rows_in": 1976, | |
| "dropped_over_max_len": 0, | |
| "max_len": 1536, | |
| "longest_row_tokens": 1443 | |
| }, | |
| "data/sft/agent_val.jsonl": { | |
| "rows_in": 165, | |
| "dropped_over_max_len": 0, | |
| "max_len": 1536, | |
| "longest_row_tokens": 1433 | |
| } | |
| }, | |
| "grad_accum_used": 1, | |
| "effective_batch": 1, | |
| "amp": "fp16", | |
| "planned_steps": 1976, | |
| "stopped_by_time_budget": false, | |
| "seconds_per_step": 3.61, | |
| "steps": 1976, | |
| "lora": { | |
| "r": 16, | |
| "alpha": 32, | |
| "dropout": 0.05, | |
| "target_modules": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ] | |
| }, | |
| "val_rows": 165, | |
| "safety_set": null, | |
| "train_loss": 0.12183004412196788, | |
| "wall_seconds": 7127.8, | |
| "final_eval_loss": 0.07383585721254349, | |
| "versions": { | |
| "safetune": "0.1.12", | |
| "transformers": "5.20.2", | |
| "torch": "2.11.0+cu130", | |
| "python": "3.13.16" | |
| }, | |
| "gpu": "Tesla T4", | |
| "peak_gpu_memory_gb": 9.49 | |
| } | |
| ``` | |
| ## Use | |
| ```python | |
| from peft import PeftModel | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-global") | |
| model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global"), "Sykeclonex/intentlock-tiny-aya-plain-sft") | |
| ``` | |
| The prompt format (system prompt, strict-JSON actions, boundary tags) is in `testbed/prompts.py` | |
| of the GitHub repository; the adapter expects that format. | |
| ## Limits | |
| Trained and evaluated on synthetic scenarios with mock tools. It reduces injection-following on that | |
| distribution; it is not a guarantee against real attackers and must not be the only control in front | |
| of real funds. Inherits Tiny Aya's CC-BY-NC-4.0 licence. | |