Skip to content

🧰 [SFT] Tool support #3597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jun 20, 2025
Merged

🧰 [SFT] Tool support #3597

merged 29 commits into from
Jun 20, 2025

Conversation

qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented Jun 15, 2025

In order to use toolcalls, you need to have a dataset that includes "tools". Example;

from datasets import load_dataset
from trl import SFTTrainer

# Get the dataset
dataset = load_dataset("trl-internal-testing/toolcall", split="train")

# Initialize the trainer
trainer = SFTTrainer(model="Qwen3-0.6B", train_dataset=dataset)

# Train the model
trainer.train()

@qgallouedec qgallouedec marked this pull request as ready for review June 16, 2025 14:50
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@shirinyamani shirinyamani merged commit c262674 into main Jun 20, 2025
11 checks passed
@shirinyamani shirinyamani deleted the tool-sft branch June 20, 2025 15:39
marcandrelarochelle pushed a commit to marcandrelarochelle/trl that referenced this pull request Jul 29, 2025
Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants