You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Tiny Aya function calling SFT

Merged BF16 Tiny Aya Global with LoRA checkpoint 525 from a 3-epoch SFT run on a cleaned split of NousResearch/hermes-function-calling-v1. Refer to the upstream base model and dataset for their licenses and usage terms.

The bundled Jinja template preserves Aya's original preamble and turn tokens, adds explicit tool-call instructions and a worked example, accepts tools= in apply_chat_template, and maps standard tool messages to the user-role tool observations used during SFT. It also serializes assistant tool_calls. Supply tools as standard function schemas. Parse <tool_call>{"name":"...","arguments":{...}}</tool_call> blocks and execute them in your application.

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo = "GL3MON/tiny-aya-global-function-calling-sft"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")
tools = [{"type":"function","function":{"name":"get_weather","description":"Get current weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]
messages = [{"role":"user","content":"What is the weather in Paris?"}]
inputs = tokenizer.apply_chat_template(messages, tools=tools, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=256, do_sample=False, logits_to_keep=1)
print(tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Checkpoint 525 scored 12/12 format/schema-valid calls, 9/12 exact reference calls, and 4/4 no-extra-call follow-ups on a fixed 16-case held-out offline evaluation using the ORIGINAL template. Those scores do not evaluate this modified prompt, semantic answer quality, or live tool execution. The new template passed rendering and tokenizer save/reload checks. Model outputs still require validation.

original_chat_template.jinja preserves the source template. export_manifest.json identifies the precise checkpoint and base revision. The trainer's final_adapter restored an earlier best-loss checkpoint; this export deliberately uses checkpoint 525.

Downloads last month
516
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for GL3MON/tiny-aya-global-function-calling-sft

Finetuned
(171)
this model
Adapters
3 models
Finetunes
1 model

Collection including GL3MON/tiny-aya-global-function-calling-sft