Newshot

编辑 LLM 输出层的一行以阻止其过度思考

Translation(model translation, not the source's own text)

row lets the model's own hidden state decide when its thinking is done. Tested on Qwen3.5-4B and on DeepSeek V4.1 Flash (763B, running on a laptop)."

→ 一个折入 </think> 行的线性探针,让模型自身的隐藏状态来决定思考何时结束。在 Qwen3.5-4B 和 DeepSeek V4.1 Flash(763B,在笔记本上运行)上测试过。

Wait, "folded into" - 折入/并入. Fine.

Then bullets.

Bullet 1: "I changed one row of the output layer: the row that produces the </think> token. Its logit now also reads a linear probe that fires when the hidden state looks like "the answer is settled, I'm only re-checking". No training, no gradients, no engine or harness change, zero runtime cost. Because only one logit changes, the edited model's behaviour can be computed exactly offline."

→ 我改动了输出层的一行:产生 </think> token 的那一行。它的 logit 现在还会读取一个线性探针,当隐藏状态看起来像“答案已经确定,我只是在复查”时,这个探针就会触发。没有训练,没有梯度,没有改动引擎或 harness,零运行时开销。因为只有一个 logit 改变,编辑后模型的行为可以完全离线精确计算。

Bullet 2: "Qwen3.5-4B (stock llama.cpp): on held-out MATH-500 problems, same accuracy with 54% fewer tokens (60% less thinking). At a 32k budget it solved 2 of 3 AIME 2025 problems on which the unedited model ran out of budget while re-checking an answer it already had. The live model matches the offline prediction to within 0.01 in probability. GGUF on Hugging Face."

→ Qwen3.5-4B(原版 llama.cpp):在留出的 MATH-500 题目上,准确率相同,token 少 54%(思考少 60%)。在 32k 预算下,它解出了 3 道 AIME 2025 题目中的 2 道,而未编辑的模型在复查一个它已经得到的答案时耗尽了预算。实际运行的模型与离线预测的概率误差在 0.01 以内。GGUF 已发布在 Hugging Face。

Bullet 3: "DeepSeek V4.1 Flash (763B MoE, 2-bit, streamed from SSD on an 8 GB laptop GPU): maths 7/7 vs 6/7 at max effort with 40% fewer tokens, including the hardest problem, which max and low effort both left unanswered. On an agentic website task: 84% less thinking and the highest blind rating of four settings (9.5/10 vs 8.2)."

→ DeepSeek V4.1 Flash(763B MoE,2-bit,在 8 GB 笔记本 GPU 上从 SSD 流式加载):数学 7/7 对 6/7(最大努力),token 少 40%,其中包括最难的那道题,而最大努力和低努力都未能解出。在一个代理式建站任务上:思考少 84%,盲评得分是四种设置中最高的(9.5/10 对 8.2)。

Bullet 4: "It is not "low effort": it skips thinking after routine tool results (P ≈ 0.95) and still thinks after errors or new information (P(skip) ≤ 0.004)."

→ 它不是“低努力”:在常规工具返回结果之后它会跳过思考(P ≈ 0.95),而在出错或出现新信息之后仍然会思考(P(skip) ≤ 0.004)。

Table: preserve structure, translate cells. Note the table has some malformed rows (row with "AIME 2025..." having only 4 cells while header has 5, etc.). Must keep original exactly as-is structure — I should keep the same number of pipes as original. Rule says preserve table rows and separator rows as-is, only translate cell text. I'll keep the same number of columns as the original row.

Header: | Model | Benchmark | Original | With the one-row edit | Change | → | 模型 | 基准 | 原始 | 单行编辑后 | 变化 |

Row 1: | Qwen3.5-4B stock llama.cpp | MATH-500, 8 held-out problems | 8/8 · 34,955 tokens | 8/8 · 16,080 tokens | −54% tokens | → | Qwen3.5-4B 原版 llama.cpp | MATH-500,8 道留出题 | 8/8 · 34,955 tokens | 8/8 · 16,080 tokens | −54% tokens |

Row 2: | AIME 2025, 3 problems (32k budget) | 0/3 (out of budget) | 2/3 | +2 solved | | → | AIME 2025,3 道题(32k 预算) | 0/3(超出预算) | 2/3 | +2 solved | |

Row 3: | DeepSeek V4.1 Flash 763B, 2-bit, on a laptop | Maths, 7 problems, max effort | 6/7 · 41,559 tokens a | 7/7 · 25,112 tokens a | +1 solved, −40% tokens | → | DeepSeek V4.1 Flash 763B,2-bit,笔记本电脑 | 数学,7 道题,最大努力 | 6/7 · 41,559 tokens a | 7/7 · 25,112 tokens a | +1 solved,−40% tokens |

Row 4: | Agent: build a website (blind rating /10) | 8.2 · 13,106 thinking | 9.5 · 2,062 thinking | −84% thinking | | → | Agent:建一个网站(盲评 /10) | 8.2 · 13,106 thinking | 9.5 · 2,062 thinking | −84% thinking | |

Row 5: | Agent: puzzle + bug fix (2 tasks) | both right · 3,099 thinking | both right · 220 thinking | −93% thinking | | → | Agent:谜题 + bug 修复(2 个任务) | both right · 3,099 thinking | both right · 220 thinking | −93% thinking | |

Row 6: | Agent: data analysis, never seen b | 4/6 findings · 10,160 thinking | 4.5/6 findings · 4,693 thinking | −54% thinking | | → | Agent:数据分析,从未见过 b | 4/6 findings · 10,160 thinking | 4.5/6 findings · 4,693 thinking | −54% thinking | |

Hmm "findings" — 发现. Should I translate? It's a metric name. I'll translate "4/6 findings" → "4/6 个发现"? Better keep unit consistency: "4/6 发现 · 10,160 thinking". Hmm. I'll translate: 4/6 发现. Actually "thinking" is a metric (thinking tokens). I could translate to "thinking" kept as-is since it's a term. Let me keep "thinking" and "tokens" as-is since they're technical terms commonly used. Keep "findings" as "发现".

Hmm, consistency. I'll translate findings → 发现, keep thinking and tokens.

Row 7: | Still thinks after errors / new info | P(skip) 0.000 | P(skip) ≤ 0.004 | still thinks | | → | 出错 / 新信息之后仍会思考 | P(skip) 0.000 | P(skip) ≤ 0.004 | 仍会思考 | |

Then list of section links:

  • Experiment 1: Qwen3.5-4B

→ - 实验 1:Qwen3.5-4B etc.

  • Experiment 2: DeepSeek V4.1 Flash (763B)
  • Isn't this just low effort?
  • Method in detail
  • Ablations and dead ends
  • How it started

→ - 实验 2:DeepSeek V4.1 Flash (763B)

  • 这不就是低努力吗?
  • 方法详解
  • 消融与死胡同
  • 它是怎么开始的

Note original used blank lines between these list items (they're separated by blank lines). Actually in the input they appear as separate lines with blank lines between? Let me re-read:


        - Experiment 1: Qwen3.5-4B

- Experiment 2: DeepSeek V4.1 Flash (763B)

- Isn't this just low effort?
      

Yes, blank lines between. Should I preserve? Rule 2 says paragraph structure must match. These are list items separated by blank lines. Hmm, preserving blank lines between them is safest — keep blank lines. Actually that would look odd but it preserves structure. I'll keep them with blank lines? The original has blank lines. I'll preserve them as blank-line-separated items... That may look weird but rule says keep original structure. I'll keep the blank lines.

Hmm, actually it's probably safer to keep exactly the line/blank structure. I'll keep blank lines.

Then "## The idea" → "## 思路"

Paragraph: "A reasoning model ends its thinking by emitting one token, </think>. Like every token, its logit is a dot product of that token's row of the output layer (the "head") with the final normalized hidden state h. So adding a vector to that single row adds a linear readout of h to one decision, the decision to stop:"

→ 一个推理模型通过输出一个 token 来结束思考,即 </think>。和每个 token 一样,它的 logit 是输出层(“head”)中该 token 那一行与最终归一化隐藏状态 h 的点积。所以给那一行加上一个向量,就等于给一个决策——停止的决策——加上对 h 的线性读出:

Then a formula line "g is a linear probe that..." — wait, the formula itself seems missing/omitted in the source ("the decision to stop:" then blank then "g is a linear probe..."). So we just translate.

"g is a linear probe that separates two kinds of positions in the model's own thinking: paragraph ends after the right answer has already appeared (the model is only re-checking), and everything else (still solving, or mid-sentence). β sets how hard the edit pushes. The row is re-quantized into the file's own format and shipped as an ordinary weights file. The engine, chat template and agent harness are untouched, and the model costs exactly as much to run as before."

→ g 是一个线性探针,用来区分模型自身思考中的两类位置:正确答案已经出现之后的段落结尾(模型只是在复查),以及其他所有情况(仍在求解,或句子中途)。β 决定这次编辑的推动力度。这一行会被重新量化成文件自身的格式,并作为一个普通的权重文件发布。引擎、聊天模板和 agent harness 都没有改动,模型的运行开销与之前完全相同。

"Two properties make this unusually easy to reason about:" → 有两个特性让它异常容易推理:

"1. The edited stop probability is exact. Only ℓclose changes, so with o the base model's log-odds of </think> at a position,"

→ 1. 编辑后的停止概率是精确的。只有 ℓclose 发生变化,因此,若 o 是基础模型在某个位置上对 </think> 的 log-odds,

Then: "Given recorded hidden states, the edited model's stop probability at every position of every trace is a closed-form function of β. No generation is needed to tune it."

→ 给定记录下来的隐藏状态,编辑后模型在每条轨迹每个位置上的停止概率都是 β 的闭式函数。调参不需要生成。

Note "ℓclose" — keep as-is. "log-odds" → "对数几率" or keep "log-odds". I'll use "对数几率(log-odds)"? Rule says unclear terms keep original. "log-odds" is standard; I'll translate as "对数几率". Fine.

Also "</think>" token — keep.

Now, the paragraph after "the decision to stop:" — there's a colon and then presumably a formula. Then "g is a linear probe..." starts a new paragraph. In input they're separated by blank lines? Let me check input:

"...adds a linear readout of h to one decision, the decision to stop:

g is a linear probe that separates..."

Yes blank line. Keep.

Output format: no preamble, no code fence.

Let me also handle "harness" — keep as "harness" per rule 9 maybe. I'll keep "harness" in latin with spaces. Actually I used "harness" untranslated. Fine.

"agent" — 代理/agent. I'll use "agent" kept? The article uses "agentic", "agent harness". I'll use "agent" as-is and "代理式" for agentic. Hmm, mixed. Let me use "agentic website task" → "agent 式的建站任务". Consistent enough.

Let me finalize.</think># 编辑 LLM 输出层的一行,让它不再过度思考

一个折入 </think> 行的线性探针,让模型自身的隐藏状态来决定思考何时结束。在 Qwen3.5-4B 和 DeepSeek V4.1 Flash(763B,在笔记本上运行)上做过测试。

  • 我改动了输出层的一行:产生 </think> token 的那一行。它的 logit 现在还会读取一个线性探针,当隐藏状态看起来像“答案已经确定,我只是在复查”时,这个探针就会触发。没有训练,没有梯度,没有改动引擎或 harness,零运行时开销。因为只有一个 logit 改变,编辑后模型的行为可以完全离线精确计算。
  • Qwen3.5-4B(原版 llama.cpp):在留出的 MATH-500 题目上,准确率相同,token 少 54%(思考少 60%)。在 32k 预算下,它解出了 3 道 AIME 2025 题目中的 2 道,而未编辑的模型在复查一个它已经得到的答案时耗尽了预算。实际运行的模型与离线预测的概率误差在 0.01 以内。GGUF 已发布在 Hugging Face。
  • DeepSeek V4.1 Flash(763B MoE,2-bit,在 8 GB 笔记本 GPU 上从 SSD 流式加载):数学 7/7 对 6/7(最大努力),token 少 40%,其中包括最难的那道题,而最大努力和低努力都未能解出。在一个 agent 式建站任务上:思考少 84%,盲评得分是四种设置中最高的(9.5/10 对 8.2)。
  • 它不是“低努力”:在常规工具返回结果之后它会跳过思考(P ≈ 0.95),而在出错或出现新信息之后仍然会思考(P(skip) ≤ 0.004)。
模型基准原始单行编辑后变化
Qwen3.5-4B 原版 llama.cppMATH-500,8 道留出题8/8 · 34,955 tokens8/8 · 16,080 tokens−54% tokens
AIME 2025,3 道题(32k 预算)0/3(超出预算)2/3+2 solved
DeepSeek V4.1 Flash 763B,2-bit,笔记本电脑数学,7 道题,最大努力6/7 · 41,559 tokens a7/7 · 25,112 tokens a+1 solved,−40% tokens
Agent:建一个网站(盲评 /10)8.2 · 13,106 thinking9.5 · 2,062 thinking−84% thinking
Agent:谜题 + bug 修复(2 个任务)both right · 3,099 thinkingboth right · 220 thinking−93% thinking
Agent:数据分析,从未见过 b4/6 发现 · 10,160 thinking4.5/6 发现 · 4,693 thinking−54% thinking
出错 / 新信息之后仍会思考P(skip) 0.000P(skip) ≤ 0.004仍会思考
  • 实验 1:Qwen3.5-4B
  • 实验 2:DeepSeek V4.1 Flash (763B)
  • 这不就是低努力吗?
  • 方法详解
  • 消融与死胡同
  • 它是怎么开始的

思路

一个推理模型通过输出一个 token 来结束思考,即 </think>。和每个 token 一样,它的 logit 是输出层(“head”)中该 token 那一行与最终归一化隐藏状态 h 的点积。所以给那一行加上一个向量,就等于给一个决策——停止的决策——加上对 h 的线性读出:

g 是一个线性探针,用来区分模型自身思考中的两类位置:正确答案已经出现之后的段落结尾(模型只是在复查),以及其他所有情况(仍在求解,或句子中途)。β 决定这次编辑的推动力度。这一行会被重新量化成文件自身的格式,并作为一个普通的权重文件发布。引擎、聊天模板和 agent harness 都没有改动,模型的运行开销与之前完全相同。

有两个特性让它异常容易推理:

  1. 编辑后的停止概率是精确的。只有 ℓclose 发生变化,因此,若 o 是基础模型在某个位置上对 </think> 的对数几率,

给定记录下来的隐藏状态,编辑后模型在每条轨迹每个位置上的停止概率都是 β 的闭式函数。调参不需要生成。

" keep. Need not translate β. Table separator unchanged. Need preserve bullet list hyphens and blank lines? Original has bullet list with blank lines between bullets. We can keep. Need not add. Ensure no third language. Chinese with technical terms English. Need output only. Need maybe translation of "re-checking" as 复查/复检. "overthinking" title not included? Title given but body not title? User says 文章标题 and 正文. Need translate正文 only, not title? Task says 把给定正文. Should not include title? Output should translate body only. But original includes heading? There is "正文:" then body. We should not include "文章标题" or title. Output body only. Need preserve "## Experiment 1: Qwen3.5-4B" as "## 实验 1:Qwen3.5-4B". Good.

Need translate accurately.

Let's craft.

First paragraph:

  1. 在其他所有 token 上,分布保持不变,条件是不停止。对于任意 j ≠ close,P′(j | not close) = P(j | not close)。因此,从原始模型采样得到的一条轨迹,在编辑使其停止之前,也同样是编辑后模型的一条有效样本,而该停止的概率恰好为 1 − Πt(1 − p′t)。这正是图 1 所绘制的,也是我(下文)搜索有害的提前停止的方式。

Need "token's distribution" maybe "每个其他 token 的分布". "conditional on not stopping" "以不停止为条件". "valid sample from edited model up to point". Good.

Heading Experiment 1.

Bullets:

  • 模型:Qwen3.5-4B(混合 Gated-DeltaNet/attention,词表 248,320,隐藏维度 2,560),Q8_0 GGUF,完全运行在 RTX 4060 Laptop(8 GB)上。

Need "hybrid Gated-DeltaNet/attention" maybe keep Gated-DeltaNet/attention English. "vocab" translate 词表. "hidden size" 隐藏维度. "fully on" 完全在...上运行.

  • 引擎:上游 llama.cpp,未修改。通过模型自身的 chat template 开启思考模式;temperature 0.6,top-p 0.95,top-k 20;每个问题固定 seed。

Need "chat template" keep? Could translate 聊天模板 but product/config term. Rule code/config keep. "chat template" is term; keep chat template. "seed" keep? "固定 seed" okay. "thinking mode" 思考模式.

  • 拟合数据:模型自身在 24 个 MATH-500 问题(难度 3–5)上的思考,上限 12k token。22 条轨迹可用(思考中出现正确答案),包含答案首次出现后 146k token 的复查:每个问题约 6,600。

Need "levels 3–5" 难度等级 3–5. "12k-token cap" 12k token 上限. "re-checking" 复查. Good.

  • 留出:下文结果中的每个问题;没有用于拟合或选择 β。

"held out" 留出. Good.

  • 编辑:β = 14(与 DeepSeek 上相同的值)。Qwen3.5-4B 将其 head 与输入 embedding 绑定,因此编辑后的 GGUF 增加了一个单独的 output.weight:embedding 矩阵中有一行被更改,Q8_0。llama.cpp 会自动加载未绑定的 head。

Need "ties its head to input embedding" 将 head 与输入 embedding 绑定/共享. "untied head" 未绑定 head. Keep output.weight. "one row changed". Good.

  • 成本:生成拟合轨迹约 30 分钟,捕获隐藏状态 2 分钟,拟合和 β 模拟约 7 分钟(主要是每个位置对 248k logits 做 log-sum-exp)。没有 GPU 训练。

Good.

Heading "## Choosing β on held-out traces" -> "## 在留出轨迹上选择 β"

Paragraph: 我把 22 条轨迹分成两半,在一半上拟合,在另一半上精确模拟,然后交换。“P(stop before answer)”是编辑后的模型在正确答案首次出现之前结束思考的概率,这几乎肯定意味着答案错误或缺失。“Re-checking kept”是答案后思考中预期保留下来的比例。 Need use Chinese quotes? Original uses English quotes. Rule? keep quotes? We can use Chinese quotation marks. But terms quoted maybe keep exact? "P(stop before answer)" should keep? It's a metric label. Could keep English in quotes? Since translation of label? Rule专业术语保留原文 if uncertain. But table header has "P(stop before answer): mean" etc. Need translate table headers? It says table cells translate. But these are labels, maybe translate to Chinese? Need not keep English? For clarity maybe table header: "β | 答案前停止概率 P(stop before answer):均值 | 最差轨迹 | 保留的复查". This mixes. Accept. But maybe labels in quotes should remain? Hard. Need full Chinese. We can translate descriptors but keep variable names. In paragraph: “答案前停止概率”是... Could include English parenthetical? That adds? Original has English label; translation can be Chinese label without parenthetical? But it is a quoted label. We can translate quoted label: “在答案前停止的概率”。 That is fine. But table header uses same; translate. However "Re-checking kept" -> “保留的复查”。 Good.

Need table:

β在答案前停止的概率:均值最差轨迹保留的复查
0(原始)0.0000.00097–99%

... Need preserve separator. Good.

After table: Range... "范围是两个留出半集(各 11 条轨迹)。“Re-checking kept”是在这些 12k 上限轨迹的长尾上测量的;在完整运行中节省更大,因为模型会提前结束,而不是一直复查到预算耗尽。" Need "12k-capped traces" = 受 12k 上限限制的轨迹. "long tails" 长尾. Good.

Trade-off paragraph: "这种权衡一直到 β ≈ 14 都很平滑,之后急剧转变:在 16–20 时,编辑开始会在答案出现之前停止。14 是最后一个看起来安全的点,而且它恰好是我已经在 DeepSeek 上使用过的值,所以我保留它,而不是按模型调参。" Good.

Heading "## Does the live model do what the maths says?" -> "## 实际运行的模型是否与数学预测一致?" Need "live model" 实时模型/实际运行. Good.

Paragraph: 我写出编辑后的 GGUF,在 llama-server 中加载,并在从记录轨迹中选出的位置上,将实时下一个 token 概率与离线预测进行比较: Good.

Table:

... Rows:

复查,代数问题9 × 10⁻⁹0.6050.597
复查,预代数问题2 × 10⁻⁸0.9420.944
复查,几何问题1.7 × 10⁻⁶0.9930.993
6 个解题位置不在前 30≈ 0不在前 30

Need "prealgebra" 预代数? Could keep prealgebra? Translate 初等代数? "prealgebra" is 预代数/基础代数. Use 预代数. Good.

After: "在所有九个位置上,其他 token 都恰好保持了它们的相对概率(它们的对数概率偏移的离散范围为 0.0000)。编辑后那一行的 Q8_0 重新量化在新增向量上的相对误差为 1.2%。" Need "spread of their log-probability shifts" 对数概率偏移的分布范围/离散程度. Good.

Heading Results -> "## 结果"

Table:

... Rows:

MATH-500,8 个留出问题8/8 · 34,955 tok8/8 · 16,080 tok–
AIME 2025 I-7, I-9, II-80/3(全部达到 32k)2/31/3

Need "Set (one sample each, 32k budget)" = 数据集(各一个样本,32k 预算). Good.

Need ensure not translate "token" maybe keep token. Chinese sentence with token. Good.

Need maybe "Πt" keep? Use Πt. "p′t". Good.

Need check rules: only translation no explanations. Output only body. No title. Good.

Need not wrap code block. Good.

Need preserve blank lines between paragraphs. Bullet list has blank lines. Tables no blank? Keep table as consecutive lines. Good.

Potential issue: "Every other token's distribution is unchanged, conditional on not stopping. For any j ≠ close..." It starts "2." Need keep "2." at beginning. Good.

Need maybe "close" is token? Keep close? Use close not code. Good.

Need "P′(j | not close)" keep. "Πt(1 − p′t)" keep. Good.

Need Chinese punctuation. Fine.

Need mention "Figure 1" as 图 1. Good.

Need "harmful early stops (below)" = 有害的提前停止(见下文). Good.

Need "fully on an RTX 4060 Laptop (8 GB)" maybe "完全在一台 RTX 4060 Laptop(8 GB)上". Good.

Need "the same value as on DeepSeek" = 与在 DeepSeek 上使用的值相同. Good.

Need "Qwen3.5-4B ties its head to the input embedding" = 将 head 与输入 embedding 绑定. Good.

Need "output.weight" keep. "embedding matrix with one row changed" = embedding 矩阵中有一行被更改. Good.

Need "llama.cpp loads an untied head automatically." = llama.cpp 会自动加载未绑定的 head. Good.

Need "No GPU training." = 没有 GPU 训练. Good.

Need "I split..." Use 我. Good.

Need "fitted on one half and simulated exactly on the other, then swapped." = 在一半上拟合,在另一半上精确模拟,然后交换. Good.

Need "almost certainly means a wrong or missing answer" = 这几乎肯定意味着答案错误或缺失. Good.

Need table header "P(stop before answer): mean" maybe "P(stop before answer):均值" keep English label? Since rule 5 product? It's metric. Could translate "答案前停止概率:均值". But if we translate, no variable. Fine. Need maybe preserve "P(stop before answer)" as term? Hmm. The paragraph quotes it; if table header translated, okay. But "P(stop before answer)" is not code variable? It is label. Translation acceptable. Need no English whole paragraphs. Fine.

Need "Re-checking kept" -> "保留的复查". Good.

Need "β ≈ 14" keep.

Need "live next-token probabilities" = 实时的下一个 token 概率. Good.

Need "recorded traces" = 记录下来的轨迹. Good.

Need "not in top 30" = 不在前 30. Good.

Need "At all nine positions the other tokens kept exactly their relative probabilities (the spread of their log-probability shifts was 0.0000)." = 在所有九个位置上,其他 token 都恰好保持了它们的相对概率(它们的对数概率偏移的离散范围为 0.0000)。 Good.

Need "The Q8_0 re-quantization of the edited row had a relative error of 1.2% on the added vector." = 编辑后那一行经 Q8_0 重新量化,在新增向量上的相对误差为 1.2%。 Good.

Need final answer only translation. Use Chinese. Ensure no extra. Need maybe "词表 248,320" okay.

Let's output. Wait need "文章标题" not included. Body begins "2." Good.

Need maybe "2." in Chinese? keep.

Need ensure table separator rows exactly with | --- |. For second table header has P(</think>) with angle brackets; keep. Good.

Need "AIME 2025 I-7, I-9, II-8" keep. Good.

Need "MATH-500,8 个留出问题" use Chinese comma. Table cell translation okay. Good.

Potential issue with "all nine positions" there are 3 re-checking + 6 solving = 9. Good.

Need no markdown code fence. Good. Final.</think>2. 在其他所有 token 上,分布保持不变,条件是不停止。对于任意 j ≠ close,P′(j | not close) = P(j | not close)。因此,从原始模型采样得到的一条轨迹,在编辑使其停止之前,也同样是编辑后模型的一条有效样本,而该停止的概率恰好为 1 − Πt(1 − p′t)。这正是图 1 所绘制的,也是我(下文)搜索有害的提前停止的方式。

实验 1:Qwen3.5-4B

  • 模型:Qwen3.5-4B(混合 Gated-DeltaNet/attention,词表 248,320,隐藏维度 2,560),Q8_0 GGUF,完全运行在 RTX 4060 Laptop(8 GB)上。
  • 引擎:上游 llama.cpp,未修改。通过模型自身的 chat template 开启思考模式;temperature 0.6,top-p 0.95,top-k 20;每个问题固定 seed。
  • 拟合数据:模型自身在 24 个 MATH-500 问题(难度等级 3–5)上的思考,上限 12k token。22 条轨迹可用(思考中出现正确答案),包含答案首次出现后 146k token 的复查:每个问题约 6,600。
  • 留出:下文结果中的每个问题;没有用于拟合或选择 β。
  • 编辑:β = 14(与在 DeepSeek 上使用的值相同)。Qwen3.5-4B 将 head 与输入 embedding 绑定,因此编辑后的 GGUF 增加了一个单独的 output.weight:embedding 矩阵中有一行被更改,Q8_0。llama.cpp 会自动加载未绑定的 head。
  • 成本:生成拟合轨迹约 30 分钟,捕获隐藏状态 2 分钟,拟合和 β 模拟约 7 分钟(主要是每个位置对 248k logits 做 log-sum-exp)。没有 GPU 训练。

在留出轨迹上选择 β

我把 22 条轨迹分成两半,在一半上拟合,在另一半上精确模拟,然后交换。“在答案前停止的概率”是编辑后的模型在正确答案首次出现之前结束思考的概率,这几乎肯定意味着答案错误或缺失。“保留的复查”是答案后思考中预期保留下来的比例。

β在答案前停止的概率:均值最差轨迹保留的复查
0(原始)0.0000.00097–99%
80.0000.000–0.00290–95%
100.000–0.0010.002–0.00881–92%
120.002–0.0050.012–0.03766–85%
140.008–0.0200.069–0.17052–73%
160.036–0.0740.311–0.58936–64%
200.164–0.2370.956–1.00023–50%

范围是两个留出半集(各 11 条轨迹)。“保留的复查”是在这些受 12k 上限限制的轨迹的长尾上测量的;在完整运行中节省更大,因为模型会提前结束,而不是一直复查到预算耗尽。

这种权衡一直到 β ≈ 14 都很平滑,之后急剧转变:在 16–20 时,编辑开始会在答案出现之前停止。14 是最后一个看起来安全的点,而且它恰好是我已经在 DeepSeek 上使用过的值,所以我保留它,而不是按模型调参。

实际运行的模型是否与数学预测一致?

我写出编辑后的 GGUF,在 llama-server 中加载,并在从记录轨迹中选出的位置上,将实时的下一个 token 概率与离线预测进行比较:

位置原始 P(</think>)编辑后,离线预测编辑后,实时
复查,代数问题9 × 10⁻⁹0.6050.597
复查,预代数问题2 × 10⁻⁸0.9420.944
复查,几何问题1.7 × 10⁻⁶0.9930.993
6 个解题位置不在前 30≈ 0不在前 30

在所有九个位置上,其他 token 都恰好保持了它们的相对概率(它们的对数概率偏移的离散范围为 0.0000)。编辑后那一行经 Q8_0 重新量化,在新增向量上的相对误差为 1.2%。

结果

| MATH-500,8 个留出问题

exactly? It's code/technical token; keep. In Chinese text, maybe use </think>? Original plain. Keep exact. \boxed{} keep. p′t Πs<t(1 − p′s) keep formulas. hf download etc keep. β keep. Q5_K etc.

Need maintain paragraphs and blank lines. Bullets: original "- Model: ..." with blank lines between bullets. Translate bullet lines preserving "- ". Need not add extra.

Potential issues: "thinking" maybe 思维/思考过程. "overthinking" in title not needed. "thinking tokens" = 思考 token. "budget" = 预算/额度; use 预算/token 预算. "held-out traces" = 留出轨迹. "stop mass" technical = 停止概率质量; "real stop mass" = 实际停止概率质量. "window" = 窗口. "greedy" = 贪心. "paragraph ends" = 段落末尾. "formatting" = 格式问题. "stock llama.cpp" = 原版 llama.cpp. "no patches" = 无需补丁. "mixture of experts" = 混合专家. "2-bit" keep? "IQ2_XXS (2-bit, 243 GB)". Translate as "IQ2_XXS(2-bit,243 GB)" keep 2-bit. "NVMe SSD" keep. "modified build of Strata" = 修改版 Strata 构建. "one-token decode path" = 单 token 解码路径. "head inputs" = 输出头输入? "head" = 输出头. "head tensor" = 输出头张量. "logit" keep. "nats" keep. "probe" = 探针? Maybe "探针" but unclear; use "探针" or "探测"? In ML probe = 探针/线性探针. Keep "探针". "agent task" = agent 任务. "agent prompt" = agent 提示. "max effort" = 最大努力? "推理努力" maybe "effort" setting. Use "最大 effort"?? Need Chinese. Original "max effort", "low effort" from reasoning effort. Translate "最大推理强度"/"低推理强度" perhaps. But setting names? Could keep "max effort" in table? Need consistency. Table has "Original, max effort", "Original, low effort", "Edited , max effort". Translate "原始,最大推理强度" etc. But "reasoning effort via chat template (max = 100, low = 50)" -> "通过聊天模板设置推理强度(max = 100,low = 50)". Table could "原始,最大 effort"? Hmm. Chinese "最大努力" awkward. Use "最大推理强度" and "低推理强度". That's okay. But "max effort" appears maybe setting label. Need not preserve? Translate.

"Right" table header = 正确? "Right" means correct count. Translate "正确". "Tokens (6 shared)" = token 数(6 个共同题). "Re-checking" = 复查 token? Use "复查". "Minutes" = 分钟. "Hardest problem" = 最难问题. Cell "no answer" = 无答案; "right" = 正确. Need table row alignment.

"Left alone at max effort" = 在最大推理强度下放任不管? "Left alone" means unedited? It refers model left alone. Translate "在最大推理强度下不作干预时". Good.

"On the six problems every setting solved" = 在每个设置都解出的六道题上. "25,363 of its 39,946 thinking tokens came after the right answer had first appeared." = 其 39,946 个思考 token 中有 25,363 个出现在正确答案首次出现之后.

"On the hardest problem it reached the right answer at ~17,800 tokens and kept verifying until the 32k budget ran out, without ever writing an answer." = 在最难的问题上,它在约 17,800 个 token 时得到正确答案,并一直验证到 32k 预算用完,始终没有写出答案.

First paragraph: "On the three AIME problems, the original had already written the right answer inside its thinking every time, and ran out of budget while re-checking it." = 在三道 AIME 题上,原始模型每次都已经在思考过程中写出了正确答案,却在复查它时耗尽了预算。 "The edited model's one miss was the model still working: it was moving between candidate counts, and the edit correctly stayed silent." = 编辑后模型唯一一次失手,是模型仍在计算:它在候选计数之间来回移动,而这次编辑正确地保持了沉默。 "Qwen recommends up to 81,920 tokens for competition maths, where the original would likely finish, so the fair reading is that at a fixed budget, the edit turns more of the budget into answers." = Qwen 建议竞赛数学最多使用 81,920 个 token,原始模型在那里很可能能完成,所以公平的解读是:在固定预算下,这次编辑把更多预算转化成了答案。

Need "one miss" maybe "一次未命中". Good.

"Searching for harmful early stops" translate ## 寻找有害的提前停止. Keep heading level ##.

"The failure that matters is an early stop on a wrong answer that the original would have corrected by re-checking." = 真正要紧的失败,是在错误答案上提前停止,而原始模型本会通过复查纠正它。 "Property 2 makes this searchable without sampling: on an original trace, the probability that the edited model stops at position t is p′t Πs<t(1 − p′s)." = 性质 2 使这一点无需采样即可搜索:在一条原始轨迹上,编辑后模型在位置 t 停止的概率为 p′t Πs<t(1 − p′s)。 Keep formula. "For every window with real stop mass, I forced </think> there, let the edited model write its answer (greedy) and graded it." = 对每个具有实际停止概率质量的窗口,我在那里强制写入 </think>,让编辑后模型(贪心)写出答案,并给它评分。 Need maybe "forced </think> there" = 强制插入 </think>. Good.

"On the 6 held-out traces checked so far, 5 give the right answer at every possible stop." = 在目前检查的 6 条留出轨迹中,有 5 条在每个可能的停止位置都给出正确答案。 "In the sixth, the stops at two paragraph ends (21% of the stop mass) produced no \boxed{} answer within 1,500 tokens." = 第六条中,在两个段落末尾处的停止(占停止概率质量的 21%)在 1,500 个 token 内没有产生 \boxed{} 答案。 Need \boxed{} exact. "The thinking there had just concluded "the solution x = 2 is unique", so this is probably formatting rather than a wrong answer, but it isn't confirmed." = 那里的思考刚刚得出“解 x = 2 是唯一的”,所以这很可能是格式问题而不是错误答案,但尚未确认。 Keep quote Chinese. "I haven't yet found a case where the edited model is wrong and the original right." = 我还没有找到编辑后模型错误而原始模型正确的情况。

Try it heading ## 试试看? "Try it" = 试一试. Use "试试". Need consistent.

Code block exact:


        hf download vaibhavrpi/Qwen3.5-4B-think-graft-GGUF Qwen3.5-4B-Q8_0-think-graft.gguf --local-dir .
llama-server -m Qwen3.5-4B-Q8_0-think-graft.gguf -ngl 99 -fa on -c 32768 --jinja
# use thinking mode as usual; only the timing of </think> changes
      

Rule: code keep as is. Comment inside code? Code block must only contain code; comments are code. Should we translate comment? Rule 4 code commands/config keep original; code block keep as is. Do not translate code comment? It says code, commands keep. Should preserve exactly. Yes keep comment English inside code. But rule 10 full text Chinese; code block exception? Code should remain. Good.

"5.2 GB (Q8_0). Fits an 8 GB GPU with a 32k context. Stock llama.cpp, no patches." = 5.2 GB(Q8_0)。可在 32k 上下文下装入 8 GB GPU。原版 llama.cpp,无需补丁。 Need "Fits an 8 GB GPU with a 32k context" = 能装进 8 GB GPU 并支持 32k 上下文. Good.

Heading ## Experiment 2: DeepSeek V4.1 Flash (763B) on a laptop = ## 实验 2:在笔记本电脑上运行 DeepSeek V4.1 Flash(763B). Keep model name. "on a laptop" = 在笔记本电脑上.

Bullets:

  • Model: DeepSeek V4.1 Flash, 763B-parameter mixture of experts, IQ2_XXS (2-bit, 243 GB).

Translate: - 模型:DeepSeek V4.1 Flash,763B 参数的混合专家模型,IQ2_XXS(2-bit,243 GB)。 Need "763B-parameter" as 763B 参数.

  • Hardware: HP Victus laptop: RTX 4060 Laptop (8 GB), Ryzen 7 8845HS, 30 GB RAM, one NVMe SSD. Experts are streamed from the SSD through a modified build of Strata, at about 12 tokens a second, so every thousand tokens of unnecessary re-checking costs well over a minute.

Translate: - 硬件:HP Victus 笔记本:RTX 4060 Laptop(8 GB)、Ryzen 7 8845HS、30 GB RAM、一块 NVMe SSD。专家从 SSD 通过修改版 Strata 构建流式加载,速度约为每秒 12 个 token,因此每一千个不必要的复查 token 要花远超一分钟。 Need "Experts" mixture experts = 专家. Good. "one NVMe SSD" = 一块 NVMe SSD.

  • Sampling: temperature 1.0, top-p 1.0 (the model card's setting); fixed seed per problem; reasoning effort via the chat template (max = 100, low = 50).

Translate: - 采样:temperature 1.0,top-p 1.0(模型卡中的设置);每个问题固定种子;通过聊天模板设置推理强度(max = 100,low = 50)。 Keep parameter names. "model card's setting" = 模型卡设置. Good.

  • Fit data: the head inputs over the model's own thinking on two maths problems (digit_sum and coin; 19.5k positions), captured on the one-token decode path that runs the edit.

Translate: - 拟合数据:模型在两个数学问题(digit_sum 和 coin;19.5k 个位置)上的自身思考过程中,输出头的输入;这些数据在运行该编辑的单 token 解码路径上捕获。 Need grammar. "the head inputs over the model's own thinking" = 模型自身思考上的输出头输入. Use "输出头输入". Good.

  • Edit: β = 14 on the </think> row (token 128822), re-quantized to the head's Q5_K format with ggml's own quantizer: ±0.04 nats on that logit; the head tensor differs from the original in 3,463 bytes.

Translate: - 编辑:在 </think> 行(token 128822)上设置 β = 14,用 ggml 自带的量化器重新量化为输出头的 Q5_K 格式:该 logit 上为 ±0.04 nats;输出头张量与原始版本相差 3,463 字节。 Need "row" = 行. Good. "on the </think> row" maybe "对 </think> 行". Good.

  • Held out: seven more maths problems (budgets 32k for the three tough ones, 16k for the rest) and every agent task. The probe never saw an agent prompt.

Translate: - 留出:另外七个数学问题(三道难题预算为 32k,其余为 16k)以及每个 agent 任务。探针从未见过 agent 提示。 Need "agent task" maybe "agent 任务". Good.

"Left alone at max effort, the model spends most of its thinking re-checking answers it already has." = 在最大推理强度下不加干预时,模型把大部分思考用于复查它已经拥有的答案。 "On the six problems every setting solved, 25,363 of its 39,946 thinking tokens came after the right answer had first appeared." = 在每个设置都解出的六道题上,其 39,946 个思考 token 中有 25,363 个出现在正确答案首次出现之后。 "On the hardest problem it reached the right answer at ~17,800 tokens and kept verifying until the 32k budget ran out, without ever writing an answer." translated.

Table: Need preserve separator. Header:

Rows:

Original, max effort6/741,55925,36364.1no answer
Original, low effort6/725,5487,78136.3no answer
Edited , max effort7/725,1122,63035.3right

Need translate cells: Setting = 设置 Right = 正确 Tokens (6 shared) = token 数(6 个共同题) maybe "Tokens(6 个共同)" but header. Re-checking = 复查 Minutes = 分钟 Hardest problem = 最难问题

Rows:

原始,最大推理强度6/741,55925,36364.1无答案
原始,低推理强度6/725,5487,78136.3无答案
编辑后,最大推理强度7/725,1122,63035.3正确

Need note "Edited , max effort" has space before comma; no matter.

Last paragraph: ""Re-checking" = thinking tokens written after the right answer first appeared. Two further held-out problems (a number-theory count and an edit distance by hand) ran out of the 16k budget for both the original at max effort and the edited model, so the full count is 7/9 vs 6/9." Translate: “复查”= 在正确答案首次出现之后写出的思考 token。另外两个留出问题(一个数论计数和一个手算编辑距离)在原始模型最大推理强度和编辑后模型下都耗尽了 16k 预算,所以完整计数是 7/9 对 6/9。 Need quote Chinese? Use “复查”. Good. "edit distance by hand" = 手工计算编辑距离. "number-theory count" = 数论计数. "full count" = 完整计数. Good.

Need ensure no extra. Use blank lines between paragraphs and bullets. Code block with blank lines around. Table blank lines.

Need maybe title? Not include. But if include, would violate? The prompt has title then 正文; likely output only body. We can output body translated. Good.

Need check "Property 2" maybe "性质 2" not explain. Good.

Need avoid adding "原始模型" if original "the original" yes.

Need "Qwen recommends up to 81,920 tokens for competition maths, where the original would likely finish" Could translate "Qwen 建议竞赛数学最多 81,920 个 token,原始模型在那里很可能能做完" Good.

Need preserve "p′t Πs<t(1 − p′s)" exactly; maybe use backticks? Original not code. Keep plain. Need ensure "p′t" not changed. Good.

Need "forced </think> there" inside text: if use </think>? Rule keep exact; adding backticks changes? It's a token; original plain. Keep plain. But Markdown may treat as HTML? No. Fine.

Need "within 1,500 tokens" = 在 1,500 个 token 内. Good.

Need "graded it" = 并评分. Good.

Need "the model still working" = 模型仍在计算. Good.

Need "candidate counts" = 候选计数. Good.

Need "the edit correctly stayed silent" = 编辑正确地保持沉默. Could "未触发" but original silent. Good.

Need "one miss" = 唯一一次未命中. Good.

Need "fair reading" = 公平的解读. Good.

Need "turns more of the budget into answers" = 把更多预算转化为答案. Good.

Need "harmful early stops" heading: "寻找有害的提前停止". Good.

Need "stop mass" repeated "停止概率质量"; maybe original "real stop mass" = 实际停止概率质量. Good.

Need "paragraph ends" "段落末尾". Good.

Need "two paragraph ends

), KL, top-1. Need maintain all rows. Need not omit. Translate "cap-thrash" maybe keep original with spaces? It's coined term; rule uncertain term keep original. Could say “我称之为 cap-thrash:” preserving. Need translate "property 1" as 性质 1. "failing tests" etc.

Need paragraph count. Original paragraphs: 1 measurements, heading Agent tasks, paragraph run, table, 4 images each on separate line? They have blank lines between images. Need preserve each image line and position. paragraph after images. heading Does..., paragraph. table. paragraph. paragraph live. heading Two..., table. heading A data..., paragraph.

Need ensure images exactly as given; alt text can translate, URL unchanged. Keep image markdown one line. Need blank lines around.

Need translate carefully.

Let's parse.

Title not necessarily output? User says 文章标题... 正文. Task translate given正文. We should output only body, not title? They didn't explicitly ask title translation, but "正文" only. Usually include正文 not title. Do not add title. We can translate body. Need no preface.

First para: "Two more measurements on this model. On the two fitting traces, teacher-forced, the edit moves P(</think>) at re-checking paragraph ends from 0.000 to 0.50 and 0.23, while on solving positions the per-token KL divergence from the original is 0.0003 with 99.6% top-1 agreement. On a general held-out text set (~1,000 positions), KL against the 6-expert reference was 0.1155 vs 0.1119 for the unedited model (top-1 82.9% vs 83.4%), inside this configuration's run-to-run noise." Translate: 对这个模型再做两项测量。在两条拟合轨迹上,采用 teacher-forced 时,该编辑在重新检查段落结尾处将 P(</think>) 从 0.000 移到 0.50 和 0.23,而在求解位置上,与原始模型相比的每 token KL 散度为 0.0003,top-1 一致率为 99.6%。在一个通用留出文本集(约 1,000 个位置)上,相对于 6-expert reference 的 KL 为 0.1155,而未编辑模型为 0.1119(top-1 分别为 82.9% 和 83.4%),处于此配置的逐次运行噪声范围内。 Need "moves ... from 0.000 to 0.50 and 0.23" Could say "将 ... 从 0.000 提升至 0.50 和 0.23" but "moves" not necessarily. "变为 0.50 和 0.23". Better "把 ... 从 0.000 变为 0.50 和 0.23". "teacher-forced" preserve with spaces. "6-expert reference" maybe 6 专家参考? We can say "6-expert 参考". "held-out" 留出. Good.

Heading Agent tasks -> "## Agent 任务" (preserve heading level? Original "## Agent tasks"; yes must preserve? Rule only # starts. Keep ##). Body: "I ran the same edited DeepSeek through a terminal coding-agent harness ("dsh") at its default medium effort, which allows up to 2,048 thinking tokens per step. The main task: build a polished single-page website for a bakery, with a menu, opening hours, a validated contact form, a persistent dark mode and a responsive layout." Translate. "同一个经过编辑的 DeepSeek" maybe. "终端编码智能体测试框架(“dsh”)". "default medium effort" 默认中等努力? "medium effort" maybe 中等 effort? Preserve "medium effort" with translation? In table "medium". Maybe translate "中等 effort" weird. We can say "默认的中等努力程度" but "effort" is setting. Better "默认的 medium effort" with spaces? It says original has "medium effort"; preserve product setting perhaps. But Chinese readability: "默认的 medium effort 设置". Then "每步最多允许 2,048 个 thinking token". Translate thinking tokens "思考 token" or preserve "thinking tokens"? Technical measurement maybe 思考 token. Keep "thinking token" possibly. Need consistency: "思考 token" and "thinking token" maybe. Since "thinking tokens" important, translate as "思考 token" and maybe "thinking token" in first? Better Chinese "思考 token" throughout. Product names keep DeepSeek. "terminal coding-agent harness" can "终端编码 agent 测试框架". Need no extra.

Table:

Rows:

Original, medium (default)13,1061048.2
Original, low effort12,5303659.1
Original, thinking off0908.5
Edited , medium2,062619.5

Need preserve row text maybe "Edited , medium" has space before comma; should we preserve? Translate cell "Edited , medium" to "已编辑,medium"? Original typo space; "已编辑 , medium" maybe preserve spacing? We can translate "编辑后 , medium" but comma. Table cells can translate. Headers "Capped steps 1" and "Blind rating 2" likely footnote numbers. Translate "触顶步数 1" "盲评 2"? Preserve numbers. "Capped steps 1" maybe "达到上限的步数 1". "Blind rating 2" "盲评 2". Good.

Rows: Original, medium (default) -> 原始模型,medium(默认) Original, low effort -> 原始模型,low effort Original, thinking off -> 原始模型,关闭思考 Edited , medium -> 编辑后 ,medium? Better "编辑后,medium" no need preserve odd space. But rule preserve? Only code etc. Fine.

Images: Need alt translate:

原始模型在 medium effort 下构建的面包店网站
原始模型在 medium effort 下构建的面包店网站

Keep URLs exact.

After images para: "The edited model's page was rated highest, with 84% less thinking than the original at the same setting. It spent its 2,062 thinking tokens on one step, planning the page, and none while writing the file or checking its work. The original spent 63–70% of its thinking on a failure mode I hadn't seen described before, which I'll call cap-thrash:" Translate. "编辑后模型的页面评分最高,在相同设置下比原始模型的思考少 84%。它把 2,062 个思考 token 花在了一个步骤上,即规划页面,而在写文件或检查工作时没有花任何思考 token。原始模型将其 63–70% 的思考花在了一种我以前没见过描述的失败模式上,我将其称为 cap-thrash:" Need "thinking" count maybe "思考" tokens. Good. "cap-thrash" preserve.

Heading "## Does it still think when something surprising happens?" -> "## 当发生意外情况时,它还会思考吗?"

Para: "Skipping thinking on easy steps only helps if the model still thinks when it matters. By property 1, the probability that the edited model skips thinking entirely on a step is exactly P′(</think>) at the first thinking position, computable from the original's recorded prompts:" Translate. "只有在模型于关键时刻仍会思考时,在简单步骤上跳过思考才有帮助。根据性质 1,编辑后模型在某一步完全跳过思考的概率,正好是第一个 thinking 位置处的 P′(</think>),这可以从原始模型记录的提示中计算出来:" Use P′ exactly. "recorded prompts" 记录的 prompt? Use "提示词" maybe. "prompts" technical: "提示". Fine.

Table:

Rows:

Routine: "Ran 7 tests … OK"0.110.94
Routine: file updated0.120.95
Routine: answer confirmed0.010.95
Task start0.01–0.290.32–1.00
New information: the test file's contents0.0000.002
New information: empty directory (time to plan)0.0000.004
Error: node ENOENT0.0000.001
Error: browser failed to launch0.0000.000
Tests fail ( ..EFEF. )0.270.91

Need translate cells. Preserve quotes? Use Chinese quotes? "例行:“运行 7 个测试…… OK”" Original has straight quotes. We can use “”. Need ellipsis "…" preserve maybe. Avoid changing code "..EFEF." keep exact. Headers:

Rows: 例行:“Ran 7 tests … OK”? Should translate "Ran 7 tests … OK" maybe code output should preserve? It is test output, code-like. Keep exact? "例行:'Ran 7 tests … OK'" We can keep English inside quotes? Rule code/commands keep. Test output is code-like, keep. But Chinese whole should not be English; however quoted output can remain. Maybe "例行:“Ran 7 tests … OK”". Good. "file updated" -> "文件已更新"; "answer confirmed" -> "答案已确认"; "Task start" -> "任务开始"; "New information: the test file's contents" -> "新信息:测试文件的内容"; "empty directory (time to plan)" -> "空目录(该规划了)"; "Error: node ENOENT" -> "错误:node ENOENT"; "browser failed to launch" -> "浏览器启动失败"; "Tests fail ( ..EFEF. )" -> "测试失败( ..EFEF. )". Good. "P(skip thinking)" translate "P(跳过思考)". Good.

Para after table: "25 recorded prompts from the original's own runs (representative rows; all 25 in the repo). For the failing tests the next sensible action is "read the code", which needs no thought; after reading it, the edited model thought for 220 tokens and fixed the bug." Translate. "来自原始模型自身运行的 25 个记录提示(代表性行;全部 25 个在 repo 中)。对于失败的测试,下一个合理动作是“阅读代码”,这不需要思考;阅读后,编辑后的模型思考了 220 个 token 并修复了 bug。" "repo" maybe 仓库. "all 25 in the repo" -> "全部 25 个在仓库中". Good.

Para: "The same thing happened live on a task it had never seen: adding promo-code support to a small codebase, checked by hidden tests. After Ran 25 tests … FAILED (failures=6), the edited model thought for 128 tokens and found the cause ("The tests pass code as parse_order only, not parse_code!"), spent 76 tokens on the fix, and passed all 9 hidden tests." Translate. "同样的事情在一次它从未见过的任务上实时发生了:向一个小型代码库添加 promo-code 支持,并由隐藏测试检查。在 Ran 25 tests … FAILED (failures=6) 之后,编辑后的模型思考了 128 个 token 并找到了原因(“The tests pass code as parse_order only, not parse_code!”),在修复上花了 76 个 token,并通过了全部 9 个隐藏测试。" Need keep code string exact. Fine. "promo-code" keep? Translate "促销码" maybe. Technical? It is feature; translate "促销码支持". Good. But "promo-code" maybe preserve. Chinese "促销码(promo-code)支持". But no extra? Parentheses are extra? It is translation. Fine. "Ran 25 tests … FAILED (failures=6)" code output preserve; okay. Could translate "The tests pass code as parse_order only, not parse_code!"? It's quote of model, should translate? Rule quotes translate according meaning, don't change stance. But it contains code identifiers; translate as “测试把 code 只作为 parse_order 传入,而不是 parse_code!” Better. Need keep "parse_order" and "parse_code". Good.

Heading "## Two more small tasks" -> "## 另外两个小任务" Table:

TaskOriginal thinkingEdited thinkingResult
eyes : probability puzzle (may write code)2,8280both right
orders : fix 3 bugs so hidden tests pass271220both pass

Translate:

任务原始模型思考编辑后模型思考结果
eyes:概率谜题(可编写代码)2,8280两者都正确
orders:修复 3 个 bug 以使隐藏测试通过271220两者都通过

Need preserve "eyes" and "orders" maybe task names, keep. Colon maybe "eyes :" original. Fine.

Heading "## A data-analysis task it had never seen" -> "## 一个它从未见过的数据分析任务" Para: "A bakery chain's sales CSV with three planted effects and three planted data problems; the model writes a report with findings and a chart. (The original at medium wasn't run on this task; low effort was.)" Translate "一家面包连锁店的销售 CSV,包含三个人为植入的效应和三个人为植入的数据问题;模型写一份包含发现和一张图表的报告。(原始模型在 medium 下没有运行此任务;运行的是 low effort。)" Need "planted" 植入. Good.

Need ensure all headings levels. Original uses ##. Good.

Need no code fences. No extra. Use Chinese punctuation, but tables use pipes.

Need decide "two fitting traces" maybe "两条拟合轨迹". Good. "teacher-forced" in Chinese can "teacher-forced" with spaces. Since uncertain term keep original and surrounding spaces. "在两条拟合轨迹上,采用 teacher-forced 时..." Good. "per-token KL divergence" -> "每 token KL 散度". Good. "6-expert reference" -> "6-expert 参考". Good. "run-to-run noise" -> "运行间噪声" or "逐次运行噪声". Good.

Need ensure "P(</think>)" not altered. Good. "P′(</think>)" exactly. Need not translate prime? Keep.

Potential issue "at re-checking paragraph ends" could mean "在重新检查段落结尾处". Good. "moves ... from 0.000 to 0.50 and 0.23" Could be "把 ... 从 0.000 分别变为 0.50 和 0.23" Add 分别? Original doesn't, but implied. Accept. "to 0.50 and 0.23" yes. Use "分别" maybe slight addition but natural. Should avoid extra? It conveys. Fine.

Need "on solving positions" "在求解位置上". Good.

"the edit moves P" edit = 编辑操作. "该编辑". Good.

Need "same edited DeepSeek" maybe "同一个编辑后的 DeepSeek". Good.

"terminal coding-agent harness ("dsh")" -> "终端编码 agent 测试框架(“dsh”)". The word harness maybe "harness" can keep: "终端编码 agent harness(“dsh”)". Rule term keep if uncertain. Use "harness" to be safe? Chinese media often "harness". "终端编码 agent harness(“dsh”)". Good. "默认的 medium effort" with spaces. "每步最多允许 2,048 个思考 token."

Table header "Website task" -> "网站任务". "Thinking tokens" -> "思考 token". "Steps" -> "步骤". "Capped steps 1" -> "达到上限的步骤 1" maybe "Capped" in original maybe number of capped steps. "触顶步骤 1" maybe opaque. Use "达到上限的步骤 1". "Blind rating 2" -> "盲评 2". Good.

Need "Edited , medium" row: "编辑后 ,medium" weird. Use "编辑后,medium". Good.

Images alt: "原始模型在 medium effort 下构建的面包店网站" maybe "原始模型以 medium effort 构建的面包店网站". Good. "thinking off" -> "关闭思考". Good. Need image URLs exact, line exact. Ensure no parentheses transformations. Use full URL from prompt. Yes.

Para after images: "The edited model's page was rated highest..." "在相同设置下,编辑后模型的页面获得了最高评分,其思考量比原始模型少 84%。" Good. "It spent its 2,062 thinking tokens on one step, planning the page, and none while writing the file or checking its work." -> "它把这 2,062 个思考 token 花在了一个步骤上——规划页面,而在编写文件或检查工作时没有花任何思考 token。" Good. "none" none tokens. "The original spent 63–70% of its thinking on a failure mode I hadn't seen described before, which I'll call cap-thrash:" -> "原始模型将其 63–70% 的思考花在了一种我以前没见描述过的失败模式上,我称之为 cap-thrash:" Need "hadn't seen described before" = "此前没见过有人描述的". Good.

Need heading exact translation.

Table 2 "What the last tool result was" -> "最后一个工具结果是什么". Good. "Original: P(skip thinking)" -> "原始模型:P(跳过思考)". Rows "Routine: "Ran 7 tests … OK"" -> "例行:“Ran 7 tests … OK”". If using English quote inside, okay. "Routine" = 例行. Good. "Task start" -> "任务开始". "New information

分析任务原始,低 effort编辑后,中等
思考 token 数10,1604,693
周末效应(+59%)发现发现
数据问题(重复项、负数量、缺失价格)3/33/3
持续下滑的产品漏掉漏掉
某门店三月的跃升漏掉部分
不实说法12

“这不就是低 effort 吗?”

这是我自己问的第一个问题,答案取决于任务。

在数学上,token 数大致相同,但被砍掉的 token 不同。编辑后的模型在六道共同问题上用了 25,112 个 token;低 effort 用了 25,548 个。低 effort 也砍掉了复查(剩下 7,781 个 token),但解题也更不仔细:在代码追踪问题上,它的第一遍得到 93,一次浅层检查说“正确”,只有完整重新推导才发现 85。编辑后的模型保留了最大 effort 的解题(15,366 个解题 token,最大 effort 为 14,583,低 effort 为 16,469),并去掉了复查(剩下 2,630)。它是唯一答出最难那道题的设置。

在 agent 任务上,低 effort 适得其反。它把每步预算减半,于是模型更频繁地撞上限,撞限抖动更严重:36 步而不是 10 步,且重读上下文 885k token,而编辑后的模型约 64k。

关闭思考无法反应。它从不思考,所以当测试失败或工具报错时无法停下来想一想,其页面评分也低于编辑后的模型(8.5 对 9.5)。

编辑后的模型根据自身状态逐步决定:例行的结果之后跳过思考,遇到意外之后则思考。effort 等级、预算和“关闭思考”都把同一个设置应用于每一步。

方法详解

1. 捕获 head 的精确输入

让未编辑的模型重读自己的轨迹,并在每个位置保存最终归一化的隐藏状态:即 head 所乘的那个精确向量。在 Qwen 上这是一个小的 libllama 工具(开启 embeddings,不做 pooling,按 1,024 个 token 的因果分块,块与块之间保留 KV cache)。检查:捕获的状态复现了模型自己采样的对数概率(T = 0.6 时每 token −0.18 nats),且在 93.7% 的位置上生成的 token 就是 argmax。在将要执行编辑的路径上捕获:在 DeepSeek 上,分块 prefill 与单 token decode 在这个 logit 上相差 1–3 nats(细节见消融部分)。

2. 标注

对每条轨迹,找到思考中第一次陈述正确答案的位置。对于简短的数值答案,要求它以结果的形式陈述(“= 5”、“is 5”、“answer … 5”),而不是作为中间值出现。正样本:该点之后紧跟段落分隔(\n\n)的位置。负样本:其他所有思考位置,涵盖整个解题阶段以及复查时的段中位置。在 Qwen 上,这得到 595 个正样本,对约 64k 个(下采样)负样本。

3. 拟合闭式探针

收缩线性判别分析,不用梯度:


        # H: (n, d) head inputs; P / N: boolean masks for positives / negatives
mu_p, mu_n = H[P].mean(0), H[N].mean(0)
S = np.cov(H[N].T, bias=True)
S = 0.8*S + 0.2*np.trace(S)/d*np.eye(d)   # shrinkage 0.2
w = np.linalg.solve(S, mu_p - mu_n)
a, b = np.median(H[N] @ w), np.median(H[P] @ w)
g = w / (b - a)          # medians: negatives → 0, positives → 1
      

将 g 缩放使两个中位数相距一个单位,使 β 可解释:在典型的复查段落结束处,编辑会给 close logit 增加约 β nats;在典型的解题位置,它增加约零。负样本正是让这件事安全的原因。每个解题位置和每个句中位置都是负样本,因此判别方向就是在“已定”段落结束处特别高的那个方向。

4. 精确模拟 β


        o = l_close - logsumexp(l_others)   # base log-odds per position
p = sigmoid(o + beta * H @ g)        # edited stop probability (exact)
stopped_by_t = 1 - np.cumprod(1 - p)
# report: P(stop before answer), re-checking kept, stray </think>
      

5. 将行写回

, output.weight, digit_sum, β·g, KL. Table separator exact. Need preserve table rows. Need be accurate: "Add β·g to the </think> row (in float), re-quantize that one row with ggml's quantizer, and write a new GGUF with every other tensor byte-identical." Translate: 将 β·g 加到 </think> 行(以 float 形式),用 ggml 的量化器重新量化这一行,并写出新的 GGUF,使其他所有张量逐字节相同。 "For a tied-embedding model, add output.weight as a copy of the embedding with the edited row, so the input embedding of </think> is untouched." 对 tied-embedding 模型,添加 output.weight,作为带有已编辑行的 embedding 副本,这样 </think> 的输入 embedding 不受影响。 Need maybe "绑定 embedding" but keep tied-embedding? Term uncertain can keep. "effective edit after re-quantization: 1.2% relative error on Qwen (Q8_0); ±0.04 nats on DeepSeek (Q5_K)." 检查重新量化后的有效编辑:Qwen (Q8_0) 上相对误差 1.2%;DeepSeek (Q5_K) 上 ±0.04 nats。

Section: "The model's own stop probability gives no warning." 模型自身的停止概率不会给出警告。 "On DeepSeek, P(</think>) stayed ≈ 0 through 4,700 tokens of re-checking on digit_sum, was 0.02 just 37 tokens before the model finally closed, and 0.51 at the close." 在 DeepSeek 上,在 digit_sum 上复查 4,700 个 token 的过程中,P(</think>) 一直 ≈ 0,在模型最终闭合前仅 37 个 token 时为 0.02,闭合时为 0.51。 "Early-exit rules that threshold the model's own confidence in ending (DEER-style) have nothing to work with here." 对模型自身结束信心设阈值的提前退出规则(DEER 风格)在这里无从下手。 "The information is in the hidden state, just not on the close logit's axis." 信息在隐藏状态中,只是不在闭合 logit 的轴上。

Next: "Mid-layer edits don't move the decision." 中层编辑不会改变决策。 "Re-checking vs solving is linearly separable in the residual stream (cross-problem AUC 0.91–0.99 for the mean-difference direction), but every intervention there left the stop probability at re-checking paragraph ends ≈ 0 (max 0.02):" 复查与求解在残差流中线性可分(均值差方向的跨问题 AUC 为 0.91–0.99),但那里的每次干预都使复查段落结尾处的停止概率 ≈ 0(最大 0.02): This table. Need translate cells carefully.

Table header: | Intervention (DeepSeek) | KL vs original (solving) | P(</think>) at re-checking ends |

Rows: "Delete 16 shared-expert neurons per layer, layers 24–39 (two selection rules)" => 每层删除 16 个 shared-expert 神经元,层 24–39(两种选择规则) KL ≈ 0.007 P ≈ 0 (once 0.15) => ≈ 0(一次为 0.15) "Mask the top-2 "re-checking" routed experts per layer, layers 20–39" => 每层屏蔽 top-2 的“复查”路由专家,层 20–39. Need preserve quotes? Use Chinese quotes. KL ≈ 0.001 ≈0 "Add or subtract 0.25 × the re-check − solve mean difference at layer 24" => 在第 24 层加上或减去 0.25 × 复查 − 求解均值差 KL ≈ 0.01 ≈0 "Project that direction out (shared-expert output, layers 24–39; residual streams)" => 将该方向投影出去(shared-expert 输出,层 24–39;残差流) KL 0.004–0.006 ≈0 "One-row head edit (this post)" => 单行 head 编辑(本文) KL 0.0003 0.23–0.50

Need "Top-1 agreement with the original stayed at 96–99% for every mid-layer edit (99.6% for the head edit)." 与原始的 Top-1 一致率在每次中层编辑中都保持在 96–99%(head 编辑为 99.6%)。 "The original model's own value at those positions is 0.000 (max 0.02)." 原始模型自身在这些位置的值是 0.000(最大 0.02)。

Next paragraph: "While re-checking, the close logit sits 10–15 nats below closing. Nudging a mid-layer state by an amount that keeps KL small doesn't come close to moving it. The head is where the decision is made, so that's where the edit has leverage." 复查时,闭合 logit 比闭合时低 10–15 nats。以保持 KL 较小的幅度轻推中层状态,远不足以移动它。决策是在 head 中做出的,所以编辑的杠杆在那里。

Next: "Mean-difference probe vs discriminant. Putting the plain mean difference (re-check − solve) on the row saves as many tokens on paper, but it fires during solving and mid-sentence: P(stop before the answer) 5–100% at β ≥ 8. The shrinkage discriminant, with all solving and mid-paragraph positions as negatives, keeps it ≤ 0.001 at the same β on the fitting traces." Translate: 均值差探针 vs 判别器。把普通均值差(复查 − 求解)放到该行上,纸面上能省下同样多的 token,但它会在求解过程中和句子中间触发:在 β ≥ 8 时,P(在答案前停止) 为 5–100%。收缩判别器将所有求解位置和段落中间位置作为负例,在拟合轨迹上相同 β 下将其保持在 ≤ 0.001。 Need "shrinkage discriminant" maybe 收缩判别式. Fine.

Next: "Calibrate on the path that runs the edit. The first DeepSeek probe was fitted on hidden states from chunked prompt processing. Teacher-forced through one-token decode, its stop probability at the same paragraph ends dropped from 0.51 / 0.23 / 0.93 to 0.13 / 0.08 / 0.32, and the first real run didn't stop early at all. Refitting on decode-path states (median alignment with the engine's own scores: 0.008 nats) fixed it. On Qwen, captures with 1,024- and 256-token chunks differ by a median 2% per row (kernel numerics, not chunk boundaries), small enough not to matter for a linear probe." Translate: 在运行该编辑的路径上校准。第一个 DeepSeek 探针是在分块 prompt 处理得到的隐藏状态上拟合的。通过单 token 解码进行 teacher-forcing 时,它在相同段落结尾处的停止概率从 0.51 / 0.23 / 0.93 降到 0.13 / 0.08 / 0.32,而第一次真实运行根本没有提前停止。在解码路径状态上重新拟合(与引擎自身分数的中位对齐:0.008 nats)解决了这个问题。在 Qwen 上,使用 1,024 token 和 256 token 分块捕获的结果每行中位相差 2%(内核数值,而非分块边界),小到对线性探针无关紧要。 Need "teacher-forced" maybe 教师强制? But technical term teacher-forced. Could keep English? Instruction keep uncertain terms. "Teacher-forced" maybe "teacher forcing" common. We can translate as "教师强制" but maybe okay. It says keep product terms; not necessarily jargon. "通过单 token 解码进行 teacher forcing" might be better with English spaced. Need Chinese full. I can write "通过单 token 解码进行 teacher forcing" (space around English). Good.

Section "How it started": "I'd been running DeepSeek V4.1 Flash on my laptop for a while, streaming it off the SSD through a heavily modified engine, and I wanted it faster and less wasteful. I'm GPU-poor, so the constraint was training-free methods only. The weight-space programming posts had me curious whether you could just edit a model into reasoning more efficiently." Translate: 我已经在笔记本上运行 DeepSeek V4.1 Flash 一段时间了,通过一个大幅修改过的引擎从 SSD 流式读取它,我希望它更快、更不浪费。我 GPU 资源匮乏,所以约束是只能用免训练方法。那些权重空间编程的文章让我好奇:是否可以直接把模型编辑得更高效地推理。 "GPU-poor" -> GPU 资源匮乏. Good.

Next: "First I asked GPT-6 Astra (through Codex) to do exactly that: edit DeepSeek's weights so it reasons compactly instead of in long prose. It edited 5.4–16.8 million shared-expert weights over two days. Thinking length didn't move (695 tokens before, 699–729 after); stronger edits just caused repetition. Maybe that works better on small models; on this one the decision to stop is held in the head, as the table above shows." Translate: 首先我让 GPT-6 Astra(通过 Codex)正是做这件事:编辑 DeepSeek 的权重,让它紧凑地推理,而不是用长篇散文推理。它在两天内编辑了 5.4–16.8 百万个 shared-expert 权重。思考长度没有变化(之前 695 个 token,之后 699–729 个);更强的编辑只会导致重复。也许这在小模型上效果更好;在这个模型上,停止的决策保存在 head 中,如上表所示。 Need "million" 百万. Fine.

Need output only body. Should we include section heading "## Ablations and dead ends" translated as "## 消融实验与死胡同". Fine.

Need ensure no extra. Use blank lines between paragraphs. Table preserved. Need no code fences.

Potential issue: "Add β·g to the </think> row (in float)" The phrase "row" and "head" maybe keep as "行" and "head" (output head). Fine. "output.weight" preserve. "tied-embedding" keep? Could translate "tied embedding 模型". Keep "tied-embedding". "shared-expert" keep hyphen? Use shared-expert. "top-2" keep. "Top-1" keep. "teacher forcing" keep. "nats" keep. "token" keep. "SSD" keep. "Codex", "GPT-6 Astra".

Need maintain exact table separator row. We can translate header "Intervention (DeepSeek)" to "干预(DeepSeek)"; "KL vs original (solving)" -> "相对原始(求解)的 KL"; "P(</think>) at re-checking ends" -> "复查结尾处的 P(</think>)". This is okay.

Need be careful with "the close logit's axis": 闭合 logit 的轴. Hmm "close" meaning end thinking? It's token </think> close. Use "闭合". Fine.

Need not add title. Output. Ensure no "本文" not in original? In table "this post" -> 本文; okay. In first paragraph we say "(本文)". That's translation of "this post". Fine.

Need maybe "当 β ≥ 8 时,P(在答案前停止) 为 5–100%" original "P(stop before the answer) 5–100% at β ≥ 8" okay.

Need ensure final no code block. Use Chinese. Good.</think>将 β·g 加到 </think> 行(以 float 形式),用 ggml 的量化器重新量化这一行,并写出新的 GGUF,使其他所有张量逐字节相同。对于 tied-embedding 模型,添加 output.weight,作为包含已编辑行的 embedding 副本,这样 </think> 的输入 embedding 不受影响。检查重新量化后的有效编辑:Qwen (Q8_0) 上相对误差 1.2%;DeepSeek (Q5_K) 上 ±0.04 nats。

消融实验与死胡同

模型自身的停止概率不会给出警告。在 DeepSeek 上,在 digit_sum 上复查 4,700 个 token 的过程中,P(</think>) 一直 ≈ 0,在模型最终闭合前仅 37 个 token 时为 0.02,闭合时为 0.51。对模型自身结束信心设阈值的提前退出规则(DEER 风格)在这里无从下手。信息在隐藏状态中,只是不在闭合 logit 的轴上。

中层编辑不会改变决策。复查与求解在残差流中线性可分(均值差方向的跨问题 AUC 为 0.91–0.99),但那里的每次干预都使复查段落结尾处的停止概率 ≈ 0(最大 0.02):

干预(DeepSeek)相对原始(求解)的 KL复查结尾处的 P(</think>)
每层删除 16 个 shared-expert 神经元,层 24–39(两种选择规则)≈ 0.007≈ 0(一次为 0.15)
每层屏蔽 top-2 的“复查”路由专家,层 20–39≈ 0.001≈ 0
在第 24 层加上或减去 0.25 × 复查 − 求解均值差≈ 0.01≈ 0
将该方向投影出去(shared-expert 输出,层 24–39;残差流)0.004–0.006≈ 0
单行 head 编辑(本文)0.00030.23–0.50

与原始的 Top-1 一致率在每次中层编辑中都保持在 96–99%(head 编辑为 99.6%)。原始模型自身在这些位置的值是 0.000(最大 0.02)。

复查时,闭合 logit 比闭合时低 10–15 nats。以保持 KL 较小的幅度轻推中层状态,远不足以移动它。决策是在 head 中做出的,所以编辑的杠杆在那里。

均值差探针 vs 判别器。把普通均值差(复查 − 求解)放到该行上,纸面上能省下同样多的 token,但它会在求解过程中和句子中间触发:在 β ≥ 8 时,P(在答案前停止) 为 5–100%。收缩判别器将所有求解位置和段落中间位置作为负例,在拟合轨迹上相同 β 下将其保持在 ≤ 0.001。

在运行该编辑的路径上校准。第一个 DeepSeek 探针是在分块 prompt 处理得到的隐藏状态上拟合的。通过单 token 解码进行 teacher forcing 时,它在相同段落结尾处的停止概率从 0.51 / 0.23 / 0.93 降到 0.13 / 0.08 / 0.32,而第一次真实运行根本没有提前停止。在解码路径状态上重新拟合(与引擎自身分数的中位对齐:0.008 nats)解决了这个问题。在 Qwen 上,使用 1,024 token 和 256 token 分块捕获的结果每行中位相差 2%(内核数值,而非分块边界),小到对线性探针无关紧要。

起因

我已经在笔记本上运行 DeepSeek V4.1 Flash 一段时间了,通过一个大幅修改过的引擎从 SSD 流式读取它,我希望它更快、更不浪费。我 GPU 资源匮乏,所以约束是只能用免训练方法。那些权重空间编程的文章让我好奇:是否可以直接把模型编辑得更高效地推理。

首先我让 GPT-6 Astra(通过 Codex)正是做这件事:编辑 DeepSeek 的权重,让它紧凑地推理,而不是用长篇散文推理。它在两天内编辑了 5.4–16.8 百万个 shared-expert 权重。思考长度没有变化(之前 695 个 token,之后 699–729 个);更强的编辑只会导致重复。也许这在小模型上效果更好;在这个模型上,停止的决策保存在 head 中,如上表所示。

` maybe actual tag. Keep. Product names etc.

Need translate carefully. There are some perhaps truncated? "Then latent reasoning:..." okay. Need no additions. Need preserve paragraphs. Count paragraphs and headings. Let's parse.

Title not necessarily include? User says 文章标题... 正文: then content. We need translate body? Probably include title? They say output translation正文. Task says given正文. Usually translate body only, maybe not title. We should output only body translation, not title? The title is outside "正文". We can omit title. Need maintain headings with ##. Rule only # but headings here ##, preserve.

Need translate accurately.

Paragraph 1: "Then latent reasoning: keep the reasoning inside the hidden state instead of writing it out. On a 2-bit model a single forward pass copies digits from the clues but never applies the logic. No gain."

Translate: 然后是潜在推理:把推理保留在隐藏状态中,而不是写出来。在一个 2-bit 模型上,单次前向传播会从线索中复制数字,但从不应用逻辑。没有收益。

Need "latent reasoning" maybe 潜在推理. "2-bit model" keep 2-bit.

P2: "So I gave up and set thinking to low. Then I read a post claiming DeepSeek was trained at max effort, and that lower settings make it worse and even longer. My agent runs agreed: low effort took 36 steps where medium took 10. But reading the maths traces, I noticed the model usually had the right answer early, and most of the thinking was re-checking something it already knew."

Translate: 所以我放弃了,把 thinking 设为 low。然后我读到一篇帖子,声称 DeepSeek 是在最大努力程度下训练的,而更低的设置会让它变得更差,甚至更长。我的 agent 运行结果也同意:low effort 花了 36 步,而 medium 花了 10 步。但在阅读数学轨迹时,我注意到模型通常很早就有了正确答案,而大部分思考都是在重新检查它已经知道的东西。

Need "agent runs" maybe "agent 运行". Keep "thinking", "low", "medium" maybe product settings. Good.

P3: "That's what early-exit research is about, but most methods I found need training or a component running next to the model. I let Claude Code work through it overnight on my machine. The approach that worked is the one-row edit above."

Translate: 这正是 early-exit 研究的关注点,但我找到的大多数方法都需要训练,或者需要一个与模型并排运行的组件。我让 Claude Code 在我机器上通宵处理它。奏效的方法就是上面的一行编辑。

Need "early-exit" keep maybe "early-exit 研究". Good.

Heading: "## Prior work" -> "## 先前工作" or "## 相关工作". Use "## 先前工作" literal. Could use "## 已有工作". Fine.

P4: "The core idea isn't mine. That a reasoning model's hidden state knows the answer is settled, and that a probe can end the thinking early, is published: Zhang et al. 2025 (probe-driven early exit), Sheng et al., NeurIPS 2025 (a direction that sets the </think> logit) and ROM (a trained overthinking detector). ThinkEdit edits weights for thinking that is too short. What's here is narrower: folding the probe into the </think> row, so that the edit is just a weights file with no runtime component, and measurements on a 763B model on a laptop, including agent tasks."

Translate: 核心想法不是我的。推理模型的隐藏状态知道答案这一点已成定论,而探针可以提前结束思考这一点也已发表:Zhang et al. 2025(探针驱动的提前退出)、Sheng et al., NeurIPS 2025(一个设置 </think> logit 的方向)和 ROM(一个经过训练的过度思考检测器)。ThinkEdit 针对过短的思考编辑权重。这里的内容更窄:把探针折叠进 </think> 行,因此编辑只是一个权重文件,没有运行时组件,并且是在笔记本电脑上对一个 763B 模型进行测量,包括 agent 任务。

Need "settled" maybe "已有定论". "probe" 探针. "logit" keep. "overthinking detector" 过度思考检测器. "weights file" 权重文件. Good.

P5: "The other common route to a model that thinks less is training a "think less" variant. ThinkingCap-Qwen3.8-27B, a fine-tune of Qwen3.8-27B, reports 37% fewer reasoning tokens on average (85.8% vs 86.6% accuracy), and its GGUF alone has been downloaded almost 900k times, so people clearly want this. Thinkless uses reinforcement learning to teach a model to choose, per prompt, between a short answer and long reasoning (50–90% less long-chain thinking). BudgetThinker and similar models train token budgets in. All of these need training data and GPU time for every model you want to change. This edit is a training-free alternative: a few dozen of the model's own traces, closed-form linear algebra, and one changed row."

Translate: 让模型思考更少的另一种常见路线是训练一个“think less”变体。ThinkingCap-Qwen3.8-27B 是 Qwen3.8-27B 的微调版本,报告平均减少 37% 的推理 token(准确率 85.8% 对 86.6%),而且仅它的 GGUF 就被下载了将近 90 万次,所以人们显然想要这个。Thinkless 使用强化学习来教模型针对每个 prompt 在简短回答和长推理之间做选择(长链思考减少 50–90%)。BudgetThinker 和类似模型把 token 预算训练进去。所有这些都需要为每一个你想改变的模型准备训练数据和 GPU 时间。这个编辑是一种免训练替代方案:几十条模型自己的轨迹、闭式线性代数,以及一行被改动。

Need "per prompt" maybe 每个提示. "closed-form linear algebra" 闭式线性代数. Good.

P6: "What surprised me is how little this is used. In 2026 I couldn't find it, or anything like it, in the popular inference engines and tools: they offer effort levels, token budgets and "thinking off", but nothing that lets the model's own state decide when to stop. It's a simple and effective way to cut thinking, and it doesn't seem to be widely known."

Translate: 让我惊讶的是它被用得如此之少。2026 年,我在流行的推理引擎和工具中找不到它,也找不到类似的东西:它们提供 effort levels、token budgets 和“thinking off”,但没有任何东西能让模型自己的状态决定何时停止。这是一种简单有效的减少思考的方法,而且似乎并不广为人知。

Need "推理引擎" inference engines. "effort levels" maybe keep. Good.

Heading "## Limitations" -> "## 局限" or "## 限制". Use "## 局限".

Bullets. Need preserve bullets? "段落结构" okay bullets are paragraphs. Keep bullets with "- ". Translate.

  • "Small numbers. Every DeepSeek cell is one run, and run-to-run variance is large. The Qwen sets are small too. I'm GPU-poor, so this is still being benchmarked and validated on more problems, seeds and models."

Translate: - 数字很小。每个 DeepSeek 单元格都是一次运行,而运行间方差很大。Qwen 的集合也很小。我 GPU 资源匮乏,所以这仍在更多问题、随机种子和模型上进行基准测试和验证。

Need "cells" maybe 单元格/单元. Use 单元? "cell" in table. "每个 DeepSeek 单元格" okay. "GPU-poor" maybe GPU 资源不足. Good.

  • "Stray </think> tags. On DeepSeek, the edited model's visible maths answers sometimes contain extra close tags (56 on the hardest problem, 1–2 on four others): re-checking inside the answer looks like re-checking inside the thinking, so the probe fires there too. Harmless for grading, untidy for users. Adding the model's own answer text as negatives removes them (in the repo). None appeared on Qwen."

Translate: - 多余的 </think> 标签。在 DeepSeek 上,编辑后的模型可见的数学答案有时会包含额外的结束标签(最难的问题上有 56 个,另外四个问题上有 1–2 个):答案内部的重新检查看起来像是在思考内部的重新检查,所以探针也会在那里触发。对评分无害,但对用户来说不整洁。把模型自己的答案文本作为负样本加入可以移除它们(在仓库中)。Qwen 上没有出现。

Need "close tags" 结束标签. "negatives" 负样本. Good.

  • "Some checking moves into the answer. When the model still has a checking plan, stopping the thinking can move part of it into the visible answer (DeepSeek, coin problem: 3,611 answer tokens). It still came out 36% shorter overall."

Translate: - 部分检查移入答案。当模型仍有检查计划时,停止思考会把其中一部分移到可见答案中(DeepSeek,硬币问题:3,611 个答案 token)。总体上仍然短了 36%。

  • "Fitted on maths only. The DeepSeek probe saw two maths traces; everything agentic is transfer."

Translate: - 仅在数学上拟合。DeepSeek 探针看到了两条数学轨迹;所有 agentic 内容都是迁移。 Need "agentic" keep maybe "agent 相关". Use "所有 agentic 内容都是迁移". Good.

Heading "## Reproduce" -> "## 复现"

P: "Everything is in github.com/nextgen-user/think-graft:"

Translate: 一切都在 github.com/nextgen-user/think-graft 中:

Need URL keep. Good.

Bullets:

  • "Qwen3.5-4B, end to end on one 8 GB GPU with upstream llama.cpp: trace generation, head-input capture, the fit, the β simulation, writing the GGUF, live verification, and the benchmark and exit-risk scripts."

Translate: - Qwen3.5-4B,在一个 8 GB GPU 上使用上游 llama.cpp 端到端运行:轨迹生成、head-input 捕获、拟合、β 模拟、写入 GGUF、实时验证,以及基准测试和退出风险脚本。

Need "head-input capture" maybe "头部输入捕获". "head-input" technical. Could keep "head-input 捕获". Fine. β keep.

  • "DeepSeek V4.1: the fit scripts, the edited rows and probes, every run's logs and tables, the agent task prompts and answer keys, and all site screenshots. The engine capture hook is specific to my Strata build."

Translate: - DeepSeek V4.1:拟合脚本、编辑后的行和探针、每次运行的日志和表格、agent 任务提示和答案键,以及所有站点截图。引擎捕获钩子特定于我的 Strata 构建。

Need "answer keys" 答案键? "答案" maybe. "site screenshots" 站点截图. "capture hook" 捕获钩子. Good.

Need consider title? They gave title. Should we include translated title? The instruction "把给定的正文完整译成 Chinese" and input has title and body. Maybe output title plus body? Usually expected translate entire content including title? "正文" excludes title. But they included "文章标题:..." likely metadata maybe should not include. The output should be translation正文. I'd not include title to obey. However maybe they expect title translated too? Hmm. The prompt says "文章标题:Editing one row..." then "正文:". In these tasks, often title included for context but not to translate. We should translate body only. Good.

Need ensure no markdown code fences. Use headings ##. Need preserve paragraphs exactly. Original bullet list has blank lines between bullets. We'll preserve.

Potential issue: "I let Claude Code work through it overnight on my machine." "work through it" maybe "解决它/处理它". Good.

"the approach that worked is the one-row edit above" but the above context says "above" though article excerpt starts after? Translate "上面的一行编辑" okay.

"the core idea isn't mine" "核心想法不是我的" okay.

"probe-driven early exit" translate "探针驱动的提前退出".

"a direction that sets the </think> logit" - "一个设置 </think> logit 的方向" okay.

"ThinkEdit edits weights for thinking that is too short." Need maybe "ThinkEdit 针对过短的思考来编辑权重". Good.

"folding the probe into the </think> row" - "把探针折叠进 </think> 行" okay.

"measurements on a 763B model on a laptop" - "在笔记本电脑上对一个 763B 模型进行测量". Good.

"training-free alternative" "免训练替代方案".

"a few dozen of the model's own traces" "几十条模型自身的轨迹".

"closed-form linear algebra" "闭式线性代数".

"one changed row" "一行被改动" maybe "改动一行". Good.

"effort levels, token budgets and "thinking off"" - keep maybe "effort levels、token budgets 和“thinking off”". It says terms. Good.

"Everything is in github.com..." Keep URL.

Need ensure full Chinese no English paragraphs? Some technical terms English allowed. Good.

Need maybe translate "head-input capture" to "head 输入捕获". Maybe "head-input 捕获" is okay.

Need "live verification" "实时验证". "exit-risk scripts" "退出风险脚本". Good.

Need "site screenshots" maybe "网站截图". Use "站点截图".

Need no "本文将". Good.

Need final only translation. Let's compose with headings and blank lines. Ensure bullets with "- ". Good.

Need perhaps include title? Let's decide final body only. If include title, might violate "正文". I'll output only body. Ensure heading "## 先前工作" etc.

Need consider "2-bit" maybe preserve "2-bit". Good.

Need "agentic" maybe "agentic" keep. Use "agentic 内容". Good.

Need "DeepSeek V4.1" preserve.

Need "Strata build" preserve Strata. Good.

Need "8 GB GPU" keep.

Need "β" maybe okay.

Need "GGUF" keep.

Need "upstream llama.cpp" maybe "上游 llama.cpp". Good.

Need "site screenshots" "所有站点截图". Good.

Need "answer keys" maybe "答案键" odd; "答案" maybe. But "answer keys" = 答案. Use "答案" to be natural. But no add. "agent 任务提示和答案". Fine.

Need "engine capture hook" "引擎捕获钩子". Good.

Let's final.</think>然后是潜在推理:把推理保留在隐藏状态中,而不是写出来。在一个 2-bit 模型上,单次前向传播会从线索中复制数字,但从不应用逻辑。没有收益。

所以我放弃了,把 thinking 设为 low。然后我读到一篇帖子,声称 DeepSeek 是在最大努力程度下训练的,而更低的设置会让它变得更差,甚至更长。我的 agent 运行结果也同意:low effort 花了 36 步,而 medium 花了 10 步。但在阅读数学轨迹时,我注意到模型通常很早就有了正确答案,而大部分思考都是在重新检查它已经知道的东西。

这正是 early-exit 研究的关注点,但我找到的大多数方法都需要训练,或者需要一个与模型并排运行的组件。我让 Claude Code 在我机器上通宵处理它。奏效的方法就是上面的一行编辑。

先前工作

核心想法不是我的。推理模型的隐藏状态知道答案这一点已成定论,而探针可以提前结束思考这一点也已发表:Zhang et al. 2025(探针驱动的提前退出)、Sheng et al., NeurIPS 2025(一个设置 </think> logit 的方向)和 ROM(一个经过训练的过度思考检测器)。ThinkEdit 针对过短的思考编辑权重。这里的内容更窄:把探针折叠进 </think> 行,因此编辑只是一个权重文件,没有运行时组件,并且是在笔记本电脑上对一个 763B 模型进行测量,包括 agent 任务。

让模型思考更少的另一种常见路线是训练一个“think less”变体。ThinkingCap-Qwen3.8-27B 是 Qwen3.8-27B 的微调版本,报告平均减少 37% 的推理 token(准确率 85.8% 对 86.6%),而且仅它的 GGUF 就被下载了将近 90 万次,所以人们显然想要这个。Thinkless 使用强化学习来教模型针对每个 prompt 在简短回答和长推理之间做选择(长链思考减少 50–90%)。BudgetThinker 和类似模型把 token 预算训练进去。所有这些都需要为每一个你想改变的模型准备训练数据和 GPU 时间。这个编辑是一种免训练替代方案:几十条模型自己的轨迹、闭式线性代数,以及一行被改动。

让我惊讶的是它被用得如此之少。2026 年,我在流行的推理引擎和工具中找不到它,也找不到类似的东西:它们提供 effort levels、token budgets 和“thinking off”,但没有任何东西能让模型自己的状态决定何时停止。这是一种简单有效的减少思考的方法,而且似乎并不广为人知。

局限

  • 数字很小。每个 DeepSeek 单元格都是一次运行,而运行间方差很大。Qwen 的集合也很小。我 GPU 资源匮乏,所以这仍在更多问题、随机种子和模型上进行基准测试和验证。
  • 多余的 </think> 标签。在 DeepSeek 上,编辑后的模型可见的数学答案有时会包含额外的结束标签(最难的问题上有 56 个,另外四个问题上有 1–2 个):答案内部的重新检查看起来像是在思考内部的重新检查,所以探针也会在那里触发。对评分无害,但对用户来说不整洁。把模型自己的答案文本作为负样本加入可以移除它们(在仓库中)。Qwen 上没有出现。
  • 部分检查移入答案。当模型仍有检查计划时,停止思考会把其中一部分移到可见答案中(DeepSeek,硬币问题:3,611 个答案 token)。总体上仍然短了 36%。
  • 仅在数学上拟合。DeepSeek 探针看到了两条数学轨迹;所有 agentic 内容都是迁移。

复现

一切都在 github.com/nextgen-user/think-graft 中:

  • Qwen3.5-4B,在一个 8 GB GPU 上使用上游 llama.cpp 端到端运行:轨迹生成、head-input 捕获、拟合、β 模拟、写入 GGUF

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗