开发者近日在 Hacker News 展示了一项名为“权重空间编程”的技术,通过直接修改大型语言模型的少量权重来纠正其推理错误 1。该实验以小型 Qwen 模型为对象,针对其在开启思考模式时陷入无限自我验证(例如不断重复“wait, let me verify…”)直至耗尽预算的故障现象进行了干预 1。演示显示,仅需调整第 15 层和第 19 层中 64 个神经元的 ffn_down 输出权重,即可使模型停止循环并正常回答相同提示词的问题 1。
此次修改涉及的权重数量为 131,072 个,仅占模型总计约 8 亿个权重的 0.016% 1。这种技术定位与传统的模型合并技术(如 Model Souping)不同,它零聚焦于少数特定失败案例及其背后的神经元,旨在实现精准编辑而非整体融合 1。该方法被认为非常适合应用于 AI 代理的开发,通过提出编辑、测试和反馈结果的循环机制来持续优化模型行为 1。
A developer has showcased a technique known as "weight-space programming" that corrects reasoning errors in large language models by directly modifying specific model weights 1. The demonstration focused on a small Qwen model, which, when its thinking mode was enabled, fell into an infinite loop of self-verification phrases like "wait, let me verify…" until it exhausted its computational budget 1. By editing only 0.016% of the model's total approximately 800 million weights, specifically targeting the ffn_down output weights of 64 neurons in layers 15 and 19, the model successfully stopped looping and answered prompts normally 1.
This approach is described as a precise editing method for specific failure cases, distinct from traditional model merging techniques such as Model Souping 1. Instead of broad adjustments, weight-space programming zeroes in on the few neurons responsible for particular errors 1. The author suggests this technology could be highly beneficial for developing AI agents, allowing for an iterative cycle where edits are proposed, tested, and results fed back to optimize model behavior 1.
评论
还没有评论,欢迎留下第一条。