Skip to main content

Dataset Guide

Your dataset is the most important factor in training success. A small, high-quality dataset beats a massive, noisy one every time.

The Dataset Size Problem

This is critical: Small models + Large datasets = Overfitting

Why Does This Happen?

Think of it like this:
  • Small model = Small brain = Can only memorize so much
  • Large dataset = Lots of information
  • Result = Model just memorizes examples instead of learning patterns
Example: Training gemma-3-270m on the full Alpaca dataset (52k examples):
  • Model memorizes: “When asked about France’s capital, say Paris”
  • But doesn’t learn: “How to answer geography questions in general”

How to Fix It

Use --max-samples in the wizard:
Or in the CLI:

Dataset Formats

The wizard automatically detects your dataset format.

Alpaca Format (Most Common)

Columns: instruction, input (optional), output Good for: Instruction following, Q&A, task completion

ShareGPT / Conversation Format

Good for: Chatbots, multi-turn conversations

Messages Format (OpenAI-style)

Good for: API-style training, system prompts

Q&A Format

Columns: question/query/prompt + answer/response Good for: Simple question answering

DPO Format (Preference Training)

Required for: DPO, ORPO trainers

Plain Text

Good for: Continued pretraining, domain adaptation

Automatic Format Detection

The wizard analyzes your dataset and suggests conversion:

What Conversion Does

  1. Normalizes your data to a standard format
  2. Applies the correct chat template for your model
  3. Handles special tokens properly
Example: Alpaca → Messages for Gemma Before:
After:

Using Local Data

CSV Files

Create a CSV with your examples:
Then in the wizard:

JSON/JSONL Files

Create a .jsonl file (one JSON object per line):

Folder Structure

Put all your files in a folder:
Then:

Dataset Quality Tips

500 high-quality examples beat 50,000 mediocre ones. Each example should be:
  • Accurate and correct
  • Well-formatted
  • Representative of what you want the model to do
Include varied examples:
  • Different topics
  • Different lengths
  • Different styles
  • Edge cases
If you want a customer support bot, train on customer support conversations. If you want a code assistant, train on code examples. Don’t train on general data and expect specific skills.
Remove:
  • Duplicates
  • Broken examples
  • Inconsistent formatting
  • Low-quality responses
If you have categories, try to have similar numbers of each. 1000 examples of category A + 50 examples of category B = model ignores B.

For Learning/Testing

For Specific Tasks

For Preference Training (DPO/ORPO)

Train/Validation Splits

What They Are

  • Train split: Data the model learns from
  • Validation split: Data to check if the model is learning (not memorizing)

When to Use Validation

Use a validation split if:
  • You have 1,000+ examples
  • You want to detect overfitting
  • You’re experimenting with hyperparameters
Skip validation if:
  • You have < 500 examples (every example matters)
  • You’re doing a quick test run
  • You’ll evaluate separately after training

Setting Splits in the Wizard

Limiting Dataset Size

For testing or to prevent overfitting:
This is especially useful when:
  1. First training run: Use 100-500 samples to verify everything works
  2. Small model: Limit to 1,000-5,000 for 270M-1B models
  3. Quick iteration: Test different settings with smaller data

Column Mapping

If your dataset has non-standard column names, the wizard asks:

DPO/ORPO Required Columns

Next Steps

SFT Walkthrough

Complete training walkthrough

Dataset Formats Reference

Detailed format specifications