Skip to content

Add experimental support for General Online Logit Distillation (GOLD) Trainer #427

Description

@lukehinds

https://huggingface.co/docs/trl/main/en/gold_trainer

Curate a GOLD dataset , for logit based teacher -> student distillation

from trl import GoldTrainer, GoldConfig
from datasets import load_dataset

dataset = load_dataset('json', data_files='training_data.jsonl')

config = GoldConfig(
    use_uld_loss=True,  # Universal Logit Distillation
    lmbda=0.5,          # Mix of student/teacher outputs
    beta=0.5            # Loss interpolation
)

trainer = GoldTrainer(
    model=student_model,
    teacher=teacher_model,
    args=config,
    train_dataset=dataset,  # DeepFabric data
)

trainer.train()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions