toolcall-mini / README.md
DevGwardo's picture
Add multi-turn loops + staged eval split
3fe2495 verified
|
Raw History Blame Contribute Delete
2.32 kB
---
license: apache-2.0
task_categories:
- text-generation
language:
- en
- zh
tags:
- function-calling
- tool-use
- tool-calling
- agent
size_categories:
- 1K<n<10K
---
# ToolCall-Mini
A cleaned, single-turn tool-calling dataset formatted for the native chat template of
[`openbmb/MiniCPM5-1B`](https://huggingface.co/openbmb/MiniCPM5-1B).
Derived from [Team-ACE/ToolACE](https://huggingface.co/datasets/Team-ACE/ToolACE) (Apache-2.0).
Tool schemas are extracted from the source system prompts; Pythonic calls such as
`[fn(a=1)]` are converted to structured `tool_calls`, and multi-call turns are preserved.
## Splits
| Split | Rows | Notes |
|-------|------|-------|
| train | 7,600 | 6,500 tool-call + 1,100 abstention |
| val | 520 | 400 tool-call + 120 abstention, held out |
| test | 500 | 400 tool-call + 100 abstention, never trained on |
Multi-turn loops (one round trip: user -> call -> tool result -> follow-up):
| Split | Rows | Notes |
|-------|------|-------|
| mt_train | 590 | same distribution, used in training |
| mt_val | 15 | held out |
| mt_test | 100 | staged eval: first call, then follow-up given the ground-truth tool result |
Examples longer than 1,400 tokens (rendered) were dropped for single-turn; multi-turn rows up to
1,800 tokens were kept, and training uses a 1,280-token cap.
## Format
```json
{
"tools": [{"name": "...", "description": "...", "parameters": {...}}],
"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "", "tool_calls": [{"name": "...", "arguments": {...}}]}
]
}
```
Render with:
```python
tokenizer.apply_chat_template(messages, tools=tools, tokenize=False)
```
which produces the model's native `<function name="..."><param name="...">...</param></function>`
syntax. Abstention rows carry a normal assistant `content` and no `tool_calls`.
## Provenance
- Source: `Team-ACE/ToolACE` (`data.json`, 11,300 rows)
- Filtering: tool schemas parse successfully, first assistant turn is a valid call, call names exist in the schema, deduplicated by prompt
- Seed: 42
## Citation
```bibtex
@misc{toolace,
title = {ToolACE: Winning the Points of LLM Function Calling},
author = {Team ACE},
year = {2024},
url = {https://huggingface.co/datasets/Team-ACE/ToolACE}
}
```