Instructions to use Sykeclonex/intentlock-tiny-aya-hardened with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Sykeclonex/intentlock-tiny-aya-hardened 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-hardened") - Notebooks
- Google Colab
- Kaggle
Intentlock: hardened wallet agent (SafeGrad)
Tiny Aya fine-tuned to treat tool output as data: it completes the user's task and ignores instructions planted in token metadata, listings, API responses and READMEs.
LoRA adapter for 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
SafeTune SafeGradHFTrainer (gradient surgery against a BeaverTails alignment set) on safe trajectories built from the train split only.
{
"method": "safegrad",
"args": {
"model": "CohereLabs/tiny-aya-global",
"method": "safegrad",
"data": "data/sft/agent_train.jsonl",
"val": "data/sft/agent_val.jsonl",
"out": "outputs/hardened-safegrad",
"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": 4.03,
"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": {
"source": "safetune.runner.harden.load_harden_data (BeaverTails)",
"rows": 256,
"mode": "cross_entropy_proxy"
},
"train_loss": 0.12191217529930566,
"wall_seconds": 7955.3,
"final_eval_loss": 0.07334231585264206,
"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
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-hardened")
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.
- Downloads last month
- 53