# SWE-Pruner Pro：编码 LLM 已知道该修剪什么

- 来源：Rohan Paul (@rohanpaul_ai)
- 发布时间：2026-07-22 15:08
- AIHOT 分数：35
- AIHOT 链接：https://aihot.virxact.com/items/cmrvr92ys001cbipzk0wug5j1
- 原文链接：https://x.com/rohanpaul_ai/status/2079825773221839158

## AI 摘要

SWE-Pruner Pro 利用编码智能体自身的内部表征来移除工具输出中的无关行，无需单独的修剪模型。该方法在 2 个开源模型和 4 个多轮基准测试中，将 token 使用量削减了最多 39%，并在 MiMo-V2-Flash 上将一项编码基准提升 3.8%、一项长上下文测试提升 2.2 分。

## 正文

The paper proposes using the coding agent's own internal representations to remove irrelevant tool-output lines without a separate pruning model.

SWE-Pruner Pro reads the model's last-layer hidden states and labels every tool-output line as keep or remove.

Coding agents repeatedly read files， logs， and search results， then carry large amounts of unused text into later turns.

SWE-Pruner Pro adds a small classifier that reads hidden states， the model's internal summaries， and labels each line keep or prune.

A length-aware signal makes it gentler with short outputs， while a balanced training loss protects rare but important lines.

The team trained only this added head on 22，609 labeled tool responses， leaving the coding LLM itself unchanged.

Across 2 open models and 4 multi-turn benchmarks， it cut token use by up to 39% while mostly preserving quality.

On MiMo-V2-Flash， it also improved one coding benchmark by 3.8% and one long-context test by 2.2 points.

The result suggests coding agents already contain enough relevance information to manage context without a separate pruning model.

- arxiv. org/abs/2607.18213

Title： "SWE-Pruner Pro： The Coder LLM Already Knows What to Prune"
