Datasets:
File size: 11,134 Bytes
a9b8f37 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | ---
pretty_name: TinySFT
language:
- en
- zh
license: other
task_categories:
- text-generation
tags:
- sft
- chain-of-thought
- reasoning-effort
- tool-calling
- agentic
size_categories:
- 100K<n<1M
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.parquet
---
# TinySFT
TinySFT contains 848,063 supervised fine-tuning samples for **SFT of small models**. Each sample includes a system message, preserves the native tool-calling structure, and every assistant turn carries a `reasoning_effort` label (`none` / `low` / `high` / `max`) indicating how much thinking that turn should require.
The dataset has 848,063 rows / 980,750 assistant turns / 1 parquet file, about 1.4 GiB in total. Rows are globally shuffled; each file is a random sample of the full corpus. The maximum length per row is 8,000 length units (≈ tokens).
## Quick Start
```python
from datasets import load_dataset
ds = load_dataset('CodonProject/TinySFT', split='train')
```
```python
cols = ['id', 'source', 'subset', 'domain', 'language', 'system',
'system_synth', 'tool_json', 'session', 'n_turns', 'n_assistant',
'effort_none', 'effort_low', 'effort_high', 'effort_max', 'est_len']
ds = ds.select_columns(cols)
row = ds[0]
print(row['system'][:200])
for turn in row['session']:
print(turn['role'], turn['reasoning_effort'], len(turn['cot']))
```
Tool-calling argument schemas differ across sources, so they are stored as JSON strings and must be parsed by the user:
```python
import json
for name in row['tool_json']: # declared tools
spec = json.loads(name)
for turn in row['session']: # tool calls issued by the model
if turn['tool_call_json']:
for call in json.loads(turn['tool_call_json']):
print(call.get('name'), call.get('param') or call.get('arguments'))
```
## Fields
| Column | Type | Description |
|---|---|---|
| `id` | int64 | Row identifier, unique across the dataset |
| `type` | str | Always `"SFT"` |
| `source` | str | Source dataset `owner/name` |
| `subset` | str | Source subset name (only some sources have it; otherwise an empty string) |
| `domain` | str | `agentic` / `medical` / `math` / `general` / `science` / `code` / `safety` / `psychology` |
| `language` | str | `en` or `zh` |
| `system` | str | System message, always non-empty |
| `system_synth` | bool | `true` = the original sample had no system message; this one was written based on the domain |
| `tool_json` | list<str> | Declared tool schemas, each element is a JSON string; empty list = no tools used |
| `session` | list<struct> | Conversation turns, see below |
| `n_turns` / `n_assistant` | int32 | Total turns / assistant turns |
| `effort_none` … `effort_max` | int32 | Number of assistant turns in this row for each effort level, convenient for direct filtering in SQL |
| `est_len` | int32 | Estimated length for this row (length unit ≈ token), max 8000 |
| `dropped_turns` / `cut_chars` | int32 | Number of turns dropped / characters cut to meet the length limit; both 0 means kept as is |
| `system_cut` / `tools_cut` | bool | Whether the system / tool declarations were truncated |
| `file_idx` / `offset` | int32 / int64 | Used to trace back to the source file and row offset |
Each turn in `session` has the following structure:
| Field | Type | Description |
|---|---|---|
| `role` | str | `human` (user) / `model` (assistant) / `tool_response` (tool return) |
| `content` | str | Turn content |
| `cot` | str | Thought block for this turn; empty string when `reasoning_effort == "none"` |
| `reasoning_effort` | str | Only present on `role == "model"` turns: `none` / `low` / `high` / `max` |
| `tool_call_json` | str | Tool call issued in this turn (JSON string); empty string if none |
## What Is `reasoning_effort`?
It is a reasoning-effort label on each assistant turn, indicating how much thinking should be spent on that turn.
| Level | Meaning | Turns | Share | Average `cot` characters |
|---|---|---|---|---|
| `none` | No thought block; the model directly answers or issues a tool call (`cot` is always empty). | 158,131 | 16.1% | 0 |
| `low` | Short thinking: one or two sentences to confirm constraints or directly apply a known solution, without elaboration. | 376,072 | 38.3% | 489 |
| `high` | Medium thinking: step-by-step derivation or bullet-point planning, but without exhaustive enumeration or repeated self-checking. | 352,051 | 35.9% | 1,233 |
| `max` | Long thinking: comparing multiple approaches, item-by-item enumeration and verification, drafting first and then looking for counterexamples, or long-horizon tool planning. | 94,496 | 9.6% | 4,439 |
## Common Filters
```python
# Samples with at least one turn of high/max thinking
ds_deep = ds.filter(lambda r: r['effort_high'] + r['effort_max'] > 0)
# Samples with tool declarations (agentic / tool calling)
ds_tools = ds.filter(lambda r: len(r['tool_json']) > 0)
# Chinese / English only
ds_zh = ds.filter(lambda r: r['language'] == 'zh')
ds_en = ds.filter(lambda r: r['language'] == 'en')
# Avoid long samples; suitable for models with short context
ds_short = ds.filter(lambda r: r['est_len'] <= 2048)
# Single-turn QA only
ds_single = ds.filter(lambda r: r['n_assistant'] == 1)
# Extract effort per turn for length-bucketed training
def turns(rows):
for row in rows:
for turn in row['session']:
if turn['role'] == 'model':
yield {
'effort': turn['reasoning_effort'],
'cot_chars': len(turn['cot']),
'domain': row['domain'],
}
```
## Scale and Distribution
### By Domain
| Domain | Rows | Share |
|---|---|---|
| Math (`math`) | 401,504 | 47.3% |
| General (`general`) | 141,394 | 16.7% |
| Medical (`medical`) | 101,775 | 12.0% |
| Tool / multi-turn agent (`agentic`) | 96,593 | 11.4% |
| Science (`science`) | 69,435 | 8.2% |
| Psychology (`psychology`) | 15,328 | 1.8% |
| Code (`code`) | 12,670 | 1.5% |
| Safety / values (`safety`) | 9,364 | 1.1% |
### By Language
| Language | Rows | Share |
|---|---|---|
| English (`en`) | 696,496 | 82.1% |
| Chinese (`zh`) | 151,567 | 17.9% |
## Example
```json
{
"id": 9896351587098,
"type": "SFT",
"source": "cs-giung/math-think-sft-mini",
"subset": "",
"domain": "math",
"language": "en",
"system": "You are a careful mathematical problem solver. Work through the problem step by step and state the final answer clearly.",
"system_synth": true,
"system_cut": false,
"tools_cut": false,
"tool_json": [],
"session": [
{
"role": "human",
"content": "Can the number of diagonals of a polygon be exactly twice the number of its sides?",
"cot": "",
"reasoning_effort": "",
"tool_call_json": ""
},
{
"role": "model",
"content": "To determine if a polygon can have exactly twice as many diagonals as its number of sides, let's analyze the relationship mathematically.\n\n### Step 1: Understanding the Formula for Diagonals\nThe number of diagonals \\( D … [849 more chars]",
"cot": "First, I recall that the number of diagonals in a polygon can be calculated using the formula \\( \\frac{n(n - 3)}{2} \\), where \\( n \\) is the number of sides.\nThe problem states that the number of diagonals is exactly twi… [576 more chars]",
"reasoning_effort": "low",
"tool_call_json": ""
}
],
"n_turns": 2,
"n_assistant": 1,
"effort_none": 0,
"effort_low": 1,
"effort_high": 0,
"effort_max": 0,
"est_len": 626,
"dropped_turns": 0,
"cut_chars": 0,
"file_idx": 9,
"offset": 746937114
}
```
## About the Content
- **Tool samples**: 39,495 rows (4.7%). `tool_json` contains tool declarations, `tool_call_json` in `session` contains the model's calls, and `tool_response` turns contain execution results. Tool names and parameter schemas preserve each source's native format.
- **Supplemented system messages**: 727,277 rows (85.8%). These source samples originally had no system message. A 1–2 sentence short system message was written based on domain and language, marked with `system_synth: true`, so users can choose whether to include it.
- **Tool result length limit is 2000 characters**; longer results (e.g., full articles or complete files) are truncated. This is the largest source of information loss in long trajectories.
- **Reasoning labels are generated by rule-based heuristics**, based on length, structure, and wording signals (self-correction, verification, multiple approaches, planning, number of tool turns, and domain difficulty). This method is an approximate annotation, not human annotation; within the same level, the depth of thinking may still vary, especially at the `low` / `high` boundary.
## Sources
| Source | Rows | Language | Domain |
|---|---|---|---|
| `cs-giung/math-think-sft-mini` | 352,425 | en | math |
| `CodonProject/Organic-Reasoning-195k#general` | 68,832 | zh | general+math+science+psychology+medical+code+agentic |
| `lingshu-medical-mllm/ReasonMed` | 65,329 | en | medical |
| `Glint-Research/Complete-FABLE.5-traces-2M` | 57,213 | en | agentic |
| `zake7749/OpenScience-Chinese-Reasoning-SFT` | 49,999 | zh | science |
| `r0b0tlab/qwen3.8-max-distillation-50k` | 49,758 | en | general |
| `faunix/Qwen3.8-27B-Distillation-40K` | 39,994 | en | general |
| `zake7749/Qwen3.6-35B-A3B-Tool-Calling` | 28,271 | en | agentic |
| `CodonProject/Organic-Reasoning-195k#values_safety` | 27,032 | zh | science+safety+psychology+medical+code+math+agentic |
| `stindardlogic/math-reasoning-sft-100k` | 19,786 | en | math |
| `qiaojin/PubMedQA` | 19,656 | en | medical |
| `OysterCoreAI/SFT-General-Simplified.Chinese-10K` | 10,049 | zh | general |
| `TeichAI/Ox-Alpha-10k` | 9,954 | en | general |
| `FreedomIntelligence/medical-o1-reasoning-SFT` | 8,183 | en | medical |
| `r0b0tlab/deepseek-v4-pro-0813-agentic` | 8,097 | en | agentic |
| `CodonProject/Organic-Reasoning-195k#math` | 7,966 | zh | math+science+code |
| `CodonProject/Organic-Reasoning-195k#psychology` | 6,970 | zh | psychology+medical+science |
| `nvidia/Nemotron-SFT-SWE-v3.5` | 5,115 | en | code |
| `hotdogs/code-analysis-sft-qwen38-v2` | 4,375 | en | code |
| `zake7749/Qwen-3.5-Reasonlite-Verified` | 4,310 | en | general |
| `TeichAI/DeepSeek-v4-Pro-Agent` | 2,575 | en | agentic |
| `CodonProject/Organic-Reasoning-195k#frontier` | 1,893 | zh | science+code+math+psychology+medical+agentic |
| `TeichAI/Fable-5-Cursor-Traces` | 244 | en | agentic |
| `Glint-Research/Fable-5-traces` | 30 | en | agentic |
| `greghavens/kimi-k3-coding-and-debugging-traces` | 7 | en | code |
Each source's original copyright and license are on its own dataset page. This dataset is a derivative work of these sources and does not declare a separate unified license; please follow each source's terms when using it. |