trl/templates/completions_dataset_card.md
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 trainingprompt: the prompt used to generate the completioncompletion: the completion generated by the model<reward_function_name>: the reward(s) assigned to the completion by the reward function(s) used during trainingadvantage: the computed advantage for the completionHaving 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:
import datasets
dataset = datasets.load_dataset("{{ repo_id }}")
You can also load the dataset using Polars:
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")