Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- agentic
|
| 9 |
+
- software-engineering
|
| 10 |
+
- tool-use
|
| 11 |
+
- code
|
| 12 |
+
- distillation
|
| 13 |
+
- gasai
|
| 14 |
+
- slm
|
| 15 |
+
size_categories:
|
| 16 |
+
- 1K<n<10K
|
| 17 |
+
source_datasets:
|
| 18 |
+
- togethercomputer/CoderForge-Preview
|
| 19 |
+
pretty_name: Gasai-Agent-CoderForge
|
| 20 |
+
configs:
|
| 21 |
+
- config_name: default
|
| 22 |
+
data_files: train.jsonl
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Gasai-Agent-CoderForge
|
| 26 |
+
|
| 27 |
+
**5,205 verified-resolved agentic software-engineering trajectories, re-authored into the Gasai harness
|
| 28 |
+
format for pretraining small language models.** Derived from `togethercomputer/CoderForge-Preview`
|
| 29 |
+
(`reward==1`, Python). Each row is one complete tool-use trace serialized as a single Gasai control-token
|
| 30 |
+
sequence in the **`gasai`** field.
|
| 31 |
+
|
| 32 |
+
> Sister dataset to [`GasaiAI/Gasai-Agent-5k`](https://huggingface.co/datasets/GasaiAI/Gasai-Agent-5k)
|
| 33 |
+
> (from nvidia/Open-SWE-Traces) — **byte-identical format**, same pipeline.
|
| 34 |
+
|
| 35 |
+
## What it is
|
| 36 |
+
|
| 37 |
+
| | |
|
| 38 |
+
|---|---|
|
| 39 |
+
| Traces | **5,205** |
|
| 40 |
+
| Unique problems (instances) | **2,704** (≤2 rollouts kept per instance) |
|
| 41 |
+
| Total tokens (StarCoder-2 tok) | **~312M** |
|
| 42 |
+
| Tokens / trace | median ~60K |
|
| 43 |
+
| File | `train.jsonl` (~1.0 GB) |
|
| 44 |
+
| Code language | **Python** |
|
| 45 |
+
| Natural language | **English** |
|
| 46 |
+
|
| 47 |
+
### Format (Gasai harness)
|
| 48 |
+
```
|
| 49 |
+
<|bos|><|system|>{system}<|tools|>[{read,bash,edit,write}]
|
| 50 |
+
<|user|>{structured task}
|
| 51 |
+
<|assistant|><think>{dense reasoning}</think><|tool_use|>{"name","input"}<|eos|>
|
| 52 |
+
<|tool_result|>{"tool_use_id":"tc_001","name","content"}<|eos|>
|
| 53 |
+
… (tool loop) …
|
| 54 |
+
<|assistant|><think>{reasoning}</think>{final answer}<|eos|>
|
| 55 |
+
```
|
| 56 |
+
One `<think>` per assistant turn; `<|tool_use|>`↔`<|tool_result|>` paired by positional `tc_NNN`.
|
| 57 |
+
Schema: `{"trajectory_id": "...", "gasai": "<|bos|>…<|eos|>"}`.
|
| 58 |
+
|
| 59 |
+
### Pipeline
|
| 60 |
+
1. **Tool remap** — CoderForge's OpenHands tools (`execute_bash`, `str_replace_editor`, `finish`, `think`)
|
| 61 |
+
→ the fixed Gasai 4-tool vocab `read` / `bash` / `edit` / `write`.
|
| 62 |
+
2. **Constitution `<think>`** — the teacher's verbose reasoning re-written per turn into a dense, source-bound
|
| 63 |
+
`<think>` (every line a restated fact / grounded decision; no meta-narrative). Median ~42 tokens/think,
|
| 64 |
+
~0.01% task-restatement.
|
| 65 |
+
3. **Structured prompts** — first user turn restructured into a clean XML prompt (role/`<context>`, data in
|
| 66 |
+
tags, request last, embedded data in `{{ }}`). **80%** restructured; 20% keep the verbatim original
|
| 67 |
+
(fidelity fallback, never lossy).
|
| 68 |
+
4. **Deterministic polish** — directory `read`s → `bash find`; dropped persistent-shell artifacts
|
| 69 |
+
(`C-c`/empty bash, hung "command is still running" steps); coerced object-typed edit/write args; stripped
|
| 70 |
+
emoji from finals (arrows kept); kept (incomplete) empty-final traces.
|
| 71 |
+
5. **Dedup** — ≤2 rollouts per base instance (the source has up to 8 reward==1 rollouts per problem).
|
| 72 |
+
|
| 73 |
+
## ⚠️ Known limitations (read before training)
|
| 74 |
+
|
| 75 |
+
This dataset was deep-audited (multi-agent semantic review). It is **pretrain-grade as one ingredient**, not a
|
| 76 |
+
clean SFT set. Honest caveats:
|
| 77 |
+
|
| 78 |
+
- **Benchmark contamination — NOT decontaminated.** Built from SWE-bench evaluation-harness images
|
| 79 |
+
(`sweb.eval.x86_64.*`); upstream mixes SWE-smith / SWE-rebench / R2E-Gym (the latter two are live
|
| 80 |
+
leaderboards). The 2,704 instances were **not** filtered against SWE-bench Verified/Lite or SWE-Gym test.
|
| 81 |
+
**Do not benchmark a model trained on this against those suites without first intersecting & removing
|
| 82 |
+
overlapping `instance_id`s** (it would be train-on-test).
|
| 83 |
+
- **`<think>` result-reading defect (~20–35% of traces, in-loss).** Some `<think>` blocks state "the previous
|
| 84 |
+
test failed" right after a *passing* run — the pytest `N passed` summary is buried in walls of `=` and the
|
| 85 |
+
distiller mis-read it. Affects the result-reading skill; fixable by regenerating the affected think blocks.
|
| 86 |
+
- **Oracle-test reliance (inherent).** Agents read the failing test, then implement exactly to it — valid
|
| 87 |
+
TDD, reward is honest, but the in-loss think leans on a test oracle that won't exist on real tasks, so the
|
| 88 |
+
*apparent* problem-solving capability is inflated.
|
| 89 |
+
- **Limited diversity.** ~312M tokens come from only **2,704 unique problems** (×≤2 rollouts); volume ≠
|
| 90 |
+
problem diversity. Mix with other sources for breadth.
|
| 91 |
+
- **Minor:** ~7% of traces edit test files (a "fix the test" anti-pattern); first step is uniformly
|
| 92 |
+
`bash find /testbed -maxdepth 2`; observations carry OpenHands wrappers (`[exit code]`, `cat -n` numbering)
|
| 93 |
+
and `/testbed` paths (conditioning only — tool observations are not in loss).
|
| 94 |
+
|
| 95 |
+
## Source & license
|
| 96 |
+
Derived from [`togethercomputer/CoderForge-Preview`](https://huggingface.co/datasets/togethercomputer/CoderForge-Preview),
|
| 97 |
+
config `filtered_reward1` (the curated `reward==1` union of SWE-smith / SWE-rebench / R2E-Gym tasks).
|
| 98 |
+
Underlying repositories carry their own permissive licenses (MIT / Apache-2.0 / BSD; see the per-row
|
| 99 |
+
`license` in the source). Please cite CoderForge-Preview and the upstream task sets.
|