Intentlock: pre-signing guard

Tiny Aya classifier that reads the user's task, recent tool outputs and a proposed transaction payload, and answers ALLOW: reason or BLOCK: reason.

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

Plain SFT on proposed actions from the train split: reference safe/compromised trajectories, baseline-agent traces, and up-weighted legitimate large actions.

{
  "method": "plain",
  "args": {
    "model": "CohereLabs/tiny-aya-global",
    "method": "plain",
    "data": "data/sft/guard_train.jsonl",
    "val": "data/sft/guard_val.jsonl",
    "out": "outputs/guard",
    "epochs": 2.0,
    "batch_size": 1,
    "lr": 0.0001,
    "lora_r": 16,
    "lora_alpha": 32,
    "max_len": 1024,
    "grad_accum": 16,
    "longest_first": false,
    "max_steps": -1,
    "amp": "auto",
    "time_budget_min": 200.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": 1146,
  "length_cap": {
    "data/sft/guard_train.jsonl": {
      "rows_in": 1146,
      "dropped_over_max_len": 0,
      "max_len": 1024,
      "longest_row_tokens": 880
    },
    "data/sft/guard_val.jsonl": {
      "rows_in": 127,
      "dropped_over_max_len": 0,
      "max_len": 1024,
      "longest_row_tokens": 876
    }
  },
  "grad_accum_used": 16,
  "effective_batch": 16,
  "amp": "fp16",
  "planned_steps": 143,
  "stopped_by_time_budget": false,
  "seconds_per_step": 37.01,
  "steps": 144,
  "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": 127,
  "safety_set": null,
  "train_loss": 0.27348066264918697,
  "wall_seconds": 5328.8,
  "final_eval_loss": 0.0021436812821775675,
  "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": 7.79
}

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-guard")

The prompt format (system prompt, strict-JSON actions, boundary tags) is in testbed/prompts.py and training/guard.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
43
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Sykeclonex/intentlock-tiny-aya-guard

Adapter
(393)
this model

Dataset used to train Sykeclonex/intentlock-tiny-aya-guard

Collection including Sykeclonex/intentlock-tiny-aya-guard