跳到主内容
@wquguru
精选88r/LocalLLaMA(Reddit)技巧与观点多源精选 ×7

MIT重量空间编程实战:Claude手动编辑Gemma神经元优化意大利语翻译

I tried MIT's "weight-space programming" on my own use case: Claude rewrote 8 neurons of Gemma 4 12B to change how it translates one Italian tense

原文
发到 X
推荐理由

这是一份极具参考价值的一手工程实践,展示了不依赖训练即可精准干预模型行为的硬核技巧,适合对模型内部机制和高效微调感兴趣的开发者参考。

Yesterday MIT CSAIL showed GPT-6 Astra editing the weights of a small model by hand. It changed a few neurons of Qwen3.5-0.8B, the model stopped looping on math problems, and its scores jumped. No training at all.

昨天,MIT CSAIL 展示了 GPT-6 Astra 手动编辑一个小模型的权重。它改变了 Qwen3.5-0.8B 的几个神经元,该模型不再在数学问题上循环,其分数也大幅上升。完全没有进行训练。

I wanted to try the same thing on something closer to what I actually do with local models, which is translating into Italian. Gemma 4 has a habit I don't love. For sentences like

我想尝试在我实际使用本地模型时更贴近的场景,即翻译成意大利语。Gemma 4 有一个我不太喜欢的习惯。对于像这样的句子:

He had been hiding in the attic for months when the soldiers found him.

士兵找到他时,他已经躲在阁楼里好几个月了。

it writes «Si era nascosto in soffitta per mesi…». That's correct, but I prefer «Si nascondeva in soffitta da mesi…», which says he was still hiding when they came. The catch is that when the period was already over (he had lived in Paris for ten years, but by 1990 he had moved back), the original tense has to stay. So it's not "always use tense X", it's "use it only when the meaning calls for it".

它会写成 «Si era nascosto in soffitta per mesi…»(过去完成时)。这是正确的,但我更喜欢 «Si nascondeva in soffitta da mesi…»(未完成过去时),后者表达的是他们到来时他仍在躲藏。关键在于,当动作已经结束时(例如他在巴黎住了十年,但到 1990 年他已经搬回去了),原来的时态必须保留。所以不是“总是使用时态 X”,而是“仅在语义需要时使用”。

So I gave Claude Opus 5.5 the same kind of setup MIT used:

于是,我给 Claude Opus 5.5 提供了 MIT 使用的类似设置:

  • a Python kernel over Gemma's weights;
  • 50 forward passes to test its ideas on practice sentences;
  • no gradients, no training.
  • 一个针对 Gemma 权重的 Python 内核;
  • 50 次前向传播以在练习句子上测试其想法;
  • 没有梯度,没有训练。

It first checked whether Gemma already "knows" the difference between still-going-on and already-over. It does: a linear probe in the middle layers separates them almost perfectly. It just doesn't use that when choosing the verb. Then Claude rewrote 8 MLP neurons into a small switch that fires only in that context and nudges the verb toward the form I prefer. That's 92k out of 11.9B parameters, roughly a 100 KB diff.

它首先检查 Gemma 是否已经“知道”持续状态和已完成状态之间的区别。确实如此:中间层的线性探针几乎完美地将它们分开。只是它在选择动词时没有利用这一点。然后,Claude 将 8 个 MLP 神经元重写为一个小型开关,仅在该语境下触发,并将动词倾向向我偏好的形式。这涉及 119 亿参数中的 9.2 万,大约是一个 100 KB 的差异。

Results on sentences it never saw

在它从未见过的句子上的结果

The table shows the share still in the old form, then how many control sentences got pushed into a wrong reading, then how many of 200 unrelated translations stayed identical.

表格显示了仍保持旧形式的比例,然后是有多少控制句子被推向了错误的解读,最后是 200 个不相关的翻译中有多少保持不变。

Methodtest 1test 2 (independent)controls brokenunrelated unchanged
Gemma 4 12B26 %32 %—200
Preference in the system prompt4 %2 %4982
Classic "difference of means" ablation49 %75 %5343
LoRA fine-tune on the same data12 %23 %0120
Claude's hand edit5 %16 %2182
方法测试 1测试 2(独立)破坏的控制句未相关且不变
Gemma 4 12B26%32%—200
系统提示中的偏好4%2%4982
经典的“均值差异”消融实验49%75%5343
在同一数据上的 LoRA 微调12%23%0120
Claude 的手动编辑5%16%2182
  • The prompt applies the preference everywhere, even where it changes the meaning.
  • The ablation recipe breaks the past tenses.
  • The LoRA shifts fewer sentences and touches far more unrelated ones (it's better inside paragraphs, though).
  • The hand edit moves just the verb and leaves almost everything else identical.
  • 提示词在所有地方都应用了这种偏好,即使这会改变含义。
  • 消融实验的配方破坏了过去的时态。
  • LoRA 改变的句子较少,但触及了大量不相关的句子(尽管在段落内部表现更好)。
  • 手动编辑仅移动了动词,并保留了其他几乎所有内容不变。

Fair warning: it's one construction and one model. Two of my three runs succeeded (the third crashed because of my own harness), and the two that worked landed on the same "switch neuron" design independently.

提前警告:这是一个构建和一个模型。我的三次运行中有两次成功了(第三次因为我自己使用的 harness 而崩溃),成功的那两次独立地都定位到了同一个“开关神经元”设计。

Repo with the edits, the code, the agent logs and all baselines: https://github.com/ValerioDolci/frontier-weight-edit

包含编辑、代码、智能体日志及所有基线的仓库:https://github.com/ValerioDolci/frontier-weight-edit

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

关联信息,但可能不是同一事件