DevTools Logo

Finetune Dataset Splitter

Finetune Dataset Splitter

Reproducible train/validation/test splits with dedupe and leakage warnings.

Runs in your browser

JSONL dataset

5 lines · 584 chars

Split report

5 lines · 1 dupes removed
Very small dataset: split ratios are approximate at this size.
test split is empty.
SplitLinesBytes≈TokensUnique prompts
train3334≈833
validation1127≈321
test00≈00

Effective ratios: 80/10/10 · Fisher–Yates + xorshift128+ · seed 42

{"messages":[{"role":"user","content":"What are your hours?"},{"role":"assistant","content":"9 to 5."}]}
{"messages":[{"role":"user","content":"Where are my invoices?"},{"role":"assistant","content":"Billing → Invoices."}]}
{"messages":[{"role":"user","content":"How do I cancel?"},{"role":"assistant","content":"Billing → Plan."}]}

Details

Paste or drop JSONL and choose train/validation/test ratios. Rows are cleaned, exact duplicates can be removed, and a seeded Fisher–Yates shuffle (xorshift128+) splits the data with largest-remainder rounding. The tool then groups rows by their first user prompt and warns when the same prompt lands in more than one split, highlighting train/test leakage. Each split gets line, byte, token and unique-prompt statistics plus a downloadable JSONL file and a stats.json reproducibility report.

More examples

80/10/10 split

Produces 80 train, 10 validation and 10 test rows; the same seed reproduces the exact partition.

Deduplicate before splitting

With dedupe on, one copy is removed before partitioning and the count appears in the report.

Leakage warning

The leakage panel lists the prompt, split counts and original line numbers; rows are never silently removed.

Examples

80/10/10 split

Input
seed: 42 · 100 JSONL rows · shuffle on

Produces 80 train, 10 validation and 10 test rows; the same seed reproduces the exact partition.

Deduplicate before splitting

Input
Two identical {"messages": ...} lines in the dataset

With dedupe on, one copy is removed before partitioning and the count appears in the report.

Leakage warning

Input
The same user prompt appears in train and test with different completions

The leakage panel lists the prompt, split counts and original line numbers; rows are never silently removed.

About this tool

Paste or drop JSONL and choose train/validation/test ratios. Rows are cleaned, exact duplicates can be removed, and a seeded Fisher–Yates shuffle (xorshift128+) splits the data with largest-remainder rounding. The tool then groups rows by their first user prompt and warns when the same prompt lands in more than one split, highlighting train/test leakage. Each split gets line, byte, token and unique-prompt statistics plus a downloadable JSONL file and a stats.json reproducibility report.

Everything runs locally in your browser — your inputs stay on your device and are never uploaded to a server.

What this tool does not do

  • Processes only the inputs provided in this session without connecting to external accounts or background servers.
  • Runs entirely in the current browser tab; nothing is synced across devices or backed up to a server.

How to use this tool

  1. Load JSONL dataset

    Paste or drop your fine-tuning JSONL file locally.

  2. Set split ratios, seed, and dedupe

    Configure train/val/test percentages, deterministic PRNG seed, and exact dedupe.

  3. Check leakage and download splits

    Review cross-split prompt warnings and download train/val/test JSONL + stats.json.

Use cases

80/10/10 split

Produces 80 train, 10 validation and 10 test rows; the same seed reproduces the exact partition.

Deduplicate before splitting

With dedupe on, one copy is removed before partitioning and the count appears in the report.

Leakage warning

The leakage panel lists the prompt, split counts and original line numbers; rows are never silently removed.

Common mistakes

Mistake:How does train/test prompt leakage detection work?

Fix:After partitioning, the tool extracts the opening user prompt from each JSONL row and warns if identical prompts appear in both train and validation/test splits—even when assistant completions differ.

Mistake:Why use a numeric or string seed when shuffling?

Fix:A fixed Fisher–Yates PRNG seed guarantees teammates or CI scripts can reproduce the exact same row partition, documented in the downloadable stats.json manifest.

Frequently asked questions

What train/validation/test split ratio should I pick?

80/10/10 or 90/5/5 are common defaults: smaller datasets (< 1,000 examples) usually need at least 10–15% in validation/test so evaluation metrics aren't dominated by noise.

How does train/test prompt leakage detection work?

After partitioning, the tool extracts the opening user prompt from each JSONL row and warns if identical prompts appear in both train and validation/test splits—even when assistant completions differ.

Why use a numeric or string seed when shuffling?

A fixed Fisher–Yates PRNG seed guarantees teammates or CI scripts can reproduce the exact same row partition, documented in the downloadable stats.json manifest.

Are fine-tuning JSONL files uploaded anywhere?

No. File reading, deduplication, shuffling, and split downloads use local browser File/Blob APIs.