Views
No views yet
meta-llama/Llama-3.2-1B-Instruct for function calling, trained on the Salesforce xLAM dataset. This is the v1 SFT model in a four-model study comparing SFT, data scaling, GRPO, and supervised refusal training for small-model function calling.| Category | Base | This model (v1 SFT) |
|---|---|---|
| simple_python | 75.0 | 77.5 |
| multiple | 50.5 | 74.0 |
| live_simple | 31.8 | 57.0 |
| live_multiple | 7.3 | 38.8 |
| live_relevance | 43.8 | 93.8 |
| live_irrelevance | 67.3 | 16.9 |
| irrelevance | 35.8 | 5.8 |
| parallel | 44.0 | 1.0 |
| parallel_multiple | 15.0 | 2.0 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("Keitsuna123/llama-3.2-1b-fc-sft-full")
5model = AutoModelForCausalLM.from_pretrained(
6 "Keitsuna123/llama-3.2-1b-fc-sft-full", torch_dtype=torch.bfloat16, device_map="auto"
7)
8
9messages = [{"role": "user", "content": "What's the weather in Tokyo?"}]
10tools = [{"type": "function", "function": {
11 "name": "get_weather", "description": "Get the weather for a location",
12 "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}
13}}]
14
15text = tokenizer.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)
16inputs = tokenizer(text, return_tensors="pt").to(model.device)
17out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
18print(tokenizer.decode(out[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True))
19# {"name": "get_weather", "parameters": {"location": "Tokyo"}}| Model | Description |
|---|---|
| fc-sft-full | v1 SFT on xLAM (this model) |
| fc-sft-v2-merged | SFT on xLAM + distilabel (data-scaling ablation) |
| fc-grpo | GRPO for irrelevance recovery (negative result) |
| fc-pathb | Supervised refusal training (effective irrelevance fix) |
1@misc{taketsuna2026_fc_smallmodel,
2 title = {Small-Model Function Calling: Comparing SFT, Data Scaling, GRPO, and Supervised Refusal Training},
3 author = {Taketsuna, Keiichi},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/Keitsuna123}},
6 note = {Llama-3.2-1B function-calling post-training study on BFCL v4}
7}