Instructions to use mitushigoyal5/shipwright-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mitushigoyal5/shipwright-lora 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, "mitushigoyal5/shipwright-lora") - Notebooks
- Google Colab
- Kaggle
Shipwright: self-healed Tiny Aya (round 16, deployed)
A LoRA adapter for Tiny Aya Global (3.35B) from Shipwright, a self-healing service for a tool-calling support agent: it finds the conversations its agent failed, classifies why, fixes the cause in the tool layer or the weights, and redeploys only when an 8-check gate measures the new agent as better on tasks it never trained on. Built for the Lexsi Labs AI Safety and Alignment Hackathon, Track 3, problem statement 8 (self-healing agents).
| What it is | LoRA (r 16) on Tiny Aya Global, trained with AgentTune on 789 rows: 254 teacher conversations, 235 on-policy corrections of the student's own wrong turns, 300 general function-calling examples |
| How it was made | One unattended run of the loop (round 16): no person between launch and promotion, 2 h 24 min, $3.89 |
| Result | Passed all 8 gate checks against the base model on 20 held-out ΟΒ²-bench retail tasks Γ 3 trials (below) |
| Status | Deployed: the promoted system in the service's promotion ledger, served with Shipwright's tool guards on |
Results (gate 16, held-out ΟΒ²-bench retail, 60 conversations per system)
| Base Tiny Aya | This adapter + guards | |
|---|---|---|
| Task success, pass^1 (95% Wilson interval) | 10.0% (4.7β20.2%) | 15.0% (8.1β26.1%) |
| Task success on every one of 3 trials, pass^3 | 10.0% | 10.0% |
| Tool calls that fail | 44.3% | 5.7% |
| Wasted tool calls (repeated, failed or blocked) | 69% | 21% |
| Runs that invented an order or item id | 40 of 60 | 0 |
| BFCL v3, general tool calling (simple, multiple, irrelevance) | 45.0 | 73.3 |
| Gate checks passed | 8 of 8 |
The teacher (DeepSeek V4.1 Flash) solves 32% of the same tasks. 60 runs per system is a small sample: two tasks
flipping move pass^1 by 10 points, so read the intervals, not only the point estimates. The hidden split (20 tasks
opened once) was measured before this round existed, with the round 7 adapter: 0% β 10%. Every number here is
recomputed from the public run files by scripts/reproduce.py; the gate's own files are in metrics/.
Use it
The adapter was trained on, and is served with, Shipwright's prompted tool calls: Tiny Aya has no native tool calling, so the tools are listed in the system prompt and the model answers a tool call with one fenced JSON block, for example
```json
{"name": "get_order_details", "arguments": {"order_id": "<that order id>"}}
```
and anything else as text to the customer. Tool results come back as user turns, Tool result for <name>: <result>.
Use the same format (the service's prompted_tools.py) to get the measured behaviour.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("mitushigoyal5/shipwright-lora")
base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", device_map="auto")
model = PeftModel.from_pretrained(base, "mitushigoyal5/shipwright-lora")
With vLLM (how the gate serves it, on one A10G):
vllm serve CohereLabs/tiny-aya-global --enable-lora --max-lora-rank 16 --max-model-len 8192 --lora-modules shipwright=mitushigoyal5/shipwright-lora
Training
- Base model
CohereLabs/tiny-aya-global; a fresh adapter (not continued from an earlier round). - LoRA r 16, alpha 32, dropout 0.05, all attention and MLP projections; learning rate 1e-4, 2 epochs, batch 1 Γ gradient accumulation 8, max sequence 8,192 tokens, seed 300; final train loss 0.52; 38 minutes on one L40S.
- AgentTune
create_distill_traineronEventLogs, with a masked SFT loss: only assistant turns are trained, and in a correction row only the teacher's corrected turn. - Data:
mitushigoyal5/shipwright-sft, branchround-16. Only ΟΒ²-bench train tasks; no held-out or hidden task was ever trained on. The general function-calling rows come from BFCL samples the gate never scores. - Lineage (inputs, settings) in
lexsi_provenance.json; the full training record intraining_meta.json.
Every round
Each round's adapter is on its own branch, kept whether it shipped or not, with the gate that judged it:
| Branch | Gated in | Decision |
|---|---|---|
round-3 |
gate 3 | refused (5 of 8 checks): general tool calling fell |
round-4 |
gate 4 | refused (3 of 8) |
round-5 |
gates 5, 6 (+ guards) | refused (6 of 8) |
round-7 |
gates 7, 8, 11, 12 (+ guards); hidden split | refused (6 to 7 of 8); best pooled candidate, 0% β 10% on the hidden split |
round-9 |
not gated on its own | |
round-10 |
gate 10 | refused (6 of 8) |
round-13 |
gates 13, 14 | refused (7 and 6 of 8): context overflow |
round-16 (= main) |
gate 16 | promoted, 8 of 8 |
Links
- Code: GitHub; full write-up: submission/WRITEUP.md
- Demo video (3 min), the control room replaying round 16: watch
- Results page: Space
- Every gate's conversations, decisions and the promotion ledger:
mitushigoyal5/shipwright-runs - Collections: models, data
Licence
CC BY-NC 4.0, as Tiny Aya's licence requires: research use only, no commercial use. Using the adapter also needs access to the gated base model.
Team: Tejas Nafde, Ishank Giri, Mitushi Goyal.
- Downloads last month
- 77
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global") model = PeftModel.from_pretrained(base_model, "mitushigoyal5/shipwright-lora")