1、Caveman (https://github.com/juliusbrussee/caveman ) —— 可让 Claude、Gemini 和 Codex 的回答更加简洁、直奔主题,去除所有冗余内容,据称最高可节省 75% 的 Token 消耗。
2、Pxpipe (https://github.com/teamchong/pxpipe ) —— 可将冗长的提示词转换为图像,供 Fable 5 使用。模型能够很好地识别图像中的文本,在某些情况下,据称可实现高达 700%(!)的 Token 节省。
3、OpenAI Tokenizer (https://platform.openai.com/tokenizer ):用来算 Token 的计算器,还能直接看到一段话是怎么被拆成 Token 的。
4、Anthropic Token Counting API (https://platform.claude.com/docs/en/build-with-claude/token-counting ):给 Claude 的请求算 Token,连带工具、图片和文档一起算进来。
5、BroadRouter Tools (https://broadrouter.com/tools/ ):装了多种分词器的计数器,能拿两版提示词做对比,还带费用和上下文计算器。
6、TokenSift (https://github.com/ritenv/tokensift ):翻一遍你的提示词,找出重复内容、写得啰嗦的 JSON 结构还有多余的 Token,顺便算算到底能省多少。
7、tiktoken (https://github.com/openai/tiktoken ):OpenAI 出的库,在本地就能把支持编码的 Token 数算得挺准。
8、LLMLingua (https://github.com/microsoft/LLMLingua ):专治又臭又长的提示词,用重要性评估模型挑出没那么要紧的片段删掉。
9、leanctx (https://github.com/yvgude/lean-ctx ):给大模型请求做压缩的 SDK,能接进不同服务商的客户端里用。