PEFT
Safetensors
English
lora
text-to-sql
tool-use
agent
agenttune

Frugal Analyst: Tiny Aya SFT adapter (274 tasks)

A LoRA adapter for CohereLabs/tiny-aya-global (3.35B). Part of Frugal Analyst, team Dear_Basketball, Lexsi AI Safety and Alignment Hackathon, Track 3 (Agentic Fine-tuning).

The model answers analytics questions over SQLite with two tools, get_schema and run_sql. The training reward pays for a correct answer and for low cost: tool calls, rows returned and SQLite VM steps.

This adapter. LoRA SFT on 274 scripted oracle tool-use traces (AgentTune Project.distill). 12 of 38 question templates are held out of this data, so GRPO has something to learn.

Label in the result files: distilled.

Results (task success, AuditKit)

Model In-domain, 120 tasks Held-out saas domain, 100 tasks
Base model, zero-shot 0.083 0.080
This model 0.808 0.460

One seed. Synthetic templated tasks. Full tables, confidence intervals and limits: write-up and results.

How to load

The base model is gated. Accept its terms on the model page first.

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = "CohereLabs/tiny-aya-global"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, dtype=torch.bfloat16, device_map="auto")
for adapter in ['prathameshk421/frugal-analyst-tiny-aya-sft']:
    # Merge each adapter into the weights, in this order.
    model = PeftModel.from_pretrained(model, adapter).merge_and_unload()

The prompt format matters: the tools go into the system turn and tool results come back as user turns. Use frugal_analyst/runner.py from the code repo to run the full tool loop:

python -m frugal_analyst.runner --model CohereLabs/tiny-aya-global \
    --adapter prathameshk421/frugal-analyst-tiny-aya-sft \
    --tasks data/tasks/test_ood.jsonl --out outputs/traces/distilled_test_ood.jsonl --label distilled

Training

  • LoRA r=16, alpha=32, dropout 0.05, on q,k,v,o,gate,up,down projections.
  • Toolkit: AgentTune at commit 1dfd054. Evaluation: AuditKit 1.1.11.
  • The resolved settings are in the config and meta files of this repo. Logs and every GRPO rollout are in the dataset repo.

Limits

  • Trained and tested on synthetic SQLite databases with templated English questions.
  • Held-out questions that need a code lookup stay hard.
  • No general-capability check was run after fine-tuning.
  • Not for production use.

Licence

CC-BY-NC-4.0, the same as the base model. Use of the base model also follows Cohere Labs' terms.

Downloads last month
32
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for prathameshk421/frugal-analyst-tiny-aya-sft

Adapter
(441)
this model

Dataset used to train prathameshk421/frugal-analyst-tiny-aya-sft

Collection including prathameshk421/frugal-analyst-tiny-aya-sft