Instructions to use Purusharth/tiny-aya-efficient-healer-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Purusharth/tiny-aya-efficient-healer-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, "Purusharth/tiny-aya-efficient-healer-lora") - Notebooks
- Google Colab
- Kaggle
Efficient Healer: a Tiny Aya LoRA for a finance database agent
A LoRA adapter (r=16) for CohereLabs/tiny-aya-global
that turns it into a tool-calling agent for questions about company financial tables (FinQA). It was
produced by a three-round self-healing loop built on AgentTune and evaluated with AuditKIT, for the
Lexsi Labs hackathon, Track 3 (Agentic Fine-tuning).
- Code and full write-up: github.com/purusharthmalik/efficient-healer
- All trajectories, labels, training sets and evaluation logs:
Purusharth/efficient-healer-trajectories
Which adapter is which
| Folder | What | Status |
|---|---|---|
| repository root | The adapter the deployment gate approved | = round3/ |
round1/ |
Round 1: teacher repairs of the tasks base Tiny Aya could not solve (480-task pool) | passed its gate against base Tiny Aya (0.5% β 25.2%) |
round2/ |
Round 2: the round 1 adapter's own shortest verified runs plus repairs (480-task pool) | held on a 100-task set, passed on a 400-task confirmation (25.2% β 30.4%) |
round3/ |
Round 3: the same loop from the round 2 adapter on a 1,400-task pool | passed its gate on a fresh 400-task set (26.2% β 46.4%) |
round2_dpo/, round3_dpo/ |
DPO on step-level preference pairs. Not standalone: each is a second LoRA that goes on top of the merged round 2 or round 3 model | experiments |
negative_all_token_loss/ |
First attempt, loss on all tokens. Solves 2% of held-out runs. Kept as a negative result | not for use |
deployed.json records the gate's choice. A sibling adapter for the larger student is at
Purusharth/aya-expanse-8b-efficient-healer-lora.
Results
400 held-out questions from 55 companies never seen in training, 3 runs each, harness stop rule on. Success is decided by a numeric verifier, not a judge model.
| Metric | Base Tiny Aya | Round 1 | Round 2 | Round 3 (root) |
|---|---|---|---|---|
| Runs solved | 0.5% | 25.2% | 30.4% | 49.1% |
| Runs solved, strict exact match | 0.3% | 15.0% | 17.6% | 29.8% |
| Tasks solved in all 3 runs | 0 of 400 | 35 of 400 | 61 of 400 | 143 of 400 |
| Tool calls per run | 2.88 | 4.65 | 4.47 | 4.32 |
| Output tokens per run | 221 | 239 | 215 | 210 |
| Redundant tool-call rate (AuditKIT) | 0.126 | 0.108 | 0.069 | 0.051 |
| Loop-free share (AuditKIT) | 0.761 | 0.805 | 0.818 | 0.893 |
- Round 2 β round 3: success +18.7 points, 95% paired bootstrap interval [+15.2, +22.4]. On a second held-out set of 400 fresh questions, used for the round 3 gate: 26.2% β 46.4%, +20.2 points [+16.8, +23.7].
- Retention and safety (AuditKIT, 100 samples each, round 2 adapter vs base): GSM8K 0.71 β 0.67 (β0.04 [β0.12, +0.05]); XSTest refusal of unsafe prompts 0.94 β 0.94; over-refusal of safe prompts 0.06 β 0.06. Multilingual ability was not measured, and round 3 was not re-checked.
Full tables, intervals and negative results are in the write-up.
How it was made
- Roll out the current model 4 times on each train-pool task (480 tasks in rounds 1 and 2, 1,400 in round 3; AgentTune rollout loop, FinQA tools).
- Bucket each task: always solved, sometimes solved, never solved.
- Always or sometimes solved: keep the shortest verified run.
- Never solved: label the failure (rules + AgentTune
FailureClassifier), retry with a hint chosen by the label, then ask a teacher (nvidia/Qwen3.6-35B-A3B-NVFP4). Only verified runs are kept. - Train one LoRA from the base model on the kept runs (AgentTune
create_distill_trainer), with the loss on the agent's own turns only. - Deploy only if the gate passes on held-out tasks: success and tool-call validity must not regress, and success or tool calls on tasks both models solve must improve with a 95% interval that excludes zero.
Training: LoRA r=16, Ξ±=32, dropout 0.05 on q_proj, k_proj, v_proj, o_proj; 3 epochs; learning rate 2e-4,
cosine; effective batch 16; bf16; rows up to about 4,300 tokens.
How to use
The adapter expects the prompt format it was trained on: AgentTune's tool-prompt fallback for Aya (tool
schemas in the system prompt, calls written as [{"tool_name": ..., "parameters": {...}}], tool results
returned as user turns). The path we ran and tested is the one in the code repository: merge the adapter,
serve the merged model with vLLM, and run the agent through AgentTune's rollout loop.
# in the AgentTune environment of the code repository
hf download Purusharth/tiny-aya-efficient-healer-lora --local-dir adapter
python -m selfheal.merge --adapter adapter --out merged
# in the vLLM environment
vllm serve merged --served-model-name student --port 8000 --max-model-len 8192 --dtype bfloat16
# back in the AgentTune environment: 3 runs on each held-out task
python -m selfheal.tasks --n-pool 480 --n-eval 100 --out splits.json
python -m selfheal.rollout --tasks splits.json --split eval --k 3 --stop \
--model-path merged --served-model student --out eval.jsonl --tag demo
python -m selfheal.summary eval.jsonl
The system prompt and the four tools are defined in selfheal/tasks.py.
Limits
- Research artifact. About half of held-out runs still fail; do not use it for real financial decisions.
- English FinQA-style questions over the bundled tables only. Other languages, other schemas and general chat were not evaluated after fine-tuning, and neither was safety behaviour.
- Non-commercial: the base model is CC-BY-NC-4.0, and so is this adapter.
- Downloads last month
- 30