hyunwoongko commited on
Commit
9d1728d
·
verified ·
1 Parent(s): a57df3a

add clawgym-filtered: jsonl + slime/torchtitan parquet + torchtitan_sft arrow

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ clawgym.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - text-generation
7
+ tags:
8
+ - swe
9
+ - agentic
10
+ - tool-calling
11
+ - openclaw
12
+ - sft
13
+ size_categories:
14
+ - 10K<n<100K
15
+ ---
16
+
17
+ # ClawGym-Filtered
18
+
19
+ OpenClaw agentic trajectories (MiniMax-M2.5 + GLM-5.1) filtered and reformatted
20
+ for SFT / mid-training of agentic coding models.
21
+
22
+ ## Summary
23
+
24
+ - **Rows**: 15,777
25
+ - **Tokens**: 342M (Qwen3-4B tokenizer, training chat template)
26
+ - **Source**: [RUC-AIBOX/ClawGym-Trajectory](https://huggingface.co/datasets/RUC-AIBOX/ClawGym-Trajectory)
27
+ - **Scaffold**: OpenClaw (19-tool toolset)
28
+ - **Generators**: MiniMax-M2.5, GLM-5.1
29
+
30
+ ## Pipeline
31
+
32
+ 24,497 raw → 15,777 final (64.4% retention):
33
+
34
+ | Stage | Out | Δ | Reason |
35
+ |---|---:|---:|---|
36
+ | raw (HF) | 24,497 | — | RUC-AIBOX/ClawGym-Trajectory |
37
+ | 07 schema recovery | 19,863 | -4,634 | residual tool_call schema violations |
38
+ | 08 preprocessed | 19,185 | -678 | empty_asst / identity / leak / refusal |
39
+ | 10 CJK filter | 18,010 | -1,175 | Chinese leakage |
40
+ | 11 hacking gate | 18,009 | -1 | skip mode, edge case |
41
+ | 12 quality judge | 15,791 | -2,218 | Qwen3.6-35B 5-rubric individual mode |
42
+ | 15 postprocess | **15,777** | -14 | min_tokens / compression / leak |
43
+
44
+ ## Reasoning-content shift
45
+
46
+ ClawGym models emit chain-of-thought as the prose body of an assistant turn
47
+ that also carries `tool_calls`. We move that text into `reasoning_content`
48
+ and null out `content`, so only the **final no-tool-call assistant turn**
49
+ keeps user-visible content. Pure tool-call turns (no prose, no reasoning)
50
+ are left untouched.
51
+
52
+ Verified pre-shift: every row has exactly one no-tool-call assistant turn,
53
+ always last (0 mid-trajectory cases across 15,777 rows).
54
+
55
+ | Asst turns | Count | After shift |
56
+ |---|---:|---|
57
+ | with tool_calls, non-empty content | 114,891 | content → reasoning_content, content = null |
58
+ | with tool_calls, empty content | 21,478 | unchanged |
59
+ | no tool_calls (final reply) | 15,777 | unchanged, content kept |
60
+
61
+ ## Files
62
+
63
+ | Path | Format | Size |
64
+ |---|---|---:|
65
+ | `clawgym.jsonl` | raw final JSONL (one `{context, meta, num_tokens}` per line) | 1.35 GB |
66
+ | `slime/clawgym.parquet` | OpenAI-spec 6-column, messages/tools as JSON string | 0.44 GB |
67
+ | `torchtitan/clawgym.parquet` | 4-column, `context` as native `list<struct>` | 0.40 GB |
68
+ | `torchtitan_sft/` | Arrow dataset, 3 shards (256K max-token cap) | 1.30 GB |
69
+
70
+ ### Slime parquet schema
71
+
72
+ ```
73
+ instance_id (str) | domain (str) | source (str) | messages (str) | tools (str) | num_tokens (int64)
74
+ ```
75
+
76
+ `messages` / `tools` are JSON strings. Assistant turn order is fixed:
77
+ `{role, content, reasoning_content, tool_calls}` (tool_calls = [] when empty).
78
+
79
+ ### Torchtitan parquet schema
80
+
81
+ ```
82
+ uuid_or_instance_id (str) | context (list<struct>) | tools (str) | meta (str)
83
+ ```
84
+
85
+ `context` is a native `list<struct>` (no json.loads needed for the outer
86
+ list). Per-turn struct (alphabetical): `{content, reasoning, role,
87
+ tool_call_id, tool_calls}`. The only inner JSON string is
88
+ `context[i].tool_calls[j].function.arguments`.
89
+
90
+ ### JSONL schema
91
+
92
+ ```jsonc
93
+ {
94
+ "context": [
95
+ {"role": "system", "content": "..."},
96
+ {"role": "user", "content": "..."},
97
+ {"role": "assistant",
98
+ "content": null,
99
+ "reasoning_content": "Let me read all the input files first.",
100
+ "tool_calls": [{"id": "...", "type": "function",
101
+ "function": {"name": "read", "arguments": "{\"path\":\"...\"}"}}]},
102
+ {"role": "tool", "tool_call_id": "...", "content": "..."},
103
+ {"role": "assistant", "content": "Done. Here is the result..."}
104
+ ],
105
+ "meta": {"source": "clawgym", "instance_id": "clawgym::row_0", "tools": [...]},
106
+ "num_tokens": 23088
107
+ }
108
+ ```
109
+
110
+ ## Loading
111
+
112
+ ```python
113
+ # Arrow dataset (torchtitan_sft)
114
+ from datasets import load_dataset
115
+ ds = load_dataset("hyunwoongko/clawgym-filtered", data_dir="torchtitan_sft")
116
+
117
+ # Parquet
118
+ import pyarrow.parquet as pq
119
+ table = pq.read_table("torchtitan/clawgym.parquet") # or "slime/clawgym.parquet"
120
+ ```
121
+
122
+ ## License
123
+
124
+ Apache 2.0 (inherited from upstream RUC-AIBOX/ClawGym-Trajectory).
clawgym.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:003e3252616b6d2b93cfc312d6001426f9825c8cb500d99d96de5e6c63faf6ab
3
+ size 1352719151
slime/clawgym.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dac5e63f980ab47a9d12bdce18fdf8e19fe7e9433af4cb86566e7ffc1ffe4770
3
+ size 444780610
torchtitan/clawgym.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:935031c79c6431ce88785d234fcfbfb2d5cc84d17284c41b6e702583eb4c2fcd
3
+ size 401084564
torchtitan_sft/data-00000-of-00003.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2e08e2cc9f4593684af3368c4e6cc5b53efc195d3d5857b96d7bb21500a37d9
3
+ size 450796944
torchtitan_sft/data-00001-of-00003.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2a109af00aee17397ca5fb84f32bace8febe0a217a8b8879d7d089cec9c43ff
3
+ size 443969808
torchtitan_sft/data-00002-of-00003.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d248b6dc2169a3785461c421d281beea44e4942056b1fdcdc737a9194fa228c
3
+ size 403818184
torchtitan_sft/dataset_info.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "citation": "",
3
+ "description": "",
4
+ "features": {
5
+ "context": {
6
+ "feature": {
7
+ "content": {
8
+ "dtype": "string",
9
+ "_type": "Value"
10
+ },
11
+ "function_name": {
12
+ "dtype": "string",
13
+ "_type": "Value"
14
+ },
15
+ "reasoning": {
16
+ "dtype": "string",
17
+ "_type": "Value"
18
+ },
19
+ "role": {
20
+ "dtype": "string",
21
+ "_type": "Value"
22
+ },
23
+ "tool_call_id": {
24
+ "dtype": "string",
25
+ "_type": "Value"
26
+ },
27
+ "tool_calls": {
28
+ "feature": {
29
+ "function": {
30
+ "arguments": {
31
+ "dtype": "string",
32
+ "_type": "Value"
33
+ },
34
+ "name": {
35
+ "dtype": "string",
36
+ "_type": "Value"
37
+ }
38
+ },
39
+ "id": {
40
+ "dtype": "string",
41
+ "_type": "Value"
42
+ },
43
+ "type": {
44
+ "dtype": "string",
45
+ "_type": "Value"
46
+ }
47
+ },
48
+ "_type": "List"
49
+ }
50
+ },
51
+ "_type": "List"
52
+ },
53
+ "tools": {
54
+ "dtype": "string",
55
+ "_type": "Value"
56
+ }
57
+ },
58
+ "homepage": "",
59
+ "license": ""
60
+ }
torchtitan_sft/state.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00003.arrow"
5
+ },
6
+ {
7
+ "filename": "data-00001-of-00003.arrow"
8
+ },
9
+ {
10
+ "filename": "data-00002-of-00003.arrow"
11
+ }
12
+ ],
13
+ "_fingerprint": "09e42c6c7a952123",
14
+ "_format_columns": null,
15
+ "_format_kwargs": {},
16
+ "_format_type": null,
17
+ "_output_all_columns": false,
18
+ "_split": null
19
+ }