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 trainer(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()

프로젝트 및 Space 구성

TRL 설정(예: SFTConfig, DPOConfig, GRPOConfig)에 프로젝트 및 스페이스 ID를 직접 설정합니다:

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