Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
4
120
trajectory_id
large_stringlengths
33
33
task_group_id
large_stringlengths
34
34
model_name
large_stringclasses
4 values
n_tokens
int64
1.44k
32.3k
n_assistant_turns
int64
2
60
n_rewritten_turns
int64
0
60
[ { "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...
rts_traj_edd60fe36d54fb558df7c44e
rts_group_f2dd8e686aa52d1611ae1373
qwen35-27b-iter0000161-hf
14,236
21
0
[ { "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...
rts_traj_1a5b412f639bbad2966957f6
rts_group_353405722ee0b61144f6ecd6
qwen35-27b-iter0000161-hf
4,142
7
7
[ { "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...
rts_traj_880bd50c59f7a8ba7eb1a867
rts_group_3c6e66d5efa480df811bf2e3
gpt-oss-120b
12,532
18
18
[ { "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...
rts_traj_0f38ceca73e1c6d288fc8159
rts_group_ae10dd53a22c25342d941720
qwen35-27b-iter0000161-hf
11,203
9
0
[ { "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...
rts_traj_e2c1475d6f93c4f3a248952d
rts_group_023a9926f22a753ada9b3530
Qwen3.5-27B
4,580
6
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...
rts_traj_72e377fe6ed43f5d87f90378
rts_group_bfa2c36bbd174aa252f392b9
qwen35-27b-iter0000161-hf
9,379
12
1
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED)
rts_traj_8ea7ebfa0e3de7c260fee7ed
rts_group_1ca9429623853768376aec43
qwen35-27b-iter0000161-hf
6,656
11
11
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED)
rts_traj_f2b67461f50ce18dd652b358
rts_group_41f8024057297a4a76f248cc
qwen35-27b-iter0000161-hf
6,099
8
0
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED)
rts_traj_a26b3f87dc92ff0f9215a1bb
rts_group_276f759a289719a82ecf5c78
qwen35-27b-iter0000161-hf
7,209
9
9
[{"role":"user","content":"You are an AI assistant tasked with solving command-line tasks in a Linux(...TRUNCATED)
rts_traj_76c43674c12112199dfc6cab
rts_group_17360beb0bd56eba45162992
Qwen3.5-27B
6,309
7
0
End of preview. Expand in Data Studio

RST SFT trajectories for Qwen3.5-27B

Multi-turn terminal-agent conversations distilled from Zhongzhi1228/Recursive-Task-Synthesis-Trajectories, ready for supervised fine-tuning of Qwen/Qwen3.5-27B.

Pipeline, launchers, and the full plan: https://github.com/k1ssloo/RST-Train

cap10 reproduces the paper's SFT example count exactly

The source release has 327,189 trajectories. cap10 ends at 10,778 examples — the count arXiv:2608.05466v3 states it trained on. That was not tuned toward; it fell out of the filter chain below. Read it as strong corroboration that the paper used a per-group cap of ~10 with essentially this filtering, not as proof.

327,189 trajectories
  ├─ gate: status=completed ∧ has_trajectory ∧ ¬has_exception
  │        ∧ reward=1.0 ∧ task_present_in_task_dataset
  │   → 60,932 clean successes over 1,338 task groups
  ├─ per-group cap (round-robin across the 4 generating models) → 11,582
  ├─ reconstruct ATIF-v1.7 → messages, normalize assistant JSON → 11,090
  ├─ dedup (exact + per-group command signature)                → 11,010
  └─ drop > 32,768 tokens                                       → 10,778
config examples train / holdout tokens groups steps/epoch @ GBS 128
cap10 (default) 10,778 10,578 / 200 99.9 M 1,329 82
cap8 (ablation) 8,886 8,686 / 200 82.4 M 1,327 67
cap10_pretokenized 10,778 10,578 / 200 99.9 M 1,329 82

Group-capping is the point: successes per group are median 28, max 284, so uncapped training would be dominated by a handful of lineages.

Schema

field type notes
messages list<{role, content}> the conversation; see the shape below
trajectory_id string upstream id, for provenance
task_group_id string upstream group; use it for grouped splits
model_name string which model generated the trajectory
n_tokens int full sequence length under the Qwen3.5 chat template
n_assistant_turns int mean 12.0, max 60
n_rewritten_turns int assistant turns whose JSON was renormalized
messages[0]  role=user       full Terminus-2 harness prompt + task + initial screen
messages[1]  role=assistant  canonical JSON {analysis, plan, commands[, task_complete]}
messages[2]  role=user       terminal observation
...

messages[0] is user, not system, because that is how Terminus-2 delivers the harness prompt (steps[0].source == "user" upstream). Keeping it as user makes training and serving identical — changing it introduces a train/serve skew.

Two processing details that matter

1. Assistant JSON was renormalized. 62.6 % of upstream assistant turns are wrapped in ```json fences or carry extra prose; 0.1 % are unparseable (dropped). Turns are re-serialized to canonical indent=2 JSON preserving key order.

2. The warning preamble was repaired. When an upstream turn was fenced, the following observation begins Previous response had warnings: - Extra text detected before JSON object. Normalizing the assistant turn without stripping that preamble trains the model to accept "you had warnings" feedback for clean output. 50,169 observations needed this repair in cap10.

cap10_pretokenized: the same data with the mask already applied

field type meaning
input_ids list[int] the exact tokens of the whole-conversation render
loss_mask list[int] 1 = train on this token, 0 = context only. Aligned 1:1 with input_ids.

Same 10,778 examples, 99,939,485 tokens, 32,402,050 trained tokens (32.42 %). It is smaller than the messages version (75 MB vs 87 MB) because token ids compress better than JSON text.

To get labels, set labels[i] = input_ids[i] where loss_mask[i] == 1 else -100. Do not shift — HuggingFace models shift internally.

Why you may want this instead of messages

Building the mask yourself is the easiest place in this pipeline to be silently wrong: a bad mask still trains, the loss still falls, and the model just comes out worse. Two concrete traps:

1. Do not let a trainer re-tokenize turn-by-turn. verl's MultiTurnSFTDataset templates each message separately and concatenates. Measured on 200 rows of this dataset, 200/200 disagree with the whole-conversation render, because the Qwen3.5 template injects an empty `

before the **last** assistant turn — so turn-by-turn building makes every turn "last" and a 21-turn conversation ends up with 21 think blocks instead of 1. verl'signore_input_ids_mismatch: Truesilences the assertion, not the bug. Usingcap10_pretokenized` avoids this entirely.

2. Budget for the logits, not the model. This tokenizer's vocab is 248,320, and the loss upcasts logits to fp32. Measured on one H100-80GB with Qwen3.5-0.8B (0.75 B params!), a real forward/backward over these rows:

sequence length peak, unfused CE peak, fused CE (Liger)
4,096 14.98 GiB 5.52 GiB
8,192 28.43 GiB 6.75 GiB
~16,000 48.34 GiB 8.57 GiB
32,329 out of memory 13.14 GiB

At 32,329 tokens the unfused cross-entropy asks for a single 29.85 GiB tensor (seq × 248,320 × 4 bytes) and dies. That term is independent of model size, so a fused/chunked cross-entropy is effectively required at long sequence length regardless of which model you train.

Loss masking

Built for slime's --loss-mask-type qwen3_5, which trains only assistant content. Verified before release: 0 chat-template contract failures, 0 user-turn leakage, 32.6 % of tokens trained. The default --loss-mask-type qwen mis-segments this template and would train on terminal output — do not use it.

Each message may also carry step_loss_mask: 0 to exclude a single assistant turn from the loss while keeping it as context. Unused here; available as a lever.

Limitations

  • Reward-verified, not exact-environment-replay-verified. In a 500-sample check only 46 instructions mapped exactly to a public task. These are verifier-passing trajectories; they are not a claim that each was replayed in a byte-identical environment.
  • Source mix is skewed toward one iterated model (qwen35-27b-iter0000161-hf, ~63 %). Rebalance via --models in the builder if that matters to you.
  • 232 trajectories were dropped for exceeding 32,768 tokens, which biases mildly against the longest-horizon episodes.
  • Success-only. The 166,660 clean failures are not here; 1,279 groups have both successes and failures and are a ready-made offline preference set.

Attribution

Derived from Zhongzhi1228/Recursive-Task-Synthesis-Trajectories (CC-BY-4.0) by Zhongzhi1228 et al., Recursive Synthesis for Long-Horizon Terminal Tasks (arXiv:2608.05466). Released under the same license. Trajectories were filtered, reconstructed, normalized, deduplicated, and re-serialized; no new rollouts were generated.

Downloads last month
245

Paper for NiuNiu0110/RST-SFT-Qwen3.5-27B