Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
128
640
label
class label
6 classes
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
End of preview. Expand in Data Studio

CaPtain SFT Data

This is the supervised fine-tuning (SFT) data of CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents: the training mix of CaPtain-4B-SFT. It consists of synthetic agent trajectories collected in CaPtain-Harness, in which a vision-language model controls a robot arm by writing Python, plus visual QA.

Rows 24,440 (15,921 agent rows, 8,519 visual-QA rows)
Tokens 797.1M (Qwen3.5 tokenizer, images included)
Agent episodes 2,036
Images 236,046 files (25.3 GB), 439,210 references
Row file data/sft.jsonl, 2.33 GB
Trainer sft/train/train_sft.py in https://github.com/waltstephen/CaPtain
Harness https://github.com/waltstephen/CaPtain-Harness

How the data were generated

The agent rows are synthetic agent trajectories collected in CaPtain-Harness, generated with frontier models (GPT-6 Astra and GPT-6.x Sol).

  • Same setting as the student. The generating agents acted in the same harness as the 4B student, with the same tools, TASK.md, chat template, request caps and context policy.
  • Simulator. All agent episodes in this release ran in simulation on LIBERO, with wide-layout initial states.
  • Self-generated successes. 1,386 rows (267 episodes) are successful episodes of the student itself.
  • Filtering.
    • Only successful episodes are kept.
    • All agent code was rewritten onto one small helper library (val, need, downq, go). Each rewrite was checked against a mock robot.
    • Segments where the agent was struggling (about 3.6% of requests) are left unsupervised.
    • The filter rules are in sft/data/FORMAT.md of the CaPtain repository.

Subsets

meta.subset names the source of each row:

meta.subset Rows Tokens Episodes What it is
earlier_agent 6,382 284.9M 1,084 General agent trajectories, code-normalised. Suites: libero_90 3,413, libero_10 1,018, libero_goal 741, libero_object 700, libero_spatial 510.
hard_batch2 5,090 238.4M 380 Hard-task episodes (libero_10, libero_goal).
hard_batch1 2,138 99.3M 214 Hard-task episodes (libero_10, libero_goal).
hard_cap60 925 43.4M 91 Hard-task episodes under a 60-request cap, at most 10 per task.
rl_self 1,386 52.3M 267 Successful episodes of the student itself, one per task and start.
visual_qa 8,519 78.8M – Packed visual QA, trained at loss weight 0.5.
total 24,440 797.1M 2,036

Files and layout

data/sft.jsonl            one training row per line, in the training order
images_manifest.tsv       path, subset, bytes of every image file
images/episodes/<episode>/<file>.png        agent-episode camera frames and crops (66,700 files, 10.7 GB)
images/qa_sim/<group>/<file>.png            harness camera frames used by simulator visual QA (37,628 files, 6.1 GB)
images/qa_general/<group>/<source>/<file>   images of public visual-QA datasets (131,718 files, 8.4 GB)

COCO images are split into sub-folders by the first digit of the 6-digit image id (images/qa_general/<group>/coco_train2014/<digit>/COCO_train2014_<id>.jpg), because a Hub folder holds at most 10,000 files.

  • Image paths. Image paths in the rows are relative to the dataset root, so pass the dataset root as IMAGE_ROOT.
  • Images inside an episode folder are the frames the harness saved in the agent's workspace:
    • obs_<k>_head.png and obs_<k>_wrist.png: the head and wrist cameras at observation k, 512 × 512;
    • other names, such as *_crop.png: crops the agent made itself.
  • Row order. The rows keep the relative order of the training run, which used 16 ranks with one row per rank per step. Before training, re-order with sft/train/mix_order.py --world W for your world size W and compute the loss constant with sft/train/sup_tokens.py.

Row format

Each line is one JSON object:

{
  "id": "libero_10_8_seed-1031-d1d3af#req-019",
  "images": ["images/episodes/libero_10_8_seed-1031-d1d3af/obs_000_head.png", "..."],
  "tools": [{"type": "function", "function": {"name": "python", "description": "Run Python in a persistent Python 3 session ...",
             "parameters": {"type": "object", "properties": {"input": {"type": "string"}}, "required": ["input"]}}}],
  "messages": [
    {"role": "system", "content": "<harness system prompt, with TASK.md inlined at the end>"},
    {"role": "user", "content": "<environment_context> ... <cwd>/data/captain/episodes/libero_10_8_seed-1031/workspace</cwd> ..."},
    {"role": "user", "content": [{"type": "text", "text": "Read TASK.md and complete the robot task ..."},
                                 {"type": "image", "image": "images/episodes/.../obs_000_head.png"}, "..."]},
    {"role": "assistant", "content": "<visible text>", "reasoning_content": "<thinking>",
     "tool_calls": [{"id": "call_...", "type": "function",
                     "function": {"name": "python", "arguments": {"input": "<python source>"}}}]},
    {"role": "tool", "tool_call_id": "call_...", "content": [{"type": "text", "text": "Cell 7 completed in 5.2 s\nOutput:\n..."},
                                                         {"type": "image", "image": "images/episodes/.../obs_005_head.png"}]}
  ],
  "meta": {"episode": "libero_10_8_seed-1031-d1d3af", "source": "agent", "subset": "hard_batch2", "origin": "frontier_agent",
           "suite": "libero_10", "task_id": 8, "seed": 1031, "request_index": 19, "turn_index": 18,
           "supervise_turns": [4, 5, 6], "packed_n": 3, "total_tokens": 56141, "n_images": 16,
           "host_final_success": true, "perturb_axes": ["paraphrase", "robot_init"]}
}

Fields

  • id: the episode id, request index and packing index. Visual-QA rows use qapack:<auxqa|general>:<n>. These ids are not unique across QA packs.
  • images: every image of the row, in order of appearance.
  • tools: the single python tool, exactly as the harness declares it. Visual-QA rows have no tools.
  • messages: the request as the harness sent it to the model, plus the model's replies. See How rows map to the harness template.
  • meta: information used by the trainer or for analysis.

meta fields

Used by the trainer:

Field Meaning
source agent or qapack. qapack rows get the QA loss weight.
supervise_turns Prefix-packed rows: the assistant-turn ordinals that are supervised.
turn_index Per-request rows: only this last assistant turn is supervised.
loss_weight Optional per-row weight. It is 2.0 for 3,189 up-weighted side-approach and pivot re-plan demonstrations.
total_tokens Row length, used for step ordering.
suite, episode Used by the optional per-suite cap.

Descriptive only:

Field Meaning
subset The source, as in the table above.
origin frontier_agent or rl_self.
task_id, seed The LIBERO task and initial-state seed.
request_index Index of the model request within the episode.
packed_n Number of per-request views packed into the row.
n_images Number of images in the request.
host_final_success True for every row: only successful episodes are kept.
perturb_axes Data-generation perturbations of that episode: paraphrased instruction, robot initial pose, camera view, sensor noise, mid-task events, object attributes.
nosup_reason Present on rows whose target cell was left unsupervised.
n_items, item_sources, qtypes QA rows only: the QA items packed into the row and their types.

total_tokens was measured when the rows were built, before path neutralisation (see Scrubbing). Scrubbed rows are 0–368 tokens shorter (mean −129 on a 1,039-row sample), so the value is a tight upper bound.

How rows map to the harness template

The model is trained on exactly what CaPtain-Harness sends at inference. The rows follow the harness's request template:

  1. system: the harness system prompt (the coding-agent prompt the template was captured from), followed by # TASK.md with the task, the API contract and the rules. This text is model-visible and was trained on as is.
  2. user: the <environment_context> block: working directory, shell, date and sandbox roots. The workspace is /data/captain/episodes/<episode folder>/workspace.
  3. user: the task request with the initial head and wrist images.
  4. Optional user <context_compaction> notes: when the context passes the window, older turns are removed and summarised, exactly as the harness does.
  5. Alternating assistant / tool turns:
    • Each assistant turn has reasoning_content (rendered as the <think> block) and a python tool call whose arguments.input is raw Python source.
    • Each tool turn returns the cell output and the receipts of the robot calls, as text, plus any attached images.
    • Images older than the most recent 12 or 16 are replaced by [image omitted: ...], as in the harness.

Render rows with the Qwen3.5 processor:

processor.apply_chat_template(row["messages"], tools=row.get("tools"))

Images are bound in order of appearance. Only assistant spans are supervised: from the token after <|im_start|>assistant\n up to and including <|im_end|>, and only for the turns that meta selects. Rows are at most 65,536 tokens long and must not be truncated. A row longer than --max-length stops training with an error. The full rules, including the text-hint mask, are in sft/data/FORMAT.md of the CaPtain repository.

Usage

hf download YijiaFan/CaPtain-SFT-Data --repo-type dataset --local-dir captain-sft-data
# train SFT (2 nodes x 8 GPUs) from the untied Qwen3.5-4B, in the CaPtain repository;
# re-order with sft/train/mix_order.py and set C from sft/train/sup_tokens.py first (see "Row order" above):
NNODES=2 NODE_RANK=0 MASTER_ADDR=<node-0> MODEL=<untied Qwen3.5-4B> \
  DATA=<re-ordered sft.jsonl> IMAGE_ROOT=captain-sft-data C=<loss constant> RUN=captain-4b-sft bash sft/train/launch_sft.sh

The CaPtain-4B-SFT training run used:

  • 2,435 steps (1.5 epochs);
  • peak LR 1e-5 with a cosine schedule;
  • QA loss weight 0.5;
  • text-hint mask p = 0.2;
  • a frozen vision tower.

Compute the loss constant C with sft/train/sup_tokens.py. Read the rows with json line by line: content is a string in some messages and a list of parts in others, so Arrow-based loaders may not infer one schema. The images are separate files, referenced by relative path.

Scrubbing

The rows were scrubbed before release. Training-relevant content is otherwise unchanged.

Changes:

  • Workspace paths. Absolute workspace paths of the collection machines, in the system prompt, the environment context and tool outputs, were replaced by the neutral root /data/captain/episodes/.
  • Ids. Episode ids and image file names were renamed: the internal batch prefixes were replaced by a hash suffix.
  • meta. Reduced to the fields listed above. Generator, endpoint and run bookkeeping fields were removed.
  • Third-party credential. One credential that appears in a public visual-QA source item (a password, a private IP address and an account name) was redacted.

What stayed identical:

  • Every assistant turn (the supervised tokens) is byte-identical to the training data. The only exception is the credential redaction in 2 visual-QA answers.
  • Re-rendering a 1,039-row sample with the Qwen3.5 chat template gave identical supervised token spans for every row.

Licenses and terms

  • License: MIT. Third-party QA images and items keep their original licenses (see Third-party data).
  • OpenAI terms. The agent trajectories were generated with OpenAI models (GPT-6 Astra, GPT-6.x Sol), and OpenAI's terms of use apply to the generated outputs. Check them before you use the data, especially to train models that compete with the generating models.
  • Captured system prompt. The system prompt in every agent row is the prompt of the coding-agent client through which the frontier models were run. The model was trained on it verbatim.
  • Simulator images. The images in images/episodes/ are renders of LIBERO scenes (MIT). The images in images/qa_sim/ are harness camera frames of LIBERO scenes and, for 5,212 files, of simulated tabletop scenes of another robot arm.
  • Third-party visual QA (images/qa_general/). These images and the matching QA items keep their original licenses; see Third-party data.

Third-party data

images/qa_general/ (131,718 files, 8.4 GB) and the visual-QA items that use them come from the public datasets below. They are not covered by the MIT license of this dataset; their original licenses and terms apply. The folder name under images/qa_general/<group>/ names the source. Check the terms of each source before you use or redistribute these files. Some items contain personal data that was already present in the source datasets, such as e-mail addresses and document scans.

Folder Source Files License / terms
coco_train2014 COCO train2014 27,573 Annotations CC BY 4.0; images under the Flickr terms of use
pixmo_points PixMo-Points (Ai2) 12,915 ODC-BY 1.0; images are web images under their own copyright
robo2vlm Robo2VLM 13,786 Apache-2.0 (frames from Open X-Embodiment datasets, under their own licenses)
lo_* subsets of LLaVA-OneVision-Data 77,444 Apache-2.0 as packaged by LLaVA-OneVision; each subset also keeps the terms of its original source, listed below

LLaVA-OneVision subsets (folder: original source, files, original license or terms):

  • lo_ai2d: AI2D, 1,813, see the AI2D release (Allen Institute for AI);
  • lo_aokvqa: A-OKVQA, 8,816, Apache-2.0 (images from COCO);
  • lo_chartqa: ChartQA, 7,206, GPL-3.0;
  • lo_clevr: CLEVR, 4,959, CC BY 4.0;
  • lo_imgtext: LLaVA-OneVision image-text subset, 3,615, see LLaVA-OneVision-Data;
  • lo_infovqa: InfographicVQA, 2,133, terms of the Document VQA challenge (research use);
  • lo_llava_wild4v: LLaVA-Wild (GPT-4V), 4,299, see LLaVA-OneVision-Data;
  • lo_lrv: LRV-Instruction, 3,637, see the LRV-Instruction release (images from Visual Genome, CC BY 4.0);
  • lo_sharegpt4o: ShareGPT-4o, 3,500, MIT;
  • lo_sharegpt4v_coco, lo_sharegpt4v_llava: ShareGPT4V, 7,259 + 2,803, CC BY-NC 4.0 (images from COCO and the LLaVA pre-training data);
  • lo_stvqa: ST-VQA, 5,726, terms of the Scene Text VQA challenge (research use);
  • lo_tallyqa: TallyQA, 5,794, see the TallyQA release (images from COCO and Visual Genome);
  • lo_textcaps: TextCaps, 4,945, CC BY 4.0 (images from Open Images);
  • lo_textocr: TextOCR, 3,653, CC BY 4.0 (images from Open Images);
  • lo_visual7w: Visual7W, 5,702, see the Visual7W release (images from COCO);
  • lo_vsr: VSR, 1,584, CC BY 4.0 (images from COCO).

Citation

@article{fan2026captain,
  title   = {CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents},
  author  = {Fan, Yijia and He, Xilin and Jiang, Yilei and Wu, Dongming and Wang, Jiaxu and Yue, Xiangyu},
  journal = {arXiv preprint},
  year    = {2026}
}
Downloads last month
140

Models trained or fine-tuned on YijiaFan/CaPtain-SFT-Data

Collection including YijiaFan/CaPtain-SFT-Data