cost-local
它能做什么
这项技能估算在你自己的电脑或服务器上运行 AI 模型的成本,包括电费和硬件费用。适合正在权衡本地 AI 方案与付费在线服务的人。
适用场景
- ✓当你在决定是否购买硬件以在本地运行 AI 模型时。
- ✓当你想把本地模型的成本与托管服务进行比较时。
- ✓当你想了解用量达到多少,本地方案才能回本时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-local/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在我自己的电脑上运行 AI 模型,会不会比付费使用 API 更便宜?”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能利用你的功耗、电价、硬件价格和实测速度,估算每百万令牌的成本。由于用量会改变结果,它会在几个用量水平下展示结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Cost Local
node ${CLAUDE_PLUGIN_ROOT}/scripts/local-cost.mjs --tok-per-s 80 --busy 0.25 --compare claude-haiku-4-5
Inputs (all the user's): --watts-idle, --watts-active, --kwh, --hw-price, --life-years, --resale. --tok-per-s is required and must be a measured generation speed.
Rules
- Cost = fixed (amortisation + idle power, paid busy or not) + marginal (extra watts while generating). Utilisation decides the answer: always show the table at 5/25/50/100% busy.
- It is an estimate from the inputs; say so. Nothing is measured.
- Compare against a same-capability hosted model, not a frontier one; price alone is a poor reason to buy a GPU for sporadic use.
- Read real counts from the server (Ollama
eval_count/prompt_eval_counton the native API, llama.cpptimings, vLLM/metrics), not the lossy OpenAI-compatibleusage, and count model reloads (load_duration) as overhead.
常见问题
结果是实测的吗?
不是。它们是根据你提供的数字估算的,这项技能在输出中也会说明这一点。
为什么用量水平很重要?
无论是否使用,硬件和待机功耗的成本都一样,因此用量少时,本地 AI 每个令牌的成本会更高。
它需要什么速度数据?
它需要以每秒令牌数计的生成速度实测值,你必须通过真实测试获得。
详情
作者的原始描述
Cost per million tokens on hardware you own (Ollama, llama.cpp, vLLM, LM Studio) from watts, electricity price, hardware price and measured tokens/second, and the utilisation at which local beats a hosted model. Use for local-vs-API break-even questions.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1604
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。