Skip to main content
Function-calling fine-tuning adapts a model to invoke tools in response to user queries. The result is a model that produces well-formed tool_calls with high reliability, useful for agents and any pipeline that depends on structured function invocation. This page covers the function-calling data shape, supported models, and launch parameters.

Supported models

The following models support function-calling fine-tuning. See supported models for context lengths and batch limits.
OrganizationModelAPI ID
NVIDIANVIDIA Nemotron 3 Nano Omni 30B A3B Reasoning BF16nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16
NVIDIANVIDIA Nemotron Nano 9B v2nvidia/NVIDIA-Nemotron-Nano-9B-v2
NVIDIANVIDIA Nemotron 3 Super 120B A12B BF16nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16
QwenQwen3.5 397B A17BQwen/Qwen3.5-397B-A17B
QwenQwen3.5 122B A10BQwen/Qwen3.5-122B-A10B
QwenQwen3.5 35B A3BQwen/Qwen3.5-35B-A3B
QwenQwen3.5 35B A3B BaseQwen/Qwen3.5-35B-A3B-Base
QwenQwen3.5 27BQwen/Qwen3.5-27B
QwenQwen3.5 9BQwen/Qwen3.5-9B
QwenQwen3.5 4BQwen/Qwen3.5-4B
QwenQwen3.5 2BQwen/Qwen3.5-2B
QwenQwen3.5 0.8BQwen/Qwen3.5-0.8B
QwenQwen3.6 35B A3BQwen/Qwen3.6-35B-A3B
QwenQwen3 Next 80B A3B InstructQwen/Qwen3-Next-80B-A3B-Instruct
QwenQwen3 Next 80B A3B ThinkingQwen/Qwen3-Next-80B-A3B-Thinking
QwenQwen3 0.6BQwen/Qwen3-0.6B
QwenQwen3 1.7BQwen/Qwen3-1.7B
QwenQwen3 4BQwen/Qwen3-4B
QwenQwen3 8BQwen/Qwen3-8B
QwenQwen3 14BQwen/Qwen3-14B
QwenQwen3 32BQwen/Qwen3-32B
QwenQwen3 30B A3BQwen/Qwen3-30B-A3B
QwenQwen3 30B A3B Instruct 2507Qwen/Qwen3-30B-A3B-Instruct-2507
QwenQwen3 235B A22BQwen/Qwen3-235B-A22B
QwenQwen3 235B A22B Instruct 2507Qwen/Qwen3-235B-A22B-Instruct-2507
QwenQwen3 Coder 30B A3B InstructQwen/Qwen3-Coder-30B-A3B-Instruct
QwenQwen3 Coder 480B A35B InstructQwen/Qwen3-Coder-480B-A35B-Instruct
QwenQwen3 VL 8B InstructQwen/Qwen3-VL-8B-Instruct
QwenQwen3 VL 32B InstructQwen/Qwen3-VL-32B-Instruct
QwenQwen3 VL 30B A3B InstructQwen/Qwen3-VL-30B-A3B-Instruct
QwenQwen3 VL 235B A22B InstructQwen/Qwen3-VL-235B-A22B-Instruct
QwenQwen2.5 72B InstructQwen/Qwen2.5-72B-Instruct
QwenQwen2.5 72BQwen/Qwen2.5-72B
QwenQwen2.5 32B InstructQwen/Qwen2.5-32B-Instruct
QwenQwen2.5 32BQwen/Qwen2.5-32B
QwenQwen2.5 14B InstructQwen/Qwen2.5-14B-Instruct
QwenQwen2.5 14BQwen/Qwen2.5-14B
QwenQwen2.5 7B InstructQwen/Qwen2.5-7B-Instruct
QwenQwen2.5 7BQwen/Qwen2.5-7B
QwenQwen2.5 3B InstructQwen/Qwen2.5-3B-Instruct
QwenQwen2.5 3BQwen/Qwen2.5-3B
QwenQwen2.5 1.5B InstructQwen/Qwen2.5-1.5B-Instruct
QwenQwen2.5 1.5BQwen/Qwen2.5-1.5B
Moonshot AIKimi K2.7 Codemoonshotai/Kimi-K2.7-Code
Moonshot AIKimi K2.6moonshotai/Kimi-K2.6
Moonshot AIKimi K2.5moonshotai/Kimi-K2.5
Moonshot AIKimi K2 Thinkingmoonshotai/Kimi-K2-Thinking
Moonshot AIKimi K2 Instruct 0905moonshotai/Kimi-K2-Instruct-0905
Moonshot AIKimi K2 Instructmoonshotai/Kimi-K2-Instruct
Moonshot AIKimi K2 Basemoonshotai/Kimi-K2-Base
Z.aiGLM 5.1zai-org/GLM-5.1
Z.aiGLM 5zai-org/GLM-5
Z.aiGLM 4.7zai-org/GLM-4.7
Z.aiGLM 4.6zai-org/GLM-4.6
OpenAIGPT-OSS 20Bopenai/gpt-oss-20b
OpenAIGPT-OSS 120Bopenai/gpt-oss-120b
MetaLlama 4 Scout 17B 16E Instructmeta-llama/Llama-4-Scout-17B-16E-Instruct
MetaLlama 4 Scout 17B 16E Instruct VLMmeta-llama/Llama-4-Scout-17B-16E-Instruct-VLM
MetaLlama 4 Maverick 17B 128E Instructmeta-llama/Llama-4-Maverick-17B-128E-Instruct
MetaLlama 4 Maverick 17B 128E Instruct VLMmeta-llama/Llama-4-Maverick-17B-128E-Instruct-VLM
MetaLlama 3.3 70B Instruct Referencemeta-llama/Llama-3.3-70B-Instruct-Reference
MetaLlama 3.3 70B 32k Instruct Referencemeta-llama/Llama-3.3-70B-32k-Instruct-Reference
MetaLlama 3.3 70B 131k Instruct Referencemeta-llama/Llama-3.3-70B-131k-Instruct-Reference
MetaLlama 3.2 3B Instructmeta-llama/Llama-3.2-3B-Instruct
MetaLlama 3.2 1B Instructmeta-llama/Llama-3.2-1B-Instruct
MetaMeta Llama 3.1 8B Instruct Referencemeta-llama/Meta-Llama-3.1-8B-Instruct-Reference
MetaMeta Llama 3.1 8B 131k Instruct Referencemeta-llama/Meta-Llama-3.1-8B-131k-Instruct-Reference
MetaMeta Llama 3.1 70B Instruct Referencemeta-llama/Meta-Llama-3.1-70B-Instruct-Reference
MetaMeta Llama 3.1 70B 32k Instruct Referencemeta-llama/Meta-Llama-3.1-70B-32k-Instruct-Reference
MetaMeta Llama 3.1 70B 131k Instruct Referencemeta-llama/Meta-Llama-3.1-70B-131k-Instruct-Reference
GoogleGemma 4 31B ITgoogle/gemma-4-31B-it
GoogleGemma 4 31B IT VLMgoogle/gemma-4-31B-it-VLM
GoogleGemma 4 26B A4B ITgoogle/gemma-4-26B-A4B-it

Prepare your data

Prepare data in a JSONL file. Each line should carry:
  • messages: The conversation. Assistant messages can include tool_calls (a list of structured invocation objects) in place of content. Tool results come back via messages with the tool role.
  • tools: A list of available tools for the example.

Conversational format

{
  "messages": [
    {"role": "system", "content": "You are a helpful travel planning assistant."},
    {"role": "user", "content": "What is the current temperature in San Francisco?"},
    {
      "role": "assistant",
      "tool_calls": [
        {
          "id": "call_abc123",
          "type": "function",
          "function": {
            "name": "getCurrentWeather",
            "arguments": "{\"location\": \"San Francisco, CA\"}"
          }
        }
      ]
    },
    {"role": "tool", "content": "{\"location\": \"San Francisco\", \"temperature\": \"65\", \"unit\": \"fahrenheit\"}"}
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "getCurrentWeather",
        "description": "Get the current weather in a given location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA."}
          },
          "required": ["location"]
        }
      }
    }
  ]
}

Preference format

For preference fine-tuning, the tools array nests inside input. See Preference tuning for the broader DPO workflow.
{
  "input": {
    "messages": [
      {"role": "system", "content": "You are a helpful travel planning assistant."},
      {"role": "user", "content": "What is the current temperature in San Francisco?"}
    ],
    "tools": [
      {"type": "function", "function": {
        "name": "getCurrentWeather",
        "description": "Get the current weather in a given location",
        "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}
      }}
    ]
  },
  "preferred_output": [
    {"role": "assistant", "tool_calls": [
      {"id": "call_abc123", "type": "function", "function": {
        "name": "getCurrentWeather", "arguments": "{\"location\": \"San Francisco, CA\"}"
      }}
    ]}
  ],
  "non_preferred_output": [
    {"role": "assistant", "content": "Sorry, I can't help you with that."}
  ]
}

Validate and upload

Upload your data using the Together Python/TypeScript SDK or the Together CLI:
from together import Together

client = Together()

train_file = client.files.upload(
    file="function_calling_dataset.jsonl",
    purpose="fine-tune",
    check=True,
)
print(train_file.id)
import Together from "together-ai";
import fs from "node:fs";

const client = new Together();

const trainFile = await client.files.upload({
  file: fs.createReadStream("function_calling_dataset.jsonl"),
  purpose: "fine-tune",
});
console.log(trainFile.id);
tg files check "function_calling_dataset.jsonl"
tg files upload "function_calling_dataset.jsonl"

Launch the job

LoRA is the default and recommended training mode. Pass lora=False for full fine-tuning.
job = client.fine_tuning.create(
    training_file=train_file.id,
    model="Qwen/Qwen3-8B",
    lora=True,
)
print(job.id)
const job = await client.fineTuning.create({
  training_file: trainFile.id,
  model: "Qwen/Qwen3-8B",
  lora: true,
});
console.log(job.id);
tg fine-tuning create \
  --training-file "<FILE_ID>" \
  --model "Qwen/Qwen3-8B" \
  --lora
For details on all available parameters, see the API reference.

Watch and deploy

Function-calling jobs use the same lifecycle as text jobs: