Skip to content

Instantly share code, notes, and snippets.

@qgallouedec
Last active September 13, 2025 23:17
Show Gist options
  • Select an option

  • Save qgallouedec/eb6a7d20bd7d56f9c440c3c8c56d2307 to your computer and use it in GitHub Desktop.

Select an option

Save qgallouedec/eb6a7d20bd7d56f9c440c3c8c56d2307 to your computer and use it in GitHub Desktop.
from datasets import load_dataset
from trl import SFTTrainer
dataset = load_dataset("trl-lib/Capybara", split="train")
trainer = SFTTrainer(
model="Qwen/Qwen2.5-0.5B",
train_dataset=dataset,
)
trainer.train()
train.push_to_hub("Qwen2.5-0.5B-SFT")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment