albedo_training
收藏资源简介:
duel_corpus 是一个从 SN97 决斗工件中提取的信用分配监督微调(SFT)数据集。其核心思想是利用裁判在评估整个轨迹时提供的引用(81%的裁判解释中命名了满足每个问题的候选输出块),作为每轮奖励信号,无需额外计算成本。数据集通过多步骤流水线构建:从原始工件(400个工件,5.93 GB,19,811个评分样本)开始,经过转向提取(506,201个转向)、目标选择、验证,最终生成清洁版本(4,664行,22,762个训练转向)。输出格式兼容 sft/data.py,包含完整的 messages 列表,其中助理转向若应接收梯度则标记为 train: true,其余作为上下文。每行还携带 train_meta(每轮权重、标签、is_recovery、cmd_kind),以便在训练时重新加权。数据统计显示,转向信用分布不均:显示文件内容(cat -n、sed -n、cat)的转向平均信用较高(0.866-1.350),而 find/ls/pytest 等较低;信用呈前加载特征,前三轮决定了样本胜负;暴露偏差显著,一次失败命令导致下一轮预期信用降低约40%。最终构建的数据集包含24,472个训练转向(验证后22,762个),命令混合偏向显示命令(51%),标签包括 grounding(35.6%)、explore(29.6%)、claims(20.9%),以及2,841个恢复转向。此外,还构建了逃逸集(sft_escape_v1.jsonl),从转向级别选择在坏状态(前一轮失败或重复)后获得裁判信用的转向,以提供摆脱困境的训练数据,其中73.7%来自被第二阶段筛选拒绝的样本。最终组合数据集 sft_final_v1.jsonl 包含18,643行,36,741个梯度承载转向。为进一步覆盖决斗工件之外的区域(转向16之后),从 mini-coder 数据集中提取了逃逸(6,820行)和完成(16,000行)转向,最终混合数据集 sft_final_v2.jsonl 包含41,463行,59,561个梯度承载转向,1.69 GB,分为四种混合:credit(11.2%)、escape_duel(33.7%)、escape_mini(16.4%)、finish_mini(38.6%),每行携带 mix 标识以便调整比例。数据集还配套了无需裁判的本地评分器,通过特征化问题并拟合分类器来预测裁判评分,在保留集上达到每问题准确率0.771、每侧得分 Pearson 相关系数0.727、MAE 0.140。该数据集适用于训练终端环境中的命令执行模型,特别是学习如何通过信用分配获得高分,以及从失败命令中恢复并最终完成提交。
duel_corpus is a credit assignment supervised fine-tuning (SFT) dataset extracted from SN97 duel artifacts. It leverages citations provided by judges when evaluating entire trajectories (81% of judge explanations name candidate output chunks that satisfy each question) as per-round reward signals without additional computational cost. The dataset is constructed through a multi-step pipeline: starting from raw artifacts (400 artifacts, 5.93 GB, 19,811 scored samples), undergoing step extraction (506,201 steps), target selection, validation, and finally producing a clean version (4,664 rows, 22,762 training steps). The output format is compatible with sft/data.py, containing a complete messages list where assistant steps that should receive gradients are marked with train: true, and the rest serve as context. Each row also carries train_meta (per-round weight, label, is_recovery, cmd_kind) for reweighting during training. Data statistics show uneven step credit distribution: steps displaying file contents (cat -n, sed -n, cat) have higher average credit (0.866-1.350), while find/ls/pytest have lower; credit exhibits a front-loading feature where the first three rounds determine the samples win/loss; exposure bias is significant, with one failed command reducing expected credit in the next round by about 40%. The final constructed dataset contains 24,472 training steps (22,762 after validation), with command mix biased toward display commands (51%), labels including grounding (35.6%), explore (29.6%), claims (20.9%), and 2,841 recovery steps. Additionally, an escape set is constructed by selecting steps that receive credit after a bad state to provide training data for escaping difficult situations. The final combined dataset sft_final_v1.jsonl contains 18,643 rows, 36,741 gradient-bearing steps. To further cover areas beyond duel artifacts, escape and finishing steps from the mini-coder dataset are extracted, producing the final mixed dataset sft_final_v2.jsonl with 41,463 rows, 59,561 gradient-bearing steps, 1.69 GB, divided into four mixes: credit (11.2%), escape_duel (33.7%), escape_mini (16.4%), finish_mini (38.6%), each row carrying a mix identifier for proportional adjustment. The dataset also comes with a judge-free local scorer that predicts judge ratings by featurizing problems and fitting a classifier, achieving per-question accuracy of 0.771, per-side score Pearson correlation of 0.727, and MAE 0.140 on a held-out set. This dataset is suitable for training command execution models in terminal environments, particularly learning to achieve high scores through credit assignment and to recover from failed commands to complete submissions.
数据集详情总结
数据集概述
本数据集是一个基于SN97对决(duel)工件的信用分配SFT(监督微调)训练数据集,主要目标是通过分析智能体在终端环境中的完整操作轨迹,识别哪些操作步骤真正获得了评判员的信用认可,从而训练模型在类似场景中采取更有效的行动策略。
核心来源与构建流程
- 原始数据来源:200次评估运行产生的400个工件,共5.93 GB,包含19,811个评分样本
- 中间处理:经多个脚本逐步构建,从506,201个回合中筛选出有效训练数据
- 最终成果:
sft_final_v2.jsonl,包含41,463行、59,561个梯度训练回合,总大小1.69 GB
数据核心特征
信用分配发现
- 命令类型差异显著:显示文件内容的命令(如
cat -n、sed -n、cat)获得的信用是探索类命令(find/ls/pytest)的5-7倍 - 信用前置效应明显:第1回合平均信用为1.523,第15回合降至0.186,前三个回合是赢得样本的关键
- 暴露偏差:19.2%的回合获得失败观察,失败后的下一个回合获得信用的概率仅为18.8%(基线为30.3%)
四类数据混合
| 混合类型 | 行数 | 占比 | 回合窗口 | 用途 |
|---|---|---|---|---|
credit |
4,664 | 11.2% | 1-16 | 展示什么操作能赢得评判员信用 |
escape_duel |
13,979 | 33.7% | 1-16 | 从失败命令中恢复(同策略) |
escape_mini |
6,820 | 16.4% | 5-32 | 打破重复运行状态 |
finish_mini |
16,000 | 38.6% | 17-32 | 在32回合内坚持到提交 |
逃逸集(Escape Set)
特别值得关注的是escape_duel和escape_mini:
escape_duel:包含13,979行,其中73.7%来自第二阶段筛选拒绝的侧面,98.3%紧跟在失败观察之后,专门用于训练模型在困境中脱身escape_mini:从mini-coder数据集挖掘,包含6,820行恢复数据,是duel语料库的28倍,其中41.3%超过第16回合,覆盖了duel工件未能覆盖的后期窗口
本地评分器(无评判员的替代方案)
数据集中还包含一个基于梯度提升的本地评分模型,用于在没有LLM评判员的情况下评估轨迹质量:
- 逐问题准确率:0.771;AUC:0.849
- 逐侧得分相关性:皮尔逊相关系数0.727,平均绝对误差0.140
- 成对样本中选优准确率:70.0%
- 循环检测:与验证器自身的
loop_check完全一致 - 灾难性标志(得分<0.35):精确率0.820,召回率0.384
使用限制:单样本得分误差为0.207,需要至少500-1000个配对样本才能可靠区分0.025的差距;单样本分数和相近模型的排名不可信赖。
质量门控
- 源侧面需满足:得分≥0.85、非循环、重复命令比率≤0.45、最大命令运行≤3
- 训练回合必须包含恰好一个bash代码块,无未闭合的
<think>标记 - 训练回合中的命令不得重复
- 100%的训练回合通过分词验证,标签跨度能精确解码回助手内容
- 中位序列长度为7,798-9,110个标记,仅
escape_duel有2.0%超出32,768限制
覆盖目标
该数据集针对两类典型失败模式:
- 循环失败(10例中占5例):通过
escape_mini(6,820个,41%超过截止点)和escape_duel覆盖 - 32回合内无提交或无编辑(10例中占2例):通过
finish_mini(16,000个,含8,776个提交回合)覆盖




