LightOn 开源 ColGrep-Agent-2B:本地小模型接管代码搜索
LightOn 团队发布并开源 ColGrep-Agent-2B:一个可完全本地运行(支持纯 CPU)的 2B 代码搜索 agent,把「先找到相关文件」这一步从昂贵的主编码模型手中接管过来,用基于 late-interaction 的多向量检索工具 ColGREP 完成语义搜索、读文件,再把代码位置与内容直接返回给主 agent。项目由在 LightOn 实习的 @Aarush1003 与 Amelie Tabatta 等人完成,博客、模型权重、GGUF 版本、colgrep 工具与论文均已放出。
已确认
- 评测设置:在 Claude Code(Sonnet 5.5)中,于 13 个近期代码仓库(特意选新仓库避免模型凭记忆作答)的 52 个代码搜索问题上对比 grep、ColGrep、ColGrep-Agent 与默认 Balanced 模式,共 624 次基准会话。
- 核心数据:ColGrep-Agent-2B 使 Claude Code 的 API token 用量下降 34.3%,成本降低约 40%;每题平均轮次从 5.5 降至 3.9,工具调用从 7.1 次降到 4.0(grep/find/ls 调用 5.1→2.0,文件读取 2.0→0.9),效率来自减少反复搜索与读文件。
- 精度:grep 基线正确率 83.3%,纯 ColGrep 为 79.5%(-3.8pt),ColGrep-Agent-2B 为 80.8%(-2.6pt);默认 Balanced 模式结合直接语义搜索与本地 agent,正确率追平 grep 的 83.3%,同时 API token 减少 21%、成本降低 30%。
- 代价:委托本地 agent 更慢——每题耗时 21.6 秒(grep 为 13.0 秒),Balanced 模式 17.7 秒,即以可接受的延迟换成本节省。
- 模型能力:在改编的 SWE-bench Lite 与 Multi-SWE-bench Flash 代码定位评测上,文件 F1 分别达 76.18 和 62.57,与 10 倍参数量的开源模型(如 27B 级)竞争;训练基座为 MiniCPM5-2B(先用 Qwen3 相关流程做检索蒸馏等,配方细节以论文为准)。
为什么重要
编码 agent 大量 token 花在反复 grep 和读文件上。用一个 2B 本地小模型做搜索中间层,能在精度基本不损失的前提下显著降低 API 成本,且完全本地运行、隐私友好,为「大模型编排 + 小模型干活」的分层 agent 架构提供了可复现的开源范例。
2026-10-12 ~ 2026-10-12 · 17 条相关
- 本地2B代码搜索agent开源:省下34%的API token — IgorCarron · 2026-10-12
- 实测 Claude Code 搜索工具:52 个代码搜索问题对比 grep 与 ColGrep — IgorCarron · 2026-10-12
- 接入 Claude Code 实测:ColGrep-Agent 省 34.3% token,成本降四成 — IgorCarron · 2026-10-12
- ColGrep-Agent 省钱的秘密:每题工具调用从 7.1 次降到 4 次 — IgorCarron · 2026-10-12
- LightOn 2B 小模型做代码搜索 agent,战绩比肩 27B 开源模型 — IgorCarron · 2026-10-12
- LightOn 发布 2B 代码搜索 agent ColGrep,附模型与论文 — IgorCarron · 2026-10-12
- 开源 ColGrep-Agent-2B 实测:本地检索替 Claude Code 省 34% token、40% 成本 — IgorCarron · 2026-10-12
- 接入 ColGrep 后 Claude Code 每题平均轮次从 5.5 降到 3.9 — IgorCarron · 2026-10-12
- Balanced 模式精度追平 grep(83.3%),API token 省 21% — IgorCarron · 2026-10-12
- 本地 agent 省 token 但更慢:ColGrep 默认模式省 30% 成本、慢 4.7 秒 — IgorCarron · 2026-10-12
- 仅 2B 参数:ColGrep-Agent 代码定位 F1 追平 10 倍大模型 — IgorCarron · 2026-10-12
- 2B 小模型做代码定位:ColGrep-Agent 精度追平 10 倍大模型 — IgorCarron · 2026-10-12
- 开源 2B 模型 ColGrep:本地多向量检索给编码 agent 当搜索中间层 — IgorCarron · 2026-10-12
- LightOn 实习生推出 ColGREP-agent:专治编码 agent 找文件浪费 token — IgorCarron · 2026-10-12
另有 3 条近重复转述:IgorCarron · IgorCarron · IgorCarron