模型路由中的推理层级与成本权衡实践
as we've been working on building a model router, we've been thinking a lot abou…
做 Agent 和模型路由的同学必看,这篇用实测数据拆解了推理层级对成本和延迟的影响,直接给出了可落地的选型策略。
as we've been working on building a model router, we've been thinking a lot about model choice and tuning thinking levels.
在我们致力于构建模型路由器的过程中,我们深入思考了模型选择与推理层级(thinking levels)的调优问题。
it's common knowledge that as models get bigger (more parameters, e.g. luna → terra → sol → astra), they get smarter and cost more per token.
众所周知,随着模型规模的扩大(参数量增加,例如 luna → terra → sol → astra),它们会变得更智能,但每个 token 的成本也更高。
thinking levels are less appreciated. the thinking level sets how many reasoning tokens a model spends before it answers. a higher level boosts intelligence (it can solve more complex problems, and solve them more reliably) at the cost of time and tokens. those reasoning tokens are billed as output, so the same model costs more per task on a higher setting even though its per-token price doesn't change.
然而,推理层级的价值往往被低估。推理层级决定了模型在回答之前花费多少个推理 token。更高的层级能提升智能水平(能够解决更复杂的问题,且结果更可靠),但代价是时间和 token 的增加。这些推理 token 按输出计费,因此即使单 token 价格不变,同一模型在较高设置下处理任务的总成本也会更高。
as you can see in the chart, the biggest jump in intelligence is generally from low to medium. for example, GPT-6.2 Sol gains 11.8 points while time to first token only goes from 2.3s to 3.6s. past medium it gains another 4.9 points, but cost per task goes from $0.41 to $1.01 and the first token takes up to 103s.
从图表中可以看出,智能水平的最大飞跃通常发生在从低到中的阶段。例如,GPT-6.2 Sol 的智能得分提升了 11.8 分,而首 token 生成时间仅从 2.3 秒增加到 3.6 秒。超过中等层级后,智能得分再提升 4.9 分,但单次任务成本从 0.41 美元飙升至 1.01 美元,且首 token 生成时间长达 103 秒。
it's tempting to reach for a smaller model on a higher setting when the intelligence score is comparable, like GPT-6.1 Terra on max vs Sol on medium (51.4 vs 52.4). BUT!! don't be fooled by Terra's lower per-token price. it uses about 4x the output tokens, so it costs $0.96 per task vs $0.41 for Sol, and its first token takes 192s vs 3.6s.
当智能得分相当时,人们很容易倾向于在较高设置下使用较小的模型,例如 GPT-6.1 Terra 的最大设置与 Sol 的中等设置相比(51.4 对 52.4)。但是!!不要被 Terra 较低的单 token 价格所迷惑。它消耗的 output tokens 大约是 Sol 的 4 倍,因此单次任务成本为 0.96 美元,而 Sol 仅为 0.41 美元;此外,Terra 的首 token 生成时间为 192 秒,而 Sol 仅需 3.6 秒。
my current thinking is to pick a capable (but not top tier) model on medium effort as a daily driver, upgrading to higher levels when work is async or more complex, and latency isn't an issue.
我目前的思路是:在日常使用中,选择一个能力较强(但非顶级)的模型并设置为中等推理层级;当工作属于异步处理或更为复杂、且对延迟不敏感时,再升级到更高的推理层级。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力