跳到正文
Skillpedia
其他81k · #1604

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-local/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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_count on the native API, llama.cpp timings, vLLM /metrics), not the lossy OpenAI-compatible usage, 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能