Datasets:
messages listlengths 2 64 | trajectory_id large_stringlengths 15 27 | task_group_id large_stringlengths 6 18 | model_name large_stringclasses 1
value | n_tokens int64 1.24k 32.7k | n_assistant_turns int64 1 32 | n_rewritten_turns int64 0 14 |
|---|---|---|---|---|---|---|
[
{
"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_6251__KxuaaKj | task_6251 | QuantTrio/GLM-4.6-AWQ | 3,781 | 7 | 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... | task_3363__jtSmYPt | task_3363 | QuantTrio/GLM-4.6-AWQ | 2,970 | 5 | 1 |
[
{
"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... | inferredbugs-9393__bM3JnmE | inferredbugs-9393 | QuantTrio/GLM-4.6-AWQ | 16,854 | 4 | 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... | task_4418__sBodNJo | task_4418 | QuantTrio/GLM-4.6-AWQ | 3,149 | 5 | 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... | task_7377__zdC7yay | task_7377 | QuantTrio/GLM-4.6-AWQ | 2,161 | 2 | 1 |
[
{
"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_6939__7f7ToKL | task_6939 | QuantTrio/GLM-4.6-AWQ | 3,638 | 9 | 1 |
[
{
"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_2416__SN26cgC | task_2416 | QuantTrio/GLM-4.6-AWQ | 4,485 | 6 | 1 |
[
{
"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... | inferredbugs-8524__zy5fGhx | inferredbugs-8524 | QuantTrio/GLM-4.6-AWQ | 8,239 | 5 | 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... | task_6781__X36Kjxi | task_6781 | QuantTrio/GLM-4.6-AWQ | 2,194 | 2 | 1 |
[
{
"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_2176__qbcrDQm | task_2176 | QuantTrio/GLM-4.6-AWQ | 2,288 | 2 | 1 |
OpenThoughts-Agent v1 SFT, normalized to the Terminus-2 contract
14,312 multi-turn terminal-agent trajectories (14,112 train / 200 holdout),
derived from open-thoughts/OpenThoughts-Agent-v1-SFT
and put through the same assistant-JSON normalizer, loss-mask contract and
length gate as NiuNiu0110/RST-SFT-Qwen3.5-27B.
The two are therefore mixable row-for-row in one SFT run.
Converter, tests, and launchers: https://github.com/k1ssloo/RST-Train
(scripts/03d_build_openthoughts_sft.py, tests/test_openthoughts_convert.py).
What was actually done
Upstream is already the right contract β agent=terminus-2, assistant turns are
{"analysis", "plan", "commands"[, "task_complete"]} JSON, observations are
New Terminal Output: blocks. So this is not a reformat; it is a normalization
pass plus a set of gates:
15,209 upstream rows
ββ reconstruct + normalize every assistant turn β 14,372 (837 dropped)
ββ dedup (exact content + per-task command signature) β 14,372 (0 dropped)
ββ drop > 32,768 tokens under the Qwen3.5 template β 14,312 (60 dropped)
ββ train 14,112
ββ holdout 200
| examples | 14,312 (14,112 / 200) |
| tokens | 100,185,231 β mean 7,000, p50 6,078, p90 11,923, p99 22,530, max 32,739 |
| assistant turns | mean 7.46, max 32 |
| distinct tasks | 14,312 β one trajectory per task |
| source model | QuantTrio/GLM-4.6-AWQ (all rows) |
| steps/epoch @ GBS 128 | 110 |
The 837 dropped rows, and why they are dropped whole
645 had an assistant turn that will not parse as JSON (overwhelmingly an
unescaped inner quote: "made directories "1" and "2" here"), 192 had one
missing a required key. A trajectory is dropped entirely when any of its
turns fails.
Truncating at the last good turn was measured and rejected: across those 837 the median salvageable fraction is 0.15, and 323 fail on the very first assistant turn. Truncating would mostly contribute one-turn stubs of ten-turn episodes and skew the length distribution toward short, easy prefixes.
Unescaped inner quotes are not repaired. Where a broken string ends is a guess, and a guess here writes invented content into supervision.
Two normalizations that are easy to get wrong
1. Literal newlines inside JSON strings are repaired, not dropped. Agents
emit "analysis": "step oneβstep two" with a real newline. That is invalid JSON
by spec and json.loads rejects it as an "Invalid control character", but the
meaning is unambiguous, so it is re-dumped with the newline properly escaped.
Every assistant turn in this dataset parses under strict json.loads.
2. The stale warning preamble is stripped. When an assistant turn had to be
renormalized, the next observation begins Previous response had warnings: - Extra text detected before JSON object β a complaint about a formatting error
that no longer exists in the data. Left in, it trains the model to expect a
scolding for output it was just shown as correct. 572 observations needed
this repair. The preamble is kept whenever the preceding turn was already clean,
because then the complaint is about something real.
5.82 % of assistant turns were rewritten in some way (n_rewritten_turns).
Schema
default config:
| 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; unique per row here |
model_name |
string | QuantTrio/GLM-4.6-AWQ |
n_tokens |
int | full sequence under the Qwen3.5 chat template |
n_assistant_turns |
int | mean 7.46, max 32 |
n_rewritten_turns |
int | assistant turns whose JSON was renormalized |
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. A
system turn would shift the rendered prefix and therefore the loss mask; rows
containing one are refused rather than folded in (upstream has none).
pretokenized config:
| field | type | meaning |
|---|---|---|
input_ids |
list[int] |
tokens of the whole-conversation render |
loss_mask |
list[int] |
1 = train on this token, 0 = context only; aligned 1:1, no offset |
Same 14,112 / 200 rows, 98,567,847 tokens, 30,711,017 trained (31.16 %).
To get labels, set labels[i] = input_ids[i] where loss_mask[i] == 1 else
-100, and do not shift β HuggingFace CausalLMs and Liger's fused CE shift
internally.
Verification before release
- 0 chat-template contract failures.
apply_chat_template(tokenize=False)then tokenizing equalsapply_chat_template(tokenize=True)for every row β that equality is what makes the character offsets the mask is built from valid. Rows failing it are dropped, not silenced. - 0 user-turn leakage: no terminal observation token is ever trained on.
- 31.05 % of tokens trained (300-row independent audit), 31.16 % over the full pretokenized export.
- Holdout is group-disjoint by construction: upstream
taskis unique per row (15,209 distinct over 15,209 rows), so no sibling of a held-out task is in train. Asserted at build time rather than assumed.
Tokenizer: Qwen/Qwen3.5-27B β byte-identical across the five Qwen3.5 sizes
(0.8B / 4B / 9B / 27B / 35B-A3B), so pretokenized is valid for any of them.
Mixing with RST-SFT
Identical canonical assistant form and identical mask semantics, so concatenation is safe. What differs, and matters for interpreting a mixed run:
| this dataset | RST-SFT-Qwen3.5-27B (cap10) |
|
|---|---|---|
| examples | 14,312 | 10,778 |
| tokens | 100.2 M | 99.9 M |
| assistant turns / row | 7.46 mean | 12.0 mean |
| tasks | 14,312, one trajectory each | 1,329 groups, capped at ~10 each |
| source models | 1 | 4 |
| license | apache-2.0 | cc-by-4.0 |
The task/trajectory ratio is the real difference: RST is many trajectories over few task lineages, this is one trajectory over many distinct tasks. Mixed, they are complementary β breadth of task from here, depth of horizon from there.
Note for anyone diffing against
RST-SFT-Qwen3.5-27B: that dataset was built before the two normalizations above. Every row it contains is byte-identical under the current normalizer (verified over all 126,630 of its assistant turns), so it is not wrong β it simply predates the recovery of ~492 previously-dropped turns and would gain rows if rebuilt.
Limitations
- Single source model. All rows come from
QuantTrio/GLM-4.6-AWQ, so this distills one policy's style, not a consensus. - Not replay-verified here. Upstream's own filtering is taken as given; no trajectory was re-executed and no verifier was re-run in producing this copy.
- Success-only, and one sample per task β there is no within-task contrast, so this is not usable as a preference set.
- 60 rows over 32,768 tokens were dropped, biasing mildly against the longest-horizon episodes.
Attribution
Derived from open-thoughts/OpenThoughts-Agent-v1-SFT
(Apache-2.0) by the OpenThoughts team, and released under the same license.
Trajectories were reconstructed, assistant JSON normalized, stale warning
preambles repaired, deduplicated, length-gated and pre-tokenized. No new
rollouts were generated and no verifier was re-run.
- Downloads last month
- 62