Datasets:
messages listlengths 2 118 | trajectory_id large_stringlengths 18 41 | task_group_id large_stringlengths 9 75 | model_name large_stringclasses 1
value | subset large_stringclasses 1
value | domain large_stringclasses 3
values | n_tokens int64 1.03k 32.8k | n_trained_tokens int64 141 26.9k | n_assistant_turns int64 1 59 |
|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "You are an AI assistant tasked with solving command-line tasks in a Linux environment. You will be given a task description and the output from previously executed commands. Your goal is to solve the task by providing batches of shell commands.\n\nFormat your response as JSON w... | task_8717__BP52K9X | task_8717 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 8,755 | 3,564 | 6 |
[
{
"role": "user",
"content": "You are an AI assistant tasked with solving command-line tasks in a Linux environment. You will be given a task description and the output from previously executed commands. Your goal is to solve the task by providing batches of shell commands.\n\nFormat your response as JSON w... | task_20737__ptBFyku | task_20737 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 7,479 | 3,002 | 6 |
[
{
"role": "user",
"content": "You are an AI assistant tasked with solving command-line tasks in a Linux environment. You will be given a task description and the output from previously executed commands. Your goal is to solve the task by providing batches of shell commands.\n\nFormat your response as JSON w... | task_8125__mm624g6 | task_8125 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 12,124 | 5,957 | 5 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_17751__EEHnYUh | task_17751 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 12,302 | 6,506 | 8 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_11772__35ntSy4 | task_11772 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 4,142 | 1,580 | 4 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_7800__tPc8nRB | task_7800 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 12,222 | 5,055 | 9 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_15301__H6FpyYk | task_15301 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 15,675 | 7,337 | 11 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_10791__6CVVnHz | task_10791 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 4,149 | 1,524 | 6 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_9922__yWy5XjJ | task_9922 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 10,885 | 5,141 | 10 |
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED) | task_8391__yii4qHM | task_8391 | deepseek-ai/DeepSeek-V3.2 | dataset_adapters | code | 8,102 | 4,072 | 4 |
Nemotron Terminal-Corpus, normalized to the Terminus-2 contract
360,057 multi-turn terminal-agent trajectories (359,656 train / 401 holdout),
3.88 billion tokens, with a <think> chain-of-thought on every assistant turn,
derived from nvidia/Nemotron-Terminal-Corpus
and put through the same assistant-JSON normalizer, loss-mask contract and length
gate as NiuNiu0110/OpenThoughts-Agent-v1-SFT-terminus
and NiuNiu0110/RST-SFT-Qwen3.5-27B. All three are mixable row-for-row.
Converter, tests and launchers: https://github.com/k1ssloo/RST-Train
(scripts/03f_build_nemotron_sft.py, tests/test_nemotron_convert.py).
Upstream's own results are the reason to care: training on this corpus took Qwen3-32B from 3.4 % to 27.4 % on Terminal-Bench 2.0, beating 480B Qwen3-Coder (23.9 %), and Qwen3-14B to 20.2 %, beating 120B GPT-OSS-high (18.7 %).
Composition
| config | train rows | steps/epoch @ GBS 128 | size | what it is |
|---|---|---|---|---|
dataset_adapters |
220,381 | 1,721 | 3.71 GiB | Math, Code and SWE datasets transformed into terminal tasks |
skill_based_medium |
88,912 | 694 | 1.97 GiB | synthetic tasks from a terminal-skill taxonomy, medium |
skill_based_easy |
44,692 | 349 | 0.67 GiB | same taxonomy, easy |
skill_based_mixed |
5,671 | 44 | 0.09 GiB | same taxonomy, mixed difficulty |
default |
359,656 | 2,809 | 6.44 GiB | all four |
The 401-row holdout is shared and split by task group, so it is disjoint from every config's train rows, not just from the one you pick.
| tokens | 3,880,294,261 β mean 10,777, p50 9,816, p90 19,957, p99 29,320, max 32,768 |
| trained tokens | 1,691,164,897 (43.58 %) |
| assistant turns | mean 7.34, max 59 |
| distinct tasks | 272,098 |
| teacher | deepseek-ai/DeepSeek-V3.2 (all rows) |
| steps/epoch @ GBS 128 | 2,809 (whole train split) |
This is ~39x the token count of either sibling SFT set. One epoch of the whole thing is a different class of run from anything else in this repo. Pick a config.
The one thing to understand before reading a loss curve on this
Every assistant turn upstream carries a real <think> block β 47.1 % of assistant
tokens β and only the final turn's reasoning is supervised. That is not a
conversion defect. It is what inference looks like.
Observations here are plain user turns, so they count as queries for the Qwen3.5
template's last_query_index scan, and the template emits reasoning only for
assistant turns after the last user turn. In a
user, assistant, user, assistant, β¦, user, assistant trajectory that is exactly one
turn. So the render is:
harness prompt context
JSON action, observation, JSON action, observation, β¦ actions supervised,
reasoning ABSENT
<think> reasoning </think> JSON action final turn: both supervised
The terminus-2 harness re-renders the whole history every turn under this same rule, so at turn k the model's own earlier reasoning has already been dropped from its context and it is asked to think afresh. Training on the same render is training on what the model will actually see. It also costs nothing in tokens β the dropped reasoning is not carried as unsupervised context, it simply is not there.
The <think> blocks are nevertheless kept in messages (1,759,784,993 tokens of
them), not stripped, so the artifact is not lossy and a per-turn-reasoning objective
remains possible later.
What the conversion did
366,154 upstream rows
ββ splice out parse-error retry loops (328,372 turns removed)
ββ truncate trailing `null` actions (17,570 trajectories)
ββ repair stale warning preambles (152 observations)
ββ normalize every JSON action through the shared normalizer
ββ refuse 195 unparseable, 90 bad think shape, 12 keyless, 3 control-token, 3 headless
ββ drop 5,794 rows over 32,768 tokens β 360,057 (98.33 % survive)
ββ dedup on (task, command signature) β 360,057 (0 dropped)
ββ split by task group ββ train 359,656
ββ holdout 401 (297 whole tasks)
Three upstream shapes that needed a decision
1. Parse-error retry loops β 328,372 turns. 17.4 % of assistant turns have an
empty body: the <think> block ran long, swallowed the start of the JSON, and
</think> landed after it. The next turn is always a
Previous response had parsing errors: ERROR: No valid JSON found in response
scolding carrying no observation at all (761/761 in a hand-checked sample) β a
pure retry request. The malformed turn and the scolding are removed together, which
reconnects the previous observation to the retry and keeps the user/assistant
alternation the loss mask depends on. Kept, they would train the model to emit a
think block and no action, and to expect to be told off for it.
2. Trailing null actions β 17,570 trajectories. The harness's marker for an
episode that ended without a final action. Every normalization failure surviving
the splice was this, and always the last turn (118/118 measured across five files
spanning both streams), so the trailing turn and the observation it answered are
truncated.
This is where this converter deliberately differs from
03d_build_openthoughts_sft.py, which refuses to truncate and drops trajectories
whole. Same test, opposite answer: on OpenThoughts the median salvageable fraction
was 0.15 and 323 trajectories failed on their first assistant turn, so truncating
would have produced one-turn stubs of ten-turn episodes. Here the failure is always
last, the salvageable fraction is ~0.9, and dropping whole would be the lossy choice.
3. Think markup that breaks the round-trip β 90 turns. The template recovers
reasoning with content.split('</think>')[0] and content with
split('</think>')[-1], so a second </think> makes those two splits disagree about
where the reasoning ended, silently. Exactly one balanced pair is required; anything
else is refused rather than guessed at. Same for the 3 turns carrying a literal
<|im_start|>, which is one token here β a model trained to emit it can forge a turn
boundary.
Schema
| field | type | notes |
|---|---|---|
messages |
list<{role, content}> |
user / assistant only, user-first, assistant-last |
trajectory_id |
string | upstream trial_name |
task_group_id |
string | upstream task; 272,098 distinct |
model_name |
string | deepseek-ai/DeepSeek-V3.2 |
subset |
string | one of the four configs above |
domain |
string | upstream folder β math, swe, code, debugging, security, β¦ |
n_tokens |
int | full sequence under the Qwen3.5 chat template |
n_trained_tokens |
int | supervised tokens under the qwen3_5 mask |
n_assistant_turns |
int | mean 7.34, max 59 |
messages[0] is user, not system β that is how Terminus-2 delivers the
harness prompt, and keeping it as user makes training and serving identical. Rows
containing a system turn are refused rather than folded in, because a system turn
shifts the rendered prefix and therefore the loss mask.
Assistant content is <think>\nβ¦\n</think>\n\n followed by the canonical
{"analysis", "plan", "commands"[, "task_complete"]} JSON, re-dumped with
indent=2 by the same normalizer the sibling datasets went through.
Tokenizer: Qwen/Qwen3.5-27B β byte-identical across the five Qwen3.5 sizes
(0.8B / 4B / 9B / 27B / 35B-A3B).
Verification before release
- 0 chat-template contract failures: rendering then tokenizing equals tokenizing directly for every published row. That equality is what makes the character offsets the loss mask is built from valid. Rows failing it are dropped, not silenced.
- 0 rows with a supervised first token β
30_run_sft_verl.shand the verl dataset both refuse those, because verl'ssft_lossrolls the mask cyclically across a packed micro-batch and a supervised token 0 leaks onto the previous document. - 0 rows over 32,768 tokens.
- Holdout is group-disjoint by construction β split by
task_group_id, so no sibling of a held-out task is in train. - Every count above is reproduced in
manifest.json, and the uploader refuses to publish if the card and the manifest disagree.
Limitations
- Single teacher. All rows distil
deepseek-ai/DeepSeek-V3.2, so this is one policy's style, not a consensus. - Not replay-verified here. NVIDIA's own filtering (
data_filtered.parquet) is taken as given; no trajectory was re-executed and no verifier was re-run. - Success-only, so no within-task contrast β not usable as a preference set.
- Only the final turn's reasoning is supervised. See above. If you want per-turn reasoning supervision you must restructure the data; the CoT is retained so you can.
- 5,794 rows over 32,768 tokens were dropped, biasing mildly against the longest-horizon episodes β concentrated in the SWE slice, whose p90 is the highest.
dataset_adaptersis 61 % of the corpus and is transformed math/code/SWE data, not natively terminal work. If you care about terminal skills specifically, theskill_based_*configs are the more targeted 139,431 rows.
Attribution
Derived from nvidia/Nemotron-Terminal-Corpus
(CC-BY-4.0) by Renjie Pi, Grace Lam, Mohammad Shoeybi, Pooya Jannaty, Bryan Catanzaro
and Wei Ping, and released under the same licence. Trajectories were spliced,
truncated, JSON-normalized, deduplicated, length-gated and split by task group. No new
rollouts were generated and no verifier was re-run.
@misc{pi2026dataengineeringscalingllm,
title={On Data Engineering for Scaling LLM Terminal Capabilities},
author={Renjie Pi and Grace Lam and Mohammad Shoeybi and Pooya Jannaty and Bryan Catanzaro and Wei Ping},
year={2026}, eprint={2602.21193}, archivePrefix={arXiv}, primaryClass={cs.CL},
url={https://arxiv.org/abs/2602.21193}}
- Downloads last month
- 69