AdithyaSK HF Staff commited on
Commit
74fa57f
·
1 Parent(s): cc0a03c

SmolDataEnvs: rename, new README, banner

Browse files
Files changed (2) hide show
  1. README.md +56 -24
  2. banner.png +3 -0
README.md CHANGED
@@ -3,6 +3,7 @@ license: mit
3
  task_categories:
4
  - text-generation
5
  tags:
 
6
  - sft
7
  - agent
8
  - tool-calling
@@ -10,46 +11,77 @@ tags:
10
  - trl
11
  ---
12
 
13
- # 🛠️ Data Agent — SFT
14
 
15
- **4,677 worked examples** of an agent doing data science *the right way*. Each row is a complete,
16
- **verified-correct** trajectory: read the question, poke at the data with a shell tool, reason,
17
- compute, and write the answer. Every one of these solved its task and passed a deterministic grader
18
- — so you're fine-tuning on demonstrations that are **known to be correct**, not just plausible.
19
 
20
- Drop-in ready for [TRL](https://github.com/huggingface/trl): conversational `messages` + `tools`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- ## Where it comes from
23
- These are real agent rollouts on the [Data Agent](https://huggingface.co/HuggingEnvs) tasks, which
24
- were themselves built from the [**jupyter-agent dataset**](https://huggingface.co/datasets/jupyter-agent/jupyter-agent-dataset)
25
- (data-science notebooks over Kaggle datasets). We kept **only trajectories that reached the correct
26
- answer** under deterministic grading (reward = 1.0) — one clean demonstration per task.
27
 
28
  ## What's inside
29
- - **4,677 correct trajectories** — one per task
 
30
  - **Difficulty** — easy 1,402 · medium 2,640 · hard 635
31
- - One tool throughout: `bash` (shell command execution)
32
 
33
  ## What's in a row
 
34
  - **`messages`** — the full conversation in OpenAI/TRL chat format: `system` → `user` (the task) →
35
- `assistant` (reasoning + `tool_calls`) → `tool` (command output) → … → final `assistant` answer.
36
- Tool-call `arguments` are JSON objects; `tool` messages carry the tool `name`.
37
- - **`tools`** — the `bash` tool's JSON schema (rendered by `apply_chat_template(..., tools=...)`)
38
  - `task_id`, `difficulty` (1–5), `difficulty_tier`, `n_turns`, `source_agent`
39
 
40
  ## Fine-tune with TRL
 
41
  ```python
42
  from datasets import load_dataset
43
- from trl import SFTTrainer, SFTConfig
44
-
45
- ds = load_dataset("HuggingEnvs/data-agent-sft", split="train")
46
 
 
47
  trainer = SFTTrainer(
48
- model="Qwen/Qwen2.5-3B-Instruct", # any tool-capable chat template
49
- train_dataset=ds, # messages + tools are picked up automatically
50
- args=SFTConfig(assistant_only_loss=True, max_length=8192),
51
  )
52
  trainer.train()
53
  ```
54
- The `messages` + `tools` columns render through your model's chat template, and
55
- `assistant_only_loss=True` trains on the assistant's tokens only — no dataset wrangling needed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  task_categories:
4
  - text-generation
5
  tags:
6
+ - smoldataenvs
7
  - sft
8
  - agent
9
  - tool-calling
 
11
  - trl
12
  ---
13
 
14
+ <div align="center">
15
 
16
+ <img src="https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-sft/resolve/main/banner.png" alt="SmolDataEnvs" width="100%">
 
 
 
17
 
18
+ # 🛠️ SmolDataEnvs — SFT
19
+
20
+ **5.5K+ RL tasks for hill-climbing small models in code and data science.**
21
+
22
+ [![Collection](https://img.shields.io/badge/%F0%9F%A4%97%20Collection-SmolDataEnvs-FFD21E?style=for-the-badge&labelColor=1a1a1a)](https://huggingface.co/collections/FineEnvs/smoldataenvs)
23
+
24
+ </div>
25
+
26
+
27
+ **4,677 worked examples** of an agent doing data science the right way. Each row is a complete,
28
+ verified-correct trajectory: read the question, poke at the data with a shell tool, reason, compute,
29
+ write the answer. Every one of them solved its task and passed the deterministic grader, so you are
30
+ fine-tuning on demonstrations that are known to be correct rather than merely plausible.
31
+
32
+ Drop-in ready for [TRL](https://github.com/huggingface/trl): conversational `messages` plus `tools`.
33
 
 
 
 
 
 
34
 
35
  ## What's inside
36
+
37
+ - **4,677 correct trajectories**, one per task
38
  - **Difficulty** — easy 1,402 · medium 2,640 · hard 635
39
+ - One tool throughout: `bash`
40
 
41
  ## What's in a row
42
+
43
  - **`messages`** — the full conversation in OpenAI/TRL chat format: `system` → `user` (the task) →
44
+ `assistant` (reasoning plus `tool_calls`) → `tool` (command output) → … → final `assistant` answer
45
+ - **`tools`** — the `bash` tool's JSON schema, for `apply_chat_template(..., tools=...)`
 
46
  - `task_id`, `difficulty` (1–5), `difficulty_tier`, `n_turns`, `source_agent`
47
 
48
  ## Fine-tune with TRL
49
+
50
  ```python
51
  from datasets import load_dataset
52
+ from trl import SFTConfig, SFTTrainer
 
 
53
 
54
+ ds = load_dataset("FineEnvs/SmolDataEnvs-sft", split="train")
55
  trainer = SFTTrainer(
56
+ model="HuggingFaceTB/SmolLM3-3B",
57
+ train_dataset=ds,
58
+ args=SFTConfig(output_dir="smoldataenvs-sft", max_length=8192),
59
  )
60
  trainer.train()
61
  ```
62
+
63
+ A runnable notebook and a single-file script for HF Jobs are in
64
+ [FineEnvs/04-smoldataenvs](https://github.com/adithya-s-k/FineEnvs/tree/main/04-smoldataenvs).
65
+
66
+ ## Where it comes from
67
+
68
+ Built from the [jupyter-agent dataset](https://huggingface.co/datasets/jupyter-agent/jupyter-agent-dataset)
69
+ — real data-science notebooks over 471 Kaggle datasets. Every question–answer pair was extracted and
70
+ then **verified**: strong agent models had to solve the task in a live sandbox and reproduce the gold
71
+ answer under deterministic grading. Anything ambiguous or un-checkable was dropped. So every task
72
+ here is known-solvable and unambiguously gradable.
73
+
74
+ **Verified by a checker, not judged by a model.** Grading is an exact comparison against a known
75
+ answer, through a ladder of checks: exact match → numeric with tolerances → list and percent
76
+ normalisation → symbolic equivalence. No LLM sits in the reward path, so the signal does not drift
77
+ when you change the grader's model, because there isn't one.
78
+
79
+ ## The family
80
+
81
+ | Repo | What it is |
82
+ |---|---|
83
+ | [`SmolDataEnvs`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs) | the tasks as plain rows �� load it and prompt any model |
84
+ | [`SmolDataEnvs-sft`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-sft) | 4,677 verified agent trajectories, TRL-ready |
85
+ | [`SmolDataEnvs-harbor-train`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-train) | 5,000 tasks as Harbor environments |
86
+ | [`SmolDataEnvs-harbor-test`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-test) | 250 held-out, deliberately harder |
87
+ | [`SmolDataEnvs-harbor-eval`](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-harbor-eval) | 144 for quick validation during a run |
banner.png ADDED

Git LFS Details

  • SHA256: b5a8a6613c85b436d5624937cbbd61d6cf827df7cb0db04905cc1d9c7c5d8081
  • Pointer size: 132 Bytes
  • Size of remote file: 1.99 MB