Trackio documentation

تكامل TRL

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

تكامل TRL

يتكامل Trackio بشكل أصلي مع TRL مما يتيح لك تسجيل المقاييس من أي مُدرِّب TRL (SFTTrainer، DPOTrainer، GRPOTrainer، إلخ) بأقل قدر من الإعدادات. تأكد من تثبيت أحدث إصدار من trl (الإصدار 1.2.0 أو أحدث).

from datasets import Dataset
from trl import SFTConfig, SFTTrainer

# Create a small fake dataset
prompts = ["The capital of France is", "Hamlet was written by"] * 12
completions = [" Paris.", " Shakespeare."] * 12
dataset = Dataset.from_dict({"prompt": prompts, "completion": completions})

# Train a model using the TRL SFTTrainer API
trainer = SFTTrainer(
    model="Qwen/Qwen3-0.6B",
    args=SFTConfig(report_to="trackio", run_name="Qwen3-0.6B-sft"),
    train_dataset=dataset,
)
trainer.train()

إعداد المشروع والمساحة

اضبط معرّف المشروع والمساحة مباشرةً في إعدادات TRL الخاصة بك (مثل SFTConfig، DPOConfig، GRPOConfig):

from trl import SFTConfig

args = SFTConfig(
    report_to="trackio",
    run_name="my-run",
    project="my-project",
    trackio_space_id="username/space_id",
)
Update on GitHub