The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
id: string
source: string
question: string
answer: string
candidate_answers: string
images: list<item: string>
child 0, item: string
meta: struct<category: string, data_source: string, lang: string, group: string, news_source: string, leve (... 124 chars omitted)
child 0, category: string
child 1, data_source: string
child 2, lang: string
child 3, group: string
child 4, news_source: string
child 5, level: string
child 6, mcq_options_dropped: bool
child 7, orig_letter: string
child 8, explanation: string
child 9, answer_fixed: bool
child 10, human_or_machine: int64
bucket: string
phase: string
task_type: string
priority: string
counts: struct<P0/fvqa_train/image_search: int64, P0/evobrowsecomp/text_search: int64, P1/livevqa_news_l2/im (... 59 chars omitted)
child 0, P0/fvqa_train/image_search: int64
child 1, P0/evobrowsecomp/text_search: int64
child 2, P1/livevqa_news_l2/image_search: int64
child 3, P2/chartqa_human/image_reasoning: int64
pilot_subset: struct<fvqa_train: int64, livevqa_news_l2: int64>
child 0, fvqa_train: int64
child 1, livevqa_news_l2: int64
selection: string
seed: int64
total: int64
to
{'total': Value('int64'), 'counts': {'P0/fvqa_train/image_search': Value('int64'), 'P0/evobrowsecomp/text_search': Value('int64'), 'P1/livevqa_news_l2/image_search': Value('int64'), 'P2/chartqa_human/image_reasoning': Value('int64')}, 'pilot_subset': {'fvqa_train': Value('int64'), 'livevqa_news_l2': Value('int64')}, 'seed': Value('int64'), 'selection': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
id: string
source: string
question: string
answer: string
candidate_answers: string
images: list<item: string>
child 0, item: string
meta: struct<category: string, data_source: string, lang: string, group: string, news_source: string, leve (... 124 chars omitted)
child 0, category: string
child 1, data_source: string
child 2, lang: string
child 3, group: string
child 4, news_source: string
child 5, level: string
child 6, mcq_options_dropped: bool
child 7, orig_letter: string
child 8, explanation: string
child 9, answer_fixed: bool
child 10, human_or_machine: int64
bucket: string
phase: string
task_type: string
priority: string
counts: struct<P0/fvqa_train/image_search: int64, P0/evobrowsecomp/text_search: int64, P1/livevqa_news_l2/im (... 59 chars omitted)
child 0, P0/fvqa_train/image_search: int64
child 1, P0/evobrowsecomp/text_search: int64
child 2, P1/livevqa_news_l2/image_search: int64
child 3, P2/chartqa_human/image_reasoning: int64
pilot_subset: struct<fvqa_train: int64, livevqa_news_l2: int64>
child 0, fvqa_train: int64
child 1, livevqa_news_l2: int64
selection: string
seed: int64
total: int64
to
{'total': Value('int64'), 'counts': {'P0/fvqa_train/image_search': Value('int64'), 'P0/evobrowsecomp/text_search': Value('int64'), 'P1/livevqa_news_l2/image_search': Value('int64'), 'P2/chartqa_human/image_reasoning': Value('int64')}, 'pilot_subset': {'fvqa_train': Value('int64'), 'livevqa_news_l2': Value('int64')}, 'seed': Value('int64'), 'selection': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
tir-distill-10k
10,000 questions selected for teacher-trajectory distillation (TIR Qwen3.5 data-augmentation plan), with the distillation script. Sources: FVQA train (mzhang1766/huawei_benchmark), LiveVQA-2025 news (ONE-Lab/LiveVQA-2025), EvoBrowseComp (Krystalan/EvoBrowseComp, CC-BY-NC-SA-4.0), ChartQA human split (HuggingFaceM4/ChartQA). Each source keeps its own license; check them before any redistribution or commercial use. Questions were deduplicated against SimpleVQA, FVQA test, GAIA validation and MMBrowseComp.
Files: phase_10k.jsonl (10,000), phase_10k_pilot.jsonl (1,600 subset), images.tar (extract to get images/ referenced by the jsonl), scripts/ (distillation), MANIFEST.json.
蒸馏数据交接说明:1 万题版本(handover_10k/)
日期:2026-10-12
配套方案:DATA_AUGMENTATION_PLAN_20261011.md 问题分析:BAD_CASE_ANALYSIS_20261011.md
精确条数以 MANIFEST.json 为准。
1. 交付内容
handover_10k/
phase_10k.jsonl 10,000 题,全部要蒸馏的题
phase_10k_pilot.jsonl 1,600 题,phase_10k 的子集,先跑这一批
images/<source>/... 题目图片,jsonl 里是相对路径
scripts/ 蒸馏脚本与运行命令
MANIFEST.json 各桶条数、抽样种子、筛选规则
每条记录:
{"id":"fvqa_train_12","source":"fvqa_train","bucket":"fvqa_train","priority":"P0","phase":"pilot","task_type":"image_search",
"question":"...","answer":"Mumbai","candidate_answers":"[]","images":["images/fvqa_train/fvqa_train_12.png"],
"meta":{"category":"search_required", ...}}
task_type 三种:image_search(带图、通常要检索)、text_search(纯文本、要多跳检索)、image_reasoning(带图、不检索、要逐步计算)。
2. 这 1 万题的组成与优先级
| 优先级 | 桶 | 题数 | task_type | 修的问题 |
|---|---|---|---|---|
| P0 | fvqa_train | 4,731 | image_search | 不主动搜索、答案粒度、答案太泛 → FVQA、SimpleVQA |
| P0 | evobrowsecomp(EN 400 + ZH 400) | 800 | text_search | GAIA 无图题(掉分最狠的一块);纯文本不写图像代码的反例 |
| P1 | livevqa_news_l2 | 3,469 | image_search | 补"证据不够→去搜"的轨迹量 |
| P2 | chartqa_human | 1,000 | image_reasoning | 思考被压短、图表计算出错 → SimpleVQA 推理类 |
跑的顺序:先 phase_10k_pilot.jsonl(FVQA 1,000 + LiveVQA 600),看 stats.json 里留存率和各过滤规则的丢弃数,确认 teacher 会主动搜索、轨迹能过过滤,再跑全部 1 万。 如果算力只够一部分,按 P0 → P1 → P2 的顺序跑。
预计产出:有效轨迹 5,000 至 6,500 条。其中 evobrowsecomp 题很难,teacher 答对率可能只有两三成,产出可能不到 200 条,这是已知缺口。
3. 题源与筛选规则(已在交付包里执行)
| 桶 | 来源 | 筛选 | 已对评测集去重 |
|---|---|---|---|
| fvqa_train | mzhang1766/huawei_benchmark FVQA train |
全部 | 图片 pHash ≤ 6 或长问题文本 Jaccard ≥ 0.8 即丢弃 |
| livevqa_news_l1 / l2 | ONE-Lab/LiveVQA-2025 新闻组 |
原数据是 A–E 选择题,已改成开放式答案;答案 2 至 60 字符;每篇文章最多 3 题 | 同上 |
| evobrowsecomp | Krystalan/EvoBrowseComp EN 400 + ZH 400 |
全部,已解密。许可证 CC-BY-NC-SA-4.0 | 纯文本 |
| chartqa_human | HuggingFaceM4/ChartQA train |
只取人工标注题,去掉 yes/no 题 | 同上 |
| tabmwp_numeric | JiaerX/TabMWP train |
只取数值答案题 | 同上 |
去重对象:SimpleVQA 2,025、FVQA test 1,800、GAIA validation 165、MMBrowseComp 224。实际丢弃 127 题:FVQA train 与 FVQA test 图片重复 25、长问题重复 99,与 SimpleVQA 图片重复 3。这四个集合是评测集,任何情况下不得进入训练。
4. 对 teacher 和生成环境的要求
| 项 | 要求 |
|---|---|
| Teacher | 带图任务用 Qwen3.5 大尺寸 VL(27B 或更大);text_search 可用 DSV4.1 或 Qwen3.5 |
| 工具 | search(query)、open(url)、python(code) 三个。协议与 scripts/infer_gaia_agent.py 一致:<tool_call>{"action":"search","query":"..."}</tool_call>、<code>...</code>、<answer>...</answer> |
| 不要预检索 | 控制器不要替模型先搜一次。第一次搜索必须由 teacher 自己发起,否则训练出来的模型仍然不会主动搜 |
| 采样 | temperature 1.0;每题先采 2 条,没有答对的再采到 8 条为止 |
| 系统提示 | 只用一个版本。声明三个工具;写明"题目没有图片时不要处理图像";写明"开放式问题直接给出实体、数字或短语,不要给选项字母";不要写"必须用 python 处理图像" |
| 沙箱 | 允许 PIL、numpy、pandas;禁止网络库 |
| 思考 | 保留 teacher 完整思考,不压缩 |
5. 轨迹过滤(生成后,按顺序,任一不过即丢弃)
| # | 规则 |
|---|---|
| F1 | 最终答案与 answer 一致。数字和短串用规则匹配(scripts/gaia_official_score.py 的 question_scorer);实体和短语用 GPT-4o judge(scripts/judge_fvqa_official.py 的 prompt),candidate_answers 里的任一项命中即算对 |
| F2 | 轨迹中打开或引用的 URL 不得匹配 huggingface.co/datasets、github.com/.*\.jsonl、GAIA_web、Who_and_When、openreview.net/attachment、scribd.com |
| F3 | image_search 和 text_search 样本必须含至少 1 次 teacher 自发的 search 或 open |
| F4 | text_search 样本不得含图像操作代码(PIL、cv2、.rotate(、.crop(、imshow) |
| F5 | 带图样本里的图像代码必须执行成功且后续文本引用了输出;否则删掉该代码轮次,删后答案链断裂则丢弃 |
| F6 | 开放题答案不是单个字母 |
| F7 | 连续两轮 assistant 文本相同即丢弃 |
| F9 | assistant 总输出 300 至 6,000 token |
6. pilot 验收指标
用 pilot 产出的有效轨迹训练 4B 一轮,在 GAIA validation 165 题上看两个行为指标,不看分数:
- 模型自发
search/open的题数 > 30(原始 Qwen3.5-4B 为 32)。 - 无图题中写图像代码的题数 < 3(当前微调版为 33)。
两个都达标再跑全部 1 万题。
7. 回传格式
ms-swift 多模态 JSONL:messages / images / tools。多轮工具返回写成 tool 角色消息。每条带 source、bucket、teacher、n_samples、judge_model、has_self_search、has_image_code 字段,便于按来源消融。
8. 脚本(scripts/)
| 文件 | 作用 |
|---|---|
distill_trajectories.py |
蒸馏主脚本(v3):请求里传 tools,直接读 teacher 返回的结构化 tool_calls;无预检索;每题 k 采样;F1 正确性判定(规则 + GPT-4o judge);F2–F9 过滤;导出 OpenAI/ms-swift 格式(assistant 带 tool_calls,工具返回 role: tool) |
convert_tir_to_native.py |
把现有 TIR 训练数据(<code> 文本协议)转成同样的结构化格式 |
run_distill_10k.sh |
pilot 与全量的运行命令,填 TEACHER_URL、TEACHER_MODEL、SERPER_API_KEY、JUDGE_API_KEY 后直接跑 |
infer_gaia_agent.py |
被复用的工具实现;同时是评测 harness,加 --native-tools 即用结构化工具调用评测学生模型 |
judge_fvqa_official.py |
被复用:GPT-4o judge 的 prompt(MMSearch-R1 Table 7) |
gaia_official_score.py |
被复用:数字和短串的规则匹配 |
运行方式:
cd handover
TEACHER_URL=http://<teacher-host>:8000/v1 TEACHER_MODEL=<served-name> \
SERPER_API_KEY=... JUDGE_API_KEY=... bash scripts/run_distill_10k.sh pilot # 然后 bash scripts/run_distill_10k.sh full
Teacher 用 vLLM 起服务时加 --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder,脚本从 reasoning_content 取思考、从 tool_calls 取工具调用。Python 依赖:openai、pypdf、pillow。
输出:
out/pilot/accepted.jsonl:通过全部过滤的轨迹,可直接训练。格式:assistantcontent为<think>…</think>\n\n<可见文本>,带tool_calls;工具返回role: tool;顶层tools为三个函数的 schema。ms-swift 直接读取(normalize_openai_tool_calls),--template qwen3_5。每条带source、bucket、task_type、teacher、n_samples、judge_model、has_self_search、has_image_code。out/pilot/trajectories_raw.jsonl:每一次采样的完整记录,含correct、filter_fails、accepted,用于分析留存率。out/pilot/stats.json:各过滤规则的丢弃计数、各桶的接受数。
--resume 可断点续跑。--text-protocol 只在 teacher 服务端没有 tool parser 时使用,不建议。
9. 2026-10-12 smoke test 后的修订(v2)
Qwen3.5-27B + Serper 跑 100 题(每桶 20,每题 1 次采样)的结果:21 题答对,13 条通过过滤。据此改了三处:
| 问题 | 现象 | 修订 |
|---|---|---|
| LiveVQA 参考答案拼接错误 | 原始 Ground_Truth_List 是 numpy 风格字符串,ast.literal_eval 把相邻字符串拼在一起,例如 Morgan WallenWallencountry singer Morgan Wallen |
重新解析,phase_10k.jsonl 里 1,238 条 LiveVQA 答案已修正,candidate_answers 同步修正,meta.answer_fixed=true |
<tool_call> 缺闭合标签 |
28/100 条轨迹的最后一轮是 <tool_call>{...} 没有 </tool_call>(服务端 tool parser 吃掉了),脚本判为无动作而中止;另有 {"action":"code"} + ```python 围栏的写法 |
解析器改为容错:接受无闭合标签的 JSON、围栏代码、action: code |
| 轮数用尽没有答案 | 24/100 条跑满 10 轮后直接结束,白费采样 | 用尽后强制要一个 <answer>,交给 judge 判;text_search 轮数上限改为 15(--max-turns-text) |
| F9 长度下限误杀 | ChartQA 17 条答对里 8 条因思考不足 300 token 被丢 | image_reasoning 下限改 100 token,其余 200 |
| 传输错误 | 11/100 超时或被供应商内容检查拦截 | 同一次采样失败后重试一次;--request-timeout 默认 900s |
smoke test 还确认了两件事:teacher 在没有预检索的情况下会主动搜索(FVQA 20 题发起 25 次搜索,LiveVQA 20 题 61 次);EvoBrowseComp 40 题 0 答对,纯文本检索题源需要另找。
10. v3:切到 Qwen3.5 原生工具调用格式(2026-10-12)
核实了 Qwen/Qwen3.5-4B 的 chat_template.jinja 和 ms-swift 4.5.3 的 qwen3_5 模板后,把工具调用从文本协议改成结构化字段:
| v2(文本协议) | v3(原生) | |
|---|---|---|
| 调用 | assistant 文本 <tool_call>{"action":"search","query":…}</tool_call> |
assistant tool_calls: [{"function":{"name":"search","arguments":"{\"query\":…}"}}],模板渲染成 <function=search><parameter=query>…</parameter></function> |
| 工具返回 | user 消息,前缀 Search result: |
role: tool,模板渲染成 <tool_response> |
| teacher 调用 | 不传 tools,文本解析 |
传 tools,读 tool_calls;文本解析只做兜底 |
历史轮 <think> |
官方模板会丢掉(工具返回被当成新提问) | 每轮保留 |
现有 26k 条数据用 convert_tir_to_native.py 转换后再和新数据合并训练。学生模型评测用 infer_gaia_agent.py --native-tools,vLLM 加 --enable-auto-tool-choice --tool-call-parser qwen3_coder。
10.1 配套约定(v3)
- 沙箱里的图片:统一提示写明,输入图片在工作目录保存为
input_image.jpg(第一张,兼容现有 codedance 数据)和image_1.png、image_2.png…;IMAGE_PATH指向第一张,image_1、image_2… 是预加载的 PIL 对象。蒸馏脚本和评测 harness(--native-tools)都按这个约定放文件并在每个代码单元前注入 prelude。现有数据里IMAGE_PATH(1,784 行)和input_image.jpg(7,989 行)两种写法都能直接运行。 - 现有数据转换结果:
convert_tir_to_native.py处理 26,515 行:13,828 行含代码的已转为tool_calls+tool;24,508 行系统提示替换为统一版本(python-only 变体);2,007 行因最后一条消息是没有结果也没有答案的代码调用被丢弃(原数据缺陷,这类样本教模型"写完代码就停")。 - 密钥:放在
handover_10k/.env(SERPER_API_KEY=…、JUDGE_API_KEY=…、TEACHER_API_KEY=…),脚本和run_distill_10k.sh会自动读取;.env已在.gitignore,不要提交、不要写进脚本。 - 已验证:用 ms-swift 4.5.3 的
qwen3_5模板对一条蒸馏样本和一条转换后的旧样本做 encode:渲染结果与官方chat_template.jinja一致(唯一差异是<image>后的换行,导出已改为不加换行);每轮 assistant 的<think>和<tool_call>都在 loss 里,<tool_response>(含工具产生的图片)不计 loss。
11. 四项保证的落实方式(2026-10-12)
| 要求 | 脚本里的保证 | 训练前的审核(scripts/check_distilled.py) |
|---|---|---|
| CoT 完整 | 每轮都取 reasoning_content,导出为每个 assistant 消息的 <think>…</think>;F10:任一轮 think 少于 20 字符即丢弃 |
检查 1:每个 assistant 轮有非空 <think>,最后一轮有 <answer>,不以工具调用结尾 |
| 匹配训练格式和模型原生格式 | 结构化 tool_calls + role: tool,由模板渲染成 Qwen3.5 post-training 的 <function=…> / <tool_response>;历史轮 think 嵌在 content 里,任何服务端都一致 |
检查 2:角色序列、调用与返回配对、参数 JSON、<image> 数量、tools 字段;检查 6:用官方 chat_template.jinja 实际渲染,确认无报错、每轮 think 都在渲染结果里 |
| 不截断 | F8:teacher finish_reason=length 立即停止并丢弃;工具输出超过 --max-obs-chars 时截断并加 [tool output truncated] 标记;F11:整条序列(system+图片+各轮+工具返回)粗估超过 --max-seq-tokens(默认 24k)即丢弃;stats.json 记录 max_tokens 等配置 |
检查 3:无截断标记、无未闭合的 <think>/<tool_call>/<answer>、精确 token 数不超过训练 max_length |
| 对测试结果有改善 | 数据只覆盖 bad case 对应的行为:F3 检索类必须自发搜索、F4 无图不写图像代码、F6 不答字母、F9 思考长度在 100/200–6000 token;stats.json 的 behaviour 按桶给出自发搜索率、搜索次数、think 长度、字母答案数 |
检查 4:检索类自发搜索率 100%、平均搜索 ≥ 1、无图题图像代码 0、字母答案 0、think 中位数 ≥ 500 字符、答案 ≤ 60 字符占比 ≥ 95%;检查 5:与四个评测集无题目重叠 |
"有改善"只能由训练后的评测证明。审核脚本保证的是数据朝着 bad case 的反方向,最终以方案第 8 节的小规模训练 + GAIA 165 行为指标为准。
审核命令(训练前必跑,退出码非 0 不进训练):
python scripts/check_distilled.py --in out/full/accepted.jsonl --img-root . \
--template-dir <Qwen3.5-4B tokenizer 目录> --eval-index <eval_text_index.json> --report out/full/audit.json
对转换后的旧数据(thinking_clean_native.jsonl)跑同一审核的结果:17,828 行没有 think、9,085 行答案是单字母、自发搜索 0。旧数据必须按方案第 5 节处理(字母改选项文本、无 think 的行丢弃或让 teacher 补 think)后再合并,否则它会把新数据的效果压掉。
12. v3.2:搜索成本控制(2026-10-14)
full5k 运行(1,434 题,790 条合格)用掉 43,339 次 Serper 请求后额度耗尽。约 95% 的搜索花在最终被丢弃的采样上:合格题平均 10.4 次,答错的题 50.6 次,没给出答案的题 74 次;单题最高 172 次(evobc_ZH_31)。v3.2 加了以下控制:
| 控制 | 参数(默认值) | 作用 |
|---|---|---|
| 每题采样上限 | --k-max 4、--k-max-text 3(原 8) |
已知合格轨迹约 85% 在前 4 次采样内出现 |
| 单条轨迹搜索上限 | --max-search-per-traj 8、--max-search-per-traj-text 20 |
到上限后强制作答,交给 judge |
| 单题计费搜索上限 | --max-search-per-question 24、--max-search-per-question-text 50 |
跨所有采样累计,用完即停止这道题 |
| 单轮并发调用上限 | --max-calls-per-turn 3 |
只保留并执行前 3 个调用,训练数据里也只保留这 3 个 |
| 两次无答案即放弃 | 固定 | 同一题连续 2 次采样都没给出答案就停止 |
| 搜索缓存 | out/*/search_cache.jsonl |
同一查询(归一化后)只计费一次,跨采样、跨重跑复用 |
| 全局限速 | --serper-qps 8 |
账户上限 10 QPS |
| 额度耗尽即停 | 自动 | 收到 Not enough credits 后不再开始新采样;未完成的题不写入记录,退出码 2;充值后原命令 --resume 只补跑这些题 |
| 传输错误不占采样 | 自动 | teacher 接口 429、超时最多重试 5 次(指数退避),不计入 k |
| 合格行去重 | 自动 | 一道题只写一条合格轨迹(full5k 里 livevqa_0_20250513131530612901_l2_0 出现了两条) |
stats.json 新增:search.requests(实际计费)、search.cache_hits、search_used、deferred、stopped_question_budget、stopped_no_answer,以及完整的预算配置。
按 full5k 的分布估算,新上限会把搜索量降到约一半(每条合格轨迹从约 55 次降到约 30 次),合格轨迹减少约 10%(原本在第 5 到 8 次采样才通过的那部分)。这是估算,以下一次运行的 stats.json 为准。
- Downloads last month
- 264