我为我的大型语言模型账单构建了一个分析器(并为我节省了每月30美元)
📄 中文摘要
在收到47美元的OpenAI账单后,作者意识到自己无法确定哪些功能导致了高额费用。为了找出问题,他开发了一个名为llm-spend的Python分析器,以便更好地跟踪和管理AI使用成本。文章指出,AI成本在账单到来之前是不可见的,缺乏有效的监控工具。与其他资源(如CPU、内存和数据库查询)不同,LLM的费用只能在月底才会显现,导致开发者难以控制开支。llm-spend的出现为开发者提供了一种解决方案,帮助他们在使用AI时更清晰地了解费用来源。
📄 English Summary
I Built a Profiler for My LLM Bill (and It Saved Me $30/month)
After receiving a $47 bill from OpenAI, the author realized he had no way to identify which features were causing the high costs. To address this issue, he developed a Python profiler called llm-spend to better track and manage AI usage expenses. The article highlights that AI costs remain invisible until the bill arrives, lacking effective monitoring tools. Unlike other resources such as CPU, memory, and database queries, LLM expenses only become apparent at the end of the month, making it challenging for developers to control spending. The introduction of llm-spend provides a solution for developers to gain clearer insights into the sources of their AI costs.
Powered by Cloudflare Workers + Payload CMS + Claude 3.5
数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等