Import a Dataset from Hugging Face
Import datasets directly from Hugging Face and convert them into conversation format using custom templates. This is perfect for leveraging popular datasets like GSM8K and other community datasets.Create a Dataset and Select Import from Hugging Face
Click the + Create Dataset button in the top-right corner of the page, then in the dataset creation modal, select Import from Hugging Face to import a dataset using custom templates.

Step 1: Configure Dataset and Hugging Face Source
- Dataset Name: Enter a descriptive name for your imported dataset (e.g., “gsm8k”).
- Dataset URL or ID: Enter the Hugging Face dataset identifier in the format
username/dataset-name(e.g.,openai/gsm8k). - API Key (Optional): Only required if the dataset is private. Get your API key from Hugging Face settings.

Step 2: Select Subset and Split
After the system finds your dataset, you’ll see:
- Available Columns: All columns present in the dataset
- Rows Count: Total number of rows in each split
- Subset (Config): Select which subset or configuration to import (e.g., “main”).
- Split: Choose which split to import (e.g., “train”, “test”, “validation”) and see the row count for each.

Step 3: Define Conversation Templates
Map your dataset columns to conversation format using template placeholders:
-
User Prompt Template: Define how user messages are generated using
{{column_name}}placeholders.- Type
{{to see column suggestions, or click column badges to insert them. - Example:
{{question}}for a question-answer dataset.
- Type
-
Assistant Response Template: Define how assistant responses are generated using
{{column_name}}placeholders.- Example:
{{answer}}for a question-answer dataset.
- Example:
- Preview: See a live preview of how your datapoints will look with the current templates.

Example: Importing GSM8K
The GSM8K dataset is a popular dataset for mathematical reasoning. To import it:- Dataset ID:
openai/gsm8k - Subset:
main - Split:
train(contains 7,473 examples) - User Template:
{{question}} - Assistant Template:
{{answer}}
Next Steps
Create a Snapshot
Create a snapshot of your dataset to save your current state.
Enrich a Dataset
Start a data augmentation job to add synthetic data to your dataset.
Autosplit a Dataset
Automatically split your dataset into training, validation, and test sets.
Fine-Tune a Model
Fine-tune a model on your dataset.