跳转到内容

三模型历史实验结果 · 续 4

#### qwen3vl-4b-thinking
模板 SHA256:`36e042fe45641f067b1f2381fcc8955d10d956a3ed333ecdf7f7eb0916f68956`;模型配置 SHA256:`edac7703329133edfc53e46ac0081835144c99d7eebf28b71c732694d435224d`。
```json
{
"no_plan_choice": "<|im_start|>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>The following image is the CURRENT observation.\nWhich action should the snake take next?\nOptions:\nA. Turn left\nB. Go straight\nC. Turn right\nChoose the best option. Reply with exactly its uppercase letter.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n",
"answer_suffix": "<|im_start|>assistant\n<think>\n\n</think>\n\n",
"boxed_prefill_ids": [
59,
79075,
90
],
"answer_token_ids": {
"yes": 9693,
"no": 2152,
"A": 32,
"B": 33,
"C": 34,
"D": 35,
"E": 36,
"F": 37,
"G": 38,
"H": 39,
"I": 40,
"J": 41,
"K": 42,
"L": 43,
"M": 44,
"N": 45,
"O": 46,
"P": 47,
"Q": 48,
"R": 49,
"S": 50,
"T": 51,
"U": 52,
"V": 53,
"W": 54,
"X": 55,
"Y": 56,
"Z": 57
}
}

模板 SHA256:55572b8d3c8342044e25874c73fe5234b661fa0a57a57f6ef75b58e03d7d959a;模型配置 SHA256:33b10c02df3c2e8536cf323d29d53262aaa2f4d11dbe19bc729373fbe90295d4。

{
"no_plan_choice": "<bos><|turn>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<turn|>\n<|turn>user\n\n\n<|image|>\n\nThe following image is the CURRENT observation.\nWhich action should the snake take next?\nOptions:\nA. Turn left\nB. Go straight\nC. Turn right\nChoose the best option. Reply with exactly its uppercase letter.<turn|>\n<|turn>model\n<|channel>thought\n<channel|>",
"answer_suffix": "<|turn>model\n<|channel>thought\n<channel|>",
"boxed_prefill_ids": [
236785,
57296,
236782
],
"answer_token_ids": {
"yes": 4443,
"no": 1904,
"A": 236776,
"B": 236799,
"C": 236780,
"D": 236796,
"E": 236788,
"F": 236811,
"G": 236823,
"H": 236814,
"I": 236777,
"J": 236863,
"K": 236855,
"L": 236798,
"M": 236792,
"N": 236797,
"O": 236806,
"P": 236791,
"Q": 236935,
"R": 236794,
"S": 236773,
"T": 236774,
"U": 236836,
"V": 236847,
"W": 236824,
"X": 236917,
"Y": 236874,
"Z": 236953
}
}

模型在评分时都使用已关闭思考的回答边界:Qwen 是 <|im_start|>assistant\n<think>\n\n</think>\n\n,Gemma 是 <|turn>model\n<|channel>thought\n<channel|>。这里不是先让模型采样生成一段思考。boxed 字符串的编码与该边界必须可直接拼接;每个答案还必须保持单 token。历史 Qwen 的 T 会与左花括号合并,因此字母候选到 A–S 为止;不通过静默重分词扩大支持范围。

带思考规划指令:

Develop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. After your reasoning, summarize the whole-game strategy in a concise plan. This summary limits the length of your explanation, not the number of game steps it covers.

直接规划指令:

Develop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. Return only a concise whole-game plan, without a reasoning transcript. This summary limits the length of your explanation, not the number of game steps it covers.

共享规划后,每条当前观测的评分正文前必须加以下原文(末尾恰有一个换行):

"The earlier image was only an illustration of the game's appearance, not the current state. Apply the whole-game strategy to the latest screenshot; do not follow a fixed route or target from the illustration.\n"

规划用户文本构造为 state + "\n" + request;本次 standard 的 state 为空,因此 request 前保留一个换行。规划只看独立外观示例图。下面是三模型真实模板渲染后的两种初始规划输入:

{
"True": "<|im_start|>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. After your reasoning, summarize the whole-game strategy in a concise plan. This summary limits the length of your explanation, not the number of game steps it covers.<|im_end|>\n<|im_start|>assistant\n<think>\n",
"False": "<|im_start|>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. Return only a concise whole-game plan, without a reasoning transcript. This summary limits the length of your explanation, not the number of game steps it covers.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
}
{
"True": "<|im_start|>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. After your reasoning, summarize the whole-game strategy in a concise plan. This summary limits the length of your explanation, not the number of game steps it covers.<|im_end|>\n<|im_start|>assistant\n<think>\n",
"False": "<|im_start|>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. Return only a concise whole-game plan, without a reasoning transcript. This summary limits the length of your explanation, not the number of game steps it covers.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
}
{
"True": "<bos><|turn>system\n<|think|>Play Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<turn|>\n<|turn>user\n\n\n<|image|>\n\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. After your reasoning, summarize the whole-game strategy in a concise plan. This summary limits the length of your explanation, not the number of game steps it covers.<turn|>\n<|turn>model\n<|channel>thought\n",
"False": "<bos><|turn>system\nPlay Snake on a 10 by 10 board. The blue head has a white arrow showing its direction; green cells are the body and the red circle is food. Each action moves one cell. Left and right turn relative to the current heading; straight keeps the heading. Eating food grows the snake. Hitting a wall or the body ends the game; the tail vacates its cell on a non-eating move. Maximize food and survival. Use the CURRENT screenshot to adapt any earlier plan.<turn|>\n<|turn>user\n\n\n<|image|>\n\nDevelop a reusable strategy for playing an entire game of Snake, from the opening until the game ends. The attached image illustrates only the game's visual appearance and symbols. It is not the current game state and must not determine a fixed route, target location, or opening action. Your strategy must remain applicable as the snake moves and grows and new food appears. Describe how to interpret each latest screenshot, apply turns relative to the current heading, avoid collisions and repetitive loops, and pursue food while preserving room to move. Return only a concise whole-game plan, without a reasoning transcript. This summary limits the length of your explanation, not the number of game steps it covers.<turn|>\n<|turn>model\n<|channel>thought\n<channel|>"
}

设 I 为初始规划输入 token,T 为原始 thinking_ids,C 为 closing_ids,S 为 separator_ids,P 为 plan_ids,+ 表示 token 列表拼接。P 和 T 始终保留原始 token,不能先解码再编码。

条件当前观测前的 token 前缀图片顺序
no_plan无规划对话,按 D.3 新建 system/user/assistant 输入当前截图
shared_fullI + T + C + S + P示例图、当前截图
shared_plan_only同一份带思考规划的 I + encode(empty_thought_close) + P示例图、当前截图
shared_no_think独立直接计划的 I + P;不再插入思考关闭标记示例图、当前截图

Qwen 的 empty_thought_close = "\n</think>\n\n"、S = encode("\n\n");Gemma 的 empty_thought_close = "<channel|>"、S 为空。生成已带思考终止 token 时 C 为空;已由停止原因确认终止或预算强制闭合但 token 未保留时,将关闭 token 放入 C。原始 T 若包含终止 token,保持不变。

向上述规划前缀追加新一轮 user 与 assistant 的精确字符串如下;question_text 是 readout_context + D.2 正文。close 在前缀最后一个 token 已属于该模型 stop_ids 时为 "\n",否则为 end_turn + "\n"。

Qwen: close + "<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>" + question_text + "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
Gemma: close + "<|turn>user\n\n\n<|image|>\n\n" + question_text + "<turn|>\n<|turn>model\n<|channel>thought\n<channel|>"

Qwen 的 end_turn 是 <|im_end|>;Gemma 是 <turn|>,stop_ids 同时包含 tokenizer 的 EOS(如不同)。boxed 方法在以上 assistant 后缀末尾再追加 encode("\\boxed{")。图像处理器随后只展开图像占位 token,并按图片列表顺序生成特征,不重新编码规划文本。

choice 对完整词表的字母原始 log-prob 做候选内 softmax;所有 yes/no 方法先算每候选 q = P(yes)/(P(yes)+P(no)),再算 q/sum(q)。采用数值稳定的对数实现,不限制输出词表、不加 logit bias 或采样惩罚。并列仍取输入次序的首个最大值。naive 结果不记录未向模型展示的字母。

随文 historical-prompts.json 保存以上原文、全部动作输入、真实 Jinja 模板和 token ID,便于逐字核验;理解或重建正文无需读当前运行实现。历史六方法命令(第 7.2 节)只能使用上述历史 commit 或原始冻结快照执行。当前代码只运行两个新方法,历史结果与图表不改名、不重写。

本次接口迁移另做无模型权重加载的验证:三个真实 tokenizer/图像处理器、四条件、九类感知题正反排列与动作六排列,两种保留方法共 576 组调用;新旧 token IDs、图片顺序逐项完全一致。验证使用旧实验保存的 seed 0 规划,未重新生成规划或评分。历史九个模型运行的离线指标与 boxed 差值重新汇总后保持不变。该检查证明输入构造迁移一致,不声称不同后端的浮点数值逐位相同。