TinySFT / README.md
A03HCY's picture
Upload README.md
a9b8f37 verified
|
Raw History Blame Contribute Delete
11.1 kB
metadata
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

from datasets import load_dataset

ds = load_dataset('CodonProject/TinySFT', split='train')
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:

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

# 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

{
  "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…[849morechars]","cot":"First,Irecallthatthenumberofdiagonalsinapolygoncanbecalculatedusingtheformula(fracn(n−3)2 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 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.