Upload an SFT dataset

SFT datasets are the Language type with Prompt and Target columns. The target is the completion the model should copy.

Prerequisites

1. Datasets sidebar

Click Datasets in the sidebar.

Sidebar with Datasets highlighted

Datasets in the sidebar.

2. New dataset

Click New dataset. Choose category Language, then type SFT.

Create dataset modal with SFT type

Creating a new SFT dataset.

3. Upload files

Upload a local file or import from Hugging Face.

SFT dataset file upload

Uploading SFT dataset files.

4. Map columns

On Data, map columns to Prompt and Target. Save both before you leave the page or continue in the wizard.

SFT dataset column mapping step

Selecting prompt and target columns.

5. Preview

Check a sample of rows after mapping.

Dataset preview table

Preview of uploaded SFT rows.

6. Saved dataset

Save. The dataset shows up in the list and in the experiment wizard.

Datasets list with new SFT dataset

The dataset listed after save.

From the terminal

Create the dataset.

Install the CLI and sign in (Authentication):

pip install "agilerl[arena]"
arena login
# or: export ARENA_API_KEY=arena_pat_…
arena datasets create support-tickets-sft --category sft --column-mapping '{"prompt":"instruction","target":"response"}' --file ./sft.csv

category must be sft. If your file already uses prompt and target, put those names on both sides of the mapping.

Python

from agilerl.arena import ArenaClient

with ArenaClient() as client:
    client.create_dataset(
        name="support-tickets-sft",
        category="sft",
        file="./sft.csv",
        column_mapping={"prompt": "instruction", "target": "response"},
    )