LedgerCall: Tiny Aya Global LoRA for reliable finance tool calling

Rank-16 LoRA on CohereLabs/tiny-aya-global (3.35B, dense, open weights) that teaches the model to call four deterministic finance tools (convert_currency, compound_interest, percent_change, loan_payment) instead of guessing numbers. Lexsi AI Safety & Alignment Hackathon, Track 3 (Reliable tool calling, Efficient trajectories).

Method: trajectory SFT. Gold tool trajectories are replayed through AgentTune's own create_rollout_fn, so training prompts match evaluation prompts byte for byte; loss on assistant turns only. 960 tasks (600 base + 360 targeted augmentation) → 2,487 turn examples, 100 steps, 74 min on one Kaggle T4.

Results (greedy decoding, T4)

Eval set Base LedgerCall
In-distribution held-out, 100 tasks: task success 0% 100%
In-distribution: malformed call rate 71% 0%
In-distribution: avg completion tokens 308 99
Blind OOD, 72 tasks (fr/de/ja/zh/es/en, symbols, new chains): task success 0% 84.7%
Blind OOD: malformed call rate 58.3% 0%
OOD #1, 84 tasks (guided the augmentation, not blind): task success 1.2% 89.3%

Known limitations: number words ("four-year") and unseen chain shapes still fail; throughput drops with the unmerged LoRA (merge for deployment).

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, "frankzhu94/ledgercall-tiny-aya-sft")
tok = AutoTokenizer.from_pretrained("frankzhu94/ledgercall-tiny-aya-sft")

Code, eval harness and write-up: https://github.com/Xuefeng-Zhu/Ledgercall · Data and trajectories: https://huggingface.co/datasets/frankzhu94/ledgercall-finance-toolbench · Demo: https://huggingface.co/spaces/frankzhu94/ledgercall-demo

License: CC BY-NC 4.0, inherited from the base model.

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

Model tree for frankzhu94/ledgercall-tiny-aya-sft

Adapter
(452)
this model

Dataset used to train frankzhu94/ledgercall-tiny-aya-sft

Space using frankzhu94/ledgercall-tiny-aya-sft 1

Collection including frankzhu94/ledgercall-tiny-aya-sft