Hacker News 热门(buzzing.cc 中文翻译)📅 Jul 3技巧观点

pxpipe:通过图像化压缩输入token降低Claude Code成本

pxpipe是一个本地代理,将系统提示、工具文档和历史记录等密集文本渲染为PNG图像,利用图像token成本取决于像素尺寸的特性压缩输入token。在Fable 5模型上,约25k文本token压缩为约2.7k图像token,端到端账单降低59-70%。SWE-bench Lite 10个实例全部通过,成本从$54降至$27;SWE-bench Pro 19对测试中18对判定一致,单次请求成本降低约60%。该方法有损(精确ID等需保持文本),默认仅处理`claude-fable-5`请求,可通过`PXPIPE_MODELS`变量控制。

💡 Recommended AI Tools

AI programming tool launched by Anthropic
A comprehensive Chinese base model evaluation suite
The large video model released by Shengshu Technology and Tsinghua University supports highly consistent simulation of characters and physical laws.
The large video generation model launched by Kuaishou supports the generation of 1080p frame rate videos up to 2 minutes long.