Instructions to use prathameshk421/frugal-analyst-tiny-aya-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use prathameshk421/frugal-analyst-tiny-aya-sft 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, "prathameshk421/frugal-analyst-tiny-aya-sft") - Notebooks
- Google Colab
- Kaggle
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,downprojections. - 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