Instructions to use GL3MON/tiny-aya-global-function-calling-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GL3MON/tiny-aya-global-function-calling-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GL3MON/tiny-aya-global-function-calling-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GL3MON/tiny-aya-global-function-calling-sft") model = AutoModelForCausalLM.from_pretrained("GL3MON/tiny-aya-global-function-calling-sft", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GL3MON/tiny-aya-global-function-calling-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GL3MON/tiny-aya-global-function-calling-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GL3MON/tiny-aya-global-function-calling-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GL3MON/tiny-aya-global-function-calling-sft
- SGLang
How to use GL3MON/tiny-aya-global-function-calling-sft with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "GL3MON/tiny-aya-global-function-calling-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GL3MON/tiny-aya-global-function-calling-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "GL3MON/tiny-aya-global-function-calling-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GL3MON/tiny-aya-global-function-calling-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GL3MON/tiny-aya-global-function-calling-sft with Docker Model Runner:
docker model run hf.co/GL3MON/tiny-aya-global-function-calling-sft
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
Model tree for GL3MON/tiny-aya-global-function-calling-sft
Base model
CohereLabs/tiny-aya-base