Dataset analysis
Analyze a dataset before training to choose maxSeqLength and estimate the number of updates. Analysis uses no GPUs.
Analyze your data
Analyze a registered chat or preference dataset under a base model:
akka optimize training datasets analyze triage/train --model Qwen/Qwen3-0.6B --wait
To use a plan’s model and settings, replace --model with -f run.yaml. The dataset comes from the command argument. Prepared token rows already record their lengths and need no analysis.
With --wait, the command waits for the report. Otherwise, it returns the current status. Use -o json for scripts. Correct any row or template problem named in a failed report before starting training.
Correct each row the report refuses before you train. A run merges two assistant messages in a row that the chat template joins into one turn, and the report names the rows it merges. The report measures whole rows, so a run that removes a row’s oldest turns, and with them the pair, does not merge that row. To refuse such rows instead, set config.data.consecutiveAssistantMessages to refuse in the plan.
List a dataset’s analyses
List the analyses of a dataset version without starting one:
akka optimize training datasets analyses triage/train
ANALYSIS BASE MODEL STATUS ROWS MAX TOKENS ATTEMPT STARTED
3b5d7f9a1c3e google/gemma-3-1b-it at dcc83ea841ab Running — — 1 140m ago
9f2c4e6a8b0d Qwen/Qwen3-0.6B at c1899de289a0 Done 2000 4080 1 3h ago
1 to 2 of 2 analyses.
Each analysis is shown as its last attempt, newest first, with its base model, status and row count. Two dataset versions that hold the same examples share their analyses.
Choose a sequence limit
Read the report’s length figures:
akka optimize training datasets analyze triage/train -f run.yaml --wait
Analysis
Analysis 9f2c4e6a8b0d1f3e5a7c9e1b3d5f7a9c41e8b2d6f0a3c7e5b9d1f4a8c2e6b0d3
Status Done
Dataset triage/train:v1
Base model Qwen/Qwen3-0.6B at c1899de289a0
Optimize version release 0.11.0
Started 5m ago
Lengths
Measured under tokenizer Qwen/Qwen3-0.6B at c1899de289a0, chat template 0a2c8073c878 (a corrected copy), Optimize 0.11.0
Rows 2000
Tokens median 812, p90 1490, p99 2210, max 4080
Over 512 1530 row(s), 40 still over with the oldest turns removed
Over 1024 610 row(s), 12 still over with the oldest turns removed
Over 2048 31 row(s), 2 still over with the oldest turns removed
Over 4096 0 row(s)
Over 8192 0 row(s)
Over 16384 0 row(s)
Over 32768 0 row(s)
Longest row 17 (4080), row 3 (3900), row 8 (3100), row 41 (2900), row 2 (2500) tokens; 15 more with -o wide
Suggested maxSeqLength 4096 for every row; 4096 at p99, with 0 row(s) over
Loss policy
Default 401220 trained token(s)
All assistant turns 912003 trained token(s)
Estimates
Settings from the run file
Steps 250: 2 epoch(s) of 125 step(s)
Rows 2000
Epochs 2 (run file)
Max steps none (default)
maxSeqLength 4096 (run file)
Micro batch per GPU 1 (default)
Gradient accumulation 8 (default)
GPUs 2 (run file)
Batch 16 row(s) per step
Time about 2.0 hours on 2 GPUs, 4.0 GPU-hours
Measured from 3.6000 GPU seconds per row, the median of 7 completed run(s) of Qwen/Qwen3-0.6B on device profile h100-80gb under trl at bf16
Basis GPU seconds per row of completed runs, as each run reported them including its start-up and data preparation, scaled to the estimated steps, batch and GPUs
Use these readings to choose your settings:
| Figure | Action |
|---|---|
Tokens and Longest |
Check the distribution and longest rows against your intended context limit. |
Suggested maxSeqLength |
Choose a limit covering every row, or the 99th percentile if you intend to omit outliers. |
Over 512 to Over 32768 |
See how many rows each limit excludes. |
Trimmed lengths |
For text chat data, check what fits after removing old turns while keeping the system prompt and final turn. |
Default and All assistant turns |
Compare how many tokens each loss policy trains on. |
Choose the corresponding truncation policy in the run plan. Row numbers start at zero among non-blank lines.
Analyze preference pairs
For DPO, a pair’s length is the longer of the prompt with its chosen answer and the prompt with its rejected answer. The report counts pairs and shows no trimmed lengths. Shorten an oversized pair or increase maxSeqLength.
Estimate a run
Use your plan’s configuration to estimate updates:
akka optimize training datasets analyze triage/train -f run.yaml --wait
Batch shows rows per update, and Steps shows estimated optimizer updates. Time estimates use previous SFT runs on comparable settings and can differ when row lengths differ. DPO has no time estimate. The report explains unavailable estimates, including packed runs.