Dataset Viewer
The dataset could not be loaded because the splits use different data file formats, which is not supported. Read more about the splits configuration. Click for more details.
Couldn't infer the same data file format for all splits. Got {NamedSplit('train'): ('text', {}), NamedSplit('test'): ('json', {})}
Error code:   FileFormatMismatchBetweenSplitsError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

STAR v1: Execution-Grounded, Typed Recovery Supervision for Coding-Agent SFT

Authors: Chaitanya Medidar, Manasi Ghalsasi, Pouras Patil, Rushil Patil (Vivekanand Education Society's Institute of Technology, Mumbai)

DOI: 10.57967/hf/11003

These are the release artefacts for STAR: Execution-Grounded, Typed Recovery Supervision for Coding-Agent SFT (Medidar, Ghalsasi, Patil and Patil, 2026). Code: https://github.com/chaitanyamedidar/STAR

STAR is a selective SFT recipe that turns coding-agent recoveries into the supervision signal. It works in four steps:

  1. Detect failures from execution signals in tool output, using a deterministic detector and a six-type codebook.
  2. Type each failure, and check every type against a hand-labelled precision gate before any training.
  3. Force-keep the recovery span after each gated failure. On the remaining candidate tokens, keep only those whose base-model per-token loss is at or above the per-trajectory median. Weights are binary.
  4. Train a LoRA student on Qwen/Qwen3-8B (revision b968826d9c46dd6066d109eabc6255188de91218) and compare it with pre-declared ablation arms.

Stage-1 gate outcome

The rule was set in advance: a type passes if precision is at least 0.80 and the Wilson 95% lower bound is at least 0.70. Only T4 (test regression) passed. T5 and T6 failed, were excluded from training, and are reported. Source: labels/stage1_gate_labels.json, records/star/gates/stage1.FAIL and stage1.T4.PASS.

type n YES precision Wilson 95% verdict
T4 145 140 0.966 0.922–0.985 PASS
T5 90 6 0.067 0.031–0.138 FAIL
T6 142 60 0.423 0.344–0.505 FAIL

Arms

Seed 42, 500 LoRA steps each. Only A0, A5 and A2 were trained.

arm definition (from the repo README / weights manifest) adapter
A0 baseline: w = 1 on every candidate token; never sees the mask pourasrp/star-A0
A5 STAR: gated T4 recovery spans force-kept, plus the median base-loss cut on the rest pourasrp/star-A5
A2 utility-only: the same median base-loss cut, no force-keep pourasrp/star-A2
A1 random-k, matched to A5's retention (weights only, not trained) –
A4 ungated control: all detector-proposed T4/T5/T6 spans regardless of the gate (weights only, not trained) –
A5-corr an A5 variant that also force-keeps only T4 spans; see build_weights.py and weights_manifest.json for the exact rule (weights only, not trained) –

Layout

  • adapters/{A0,A5,A2}/: adapter_model.safetensors and adapter_config.json (PEFT LoRA, r=64, alpha=128)
  • weights/: w_<arm>.npz binary per-token loss weights and weights_manifest.json. The manifest's w_sha256 hashes the arrays, not the npz files.
  • labels/: Stage-1 hand labels (per labeller and resolved), gate labels, and annotations.jsonl (turn indices and kinds only)
  • records/: gate records, Stage-1 import log, Tier-2 eval summaries and decision rules, SHA256SUMS, split id lists, scoring manifest
  • scripts/: reproduction scripts, keeping their repo paths under scripts/star/...
  • manifests/: per-arm training run manifests

This dataset contains no trajectory text and no SWE-Lego source code. Every input is rebuilt from upstream by instance_id.

Regenerating the inputs

Upstream data: SWE-Lego Real (SWE-Lego/SWE-Lego-Real-Data), revision 879c96b91dfa321b4d1c621d149a9200f8a1d118, resolved == True. Training ids are in records/star/labelling/split/train_pool_ids.txt. Run these from the root of the GitHub repo (commands taken from its README):

pip install -r star/training/requirements-train.txt numpy==2.2.6 pyarrow==25.0.1
python star/scoring/score_base_loss.py --full
python star/training/annotate_messages.py --out star/training/annotations/annotations.jsonl
python star/training/build_weights.py --annotations star/training/annotations/annotations.jsonl \
  --stage1-pass star/gates/stage1.T4.PASS --labels star/artifacts/results/stage1_gate_labels.json \
  --seed 42 --arms A0,A1,A2,A4,A5,A5-corr --out-dir star/training/weights
python star/training/train_lora.py --arm A5 --seed 42 --out-root <checkpoints_root> \
  --s-per-step <measured_s> --rate-inr-h <instance_rate> --balance-inr <balance>

Quick start: rebuild inputs

Run these from the root of the GitHub repo. The commands are copied from its README.

  1. Install the pinned environment:
    pip install -r star/training/requirements-train.txt numpy==2.2.6 pyarrow==25.0.1
    
  2. Compute the base-model per-token loss (writes star/scores/base/<id>.npz and MANIFEST.json):
    python star/scoring/score_base_loss.py --full
    
  3. Build the turn/span annotations:
    python star/training/annotate_messages.py --out star/training/annotations/annotations.jsonl
    
  4. Build the weight files for every arm:
    python star/training/build_weights.py --annotations star/training/annotations/annotations.jsonl \
      --stage1-pass star/gates/stage1.T4.PASS --labels star/artifacts/results/stage1_gate_labels.json \
      --seed 42 --arms A0,A1,A2,A4,A5,A5-corr --out-dir star/training/weights
    
  5. (Optional) Train one arm with LoRA:
    python star/training/train_lora.py --arm A5 --seed 42 --out-root <checkpoints_root> \
      --s-per-step <measured_s> --rate-inr-h <instance_rate> --balance-inr <balance>
    

Note on the weight files

Each w_<arm>.npz holds binary per-token loss masks over 2,480 trajectories, keyed by instance_id (ids) plus token offsets (offsets, 2,481 boundaries into the flat w/fk arrays of 40,619,597 tokens). They line up only with the exact Qwen/Qwen3-8B tokenisation (revision b968826d9c46dd6066d109eabc6255188de91218) and the chat template used in the paper: tokenize_common.py sha256 a3d24851a8d584be8b044ad9ee2d1f7c2fcca7f06e65821d12934a9eacaa8bce and chat_template_sha256 a55ee1b1660128b7098723e0abcd92caa0788061051c62d51cbe87d9cf1974d8 (see weights/weights_manifest.json, manifests/*_run_manifest.json and records/star/scores/base/MANIFEST.json). Inputs rebuilt with any other tokeniser or template will not align.

Loading an adapter

from huggingface_hub import snapshot_download
from peft import PeftModel
from transformers import AutoModelForCausalLM
path = snapshot_download("pourasrp/star_v1", repo_type="dataset", allow_patterns="adapters/A5/*")
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B", revision="b968826d9c46dd6066d109eabc6255188de91218")
model = PeftModel.from_pretrained(base, path, subfolder="adapters/A5")
# or load from the model repo: PeftModel.from_pretrained(base, "pourasrp/star-A5")

SHA256

file sha256
adapters/A0/adapter_model.safetensors dd410293b37002fa725a993f87bead22697ed3490b3fa8c7effe6b3a25c6c9a4
adapters/A5/adapter_model.safetensors 144ad8681ad879eefc0495ea305cc70b432bce26e260ee985ea2554b59590056
adapters/A2/adapter_model.safetensors 4dfe92988fc312d53e8196986e74fda7070f22eef30b8e55b77589079e782cf8
weights/w_A0.npz ffad447aef36a064cff5dfed9f4a695b0c2171109d4a6c71d43bbcac800a560d
weights/w_A1.npz fc6a43988f474711b0fffe719896fcc94b47075ce7dcd0127ce4388e72a74141
weights/w_A2.npz 0652bbb493334ddb76dd4e0e761918ba16833ce35ba02ba8a7781f0074aa4b1a
weights/w_A4.npz 8e8be06c281ea97f65eb81a9d2935d41673c0fb7daea0cb8741422351a1bd5b7
weights/w_A5.npz f921f7a905d47e22ce434b6b3e2559458dc50697cfcae440d00261439dfe7466
weights/w_A5-corr.npz 0e29840c349ff2601cccd2b46609b35b15f43a175340feefbdb493085bb5875b
weights/weights_manifest.json d36616f86e4d89388d4e0393130a8f20712abe01a7b70556937145f2d6355f86
labels/annotations.jsonl 7a8e3873b5ac0212e1e2a677d421b9f86878e7e95c074ebddd780058b9f81d6b
labels/stage1_gate_labels.json 6ff59614740e37ee3e920095bd1c99f2192c331df24024ad040c19c40146ddc9
adapters/A0/adapter_config.json 5d96cdc754568f51bea79d0fc75d22fabc5242b0cea455189fcc20824f954341
adapters/A5/adapter_config.json ee6070f2ae37e6c3f9e89e7cbeb7c2f5b30af87e141b32735b18fcbb668313be
adapters/A2/adapter_config.json 1448204e3648947def36dc5e38f69d4b55d124a95256cba00066a8a5c27d7414
labels/stage1_labels_heldout.jsonl 11797adaab4e2a50af7aabafb856723c870fcb9d9301e9bf89132548228f21f1
labels/stage1_labels_heldout_resolved.jsonl 87c252dbf1f071ebb5adb86a23fb3b1df2152d463a940428def51ac7437fbd61

License

Apache-2.0 (see LICENSE, NOTICE). The base model Qwen/Qwen3-8B (Apache-2.0) is not included. Code inside the upstream SWE-Lego trajectories stays under each upstream repository's own license and is not redistributed here. Citation: CITATION.cff.

How to cite

DOI: 10.57967/hf/11003

@misc{star_v1_2026,
  title     = {STAR: Execution-Grounded, Typed Recovery Supervision for Coding-Agent SFT (dataset and adapters)},
  author    = {Medidar, Chaitanya and Ghalsasi, Manasi and Patil, Pouras and Patil, Rushil},
  year      = {2026},
  publisher = {Hugging Face},
  doi       = {10.57967/hf/11003},
  url       = {https://huggingface.co/datasets/pourasrp/star_v1}
}

Medidar, C., Ghalsasi, M., Patil, P., & Patil, R. (2026). STAR: Execution-Grounded, Typed Recovery Supervision for Coding-Agent SFT (dataset and adapters) [Data set]. Hugging Face. https://doi.org/10.57967/hf/11003

Downloads last month
-