智能体与函数调用 · Glaive AI

Glaive Function Calling v2

The standard open function-calling SFT dataset: ~113k conversations (112,960 rows) where a system prompt defines available JSON function schemas and the assistant learns when to call them, when to answer directly, and how to handle function responses. The foundation that countless open tool-calling fine-tunes (and cleaned derivatives like Hermes) build on.

加载
from datasets import load_dataset
ds = load_dataset("glaiveai/glaive-function-calling-v2")
预览示例数据
{
  "system": "SYSTEM: You are a helpful assistant with access to the following functions: {\"name\": \"get_stock_price\", \"parameters\": {\"symbol\": {\"type\": \"string\"}}}",
  "chat": "USER: What is Apple trading at? ASSISTANT: <functioncall> {\"name\": \"get_stock_price\", \"arguments\": {\"symbol\": \"AAPL\"}} FUNCTION RESPONSE: {\"price\": 227.3} ASSISTANT: Apple (AAPL) is currently trading at $227.30."
}

用这个数据集微调

使用 QLoRA(4-bit 基础模型 + LoRA 适配器)微调的预计显存需求(保守默认参数):

7B QLoRA · ~6GB VRAM13B QLoRA · ~10GB VRAM
检测你的 GPU 能否微调 →

常见问题

Glaive Function Calling v2 可以商用吗?

可以——Glaive Function Calling v2 采用 Apache 2.0 宽松许可证,允许商业使用,包括训练用于产品的模型。发布前请查看数据集卡片中的署名要求。

Glaive Function Calling v2 有多少数据?需要全部使用吗?

Glaive Function Calling v2 包含 113k Rows。通常不需要全部:风格和格式微调只需几百到几千条样本——先加载切片(如 split="train[:1000]"),质量到达瓶颈时再扩大规模。

Glaive Function Calling v2 最适合做什么?

Teaching a model basic function-calling: when to call, what JSON to emit, how to use results。它属于数据集中心的「智能体与函数调用」板块,那里有替代和互补的数据集。