Instructions to use sqlcf-lexsi/tiny-aya-global-sqlcf-grpo-b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sqlcf-lexsi/tiny-aya-global-sqlcf-grpo-b 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, "sqlcf-lexsi/tiny-aya-global-sqlcf-grpo-b") - Notebooks
- Google Colab
- Kaggle
tiny-aya-global-sqlcf-grpo-b
LoRA adapter (r=16) for CohereLabs/tiny-aya-global: GRPO, 60 steps, single-DB strict execution reward R_exec_rex (condition B).
Lexsi Labs AI Safety & Alignment Hackathon, Track 3 (PS #6 data and database agents + #9 reward design and reward-hacking defences), team Teen_khapeetars: Shreshth Rai (lead, @hi-phi-r25i), Rishii Kumar Singh (@LogicPalette), Aksh Aggarwal (@AkshAgg).
Collections: models, data · Demo · Data · Adapters: SFT, GRPO-B, GRPO-C · Code · Write-up
Status (gate G3): improved: beats SFT on verified accuracy, McNemar p = 0.006.
Test set: 331 items x 8 samples, T=0.7, fresh databases from a different generator; "verified" = correct on the original and all 4 counterfactual DBs.
| Metric | Value (95% CI) |
|---|---|
| Verified accuracy | 12.7% [11.5, 14.0] |
| Single-DB accuracy | 17.8% [16.4, 19.3] |
| Silent-error rate | 64.0% [62.2, 65.9] |
| Held-out family F4, verified | 9.9% [8.6, 11.4] |
Use
Accept the base model's licence first, then:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "sqlcf-lexsi/tiny-aya-global-sqlcf-grpo-b")
tok = AutoTokenizer.from_pretrained("sqlcf-lexsi/tiny-aya-global-sqlcf-grpo-b")
It is a multi-turn SQL agent with one run_sql tool, prompted and parsed the way AgentTune renders Tiny Aya
(see sqlcf/agent.py and evaluate.py gen in the repo). vLLM LoRA fails on Tiny Aya's tied embeddings, so for vLLM
merge first: python train.py merge --init <this adapter> --out merged (fp32 merge, saved fp16).
Licence
This adapter is a derivative of CohereLabs/tiny-aya-global and is released under the same terms:
- CC-BY-NC-4.0 (full text in LICENSE) with Cohere's acceptable-use addendum: https://cohere.com/c4ai-cc-by-nc-license
- Cohere Labs Acceptable Use Policy: https://docs.cohere.com/docs/c4ai-acceptable-use-policy Non-commercial use only. You also need access to the gated base model to use it.
- Downloads last month
- -