Back to Trl

TRL Completion logs

trl/templates/completions_dataset_card.md

1.5.01.2 KB
Original Source

TRL Completion logs

This dataset contains the completions generated during training using trl.

{% if hub_model_id %} Find the trained model at https://huggingface.co/{{ hub_model_id }}.

{% endif %} The completions are stored in parquet files, and each file contains the completions for a single step of training (depending on the logging_steps argument).

Each file contains the following columns:

  • step: the step of training
  • prompt: the prompt used to generate the completion
  • completion: the completion generated by the model
  • <reward_function_name>: the reward(s) assigned to the completion by the reward function(s) used during training
  • advantage: the computed advantage for the completion

Having this data stored as a simple parquet file makes it easy to load and analyze using the Datasets Viewer, Polars, Pandas, etc.

You can load the dataset using the datasets library:

python
import datasets

dataset = datasets.load_dataset("{{ repo_id }}")

You can also load the dataset using Polars:

python
import polars as pl

# Login using e.g. `hf auth login` to access this dataset if it's private
df = pl.read_parquet(f"hf://datasets/{{ repo_id }}/*.parquet")