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.

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

Preference format

For preference fine-tuning, the tools array nests inside input. See Preference tuning for the broader DPO workflow.

Validate and upload

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

Launch the job

LoRA is the default and recommended training mode. Pass lora=False for full fine-tuning.
For details on all available parameters, see the API reference.

Watch and deploy

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