[Feature] 如何较为准确去估算token usage #774
neoragex2002
started this conversation in
General
Replies: 2 comments
-
是的,我也在想这个问题。目前最终的结果是从服务器的 token usage 反馈来实现的,现在很多模型的token预估都是不准确的。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
这个确实头大... 我现在在观察usage,发现这个服务器返回的usage 序列统计也是很诡异的,比方说有些前文cache的token(比方说工具调用结果)它居然就不当作是你上传的token了... 要精确的话确实工作量巨大,而且碰到闭源模型,官方要不提供唯有干瞪眼 O_O |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
问题:selectedMsg这些关键流程都在用tokenx这个近似工具,而且这货的tokenization还只支持openai的gpt系列常见模型,deepseek、qwen、claude、bard这些模型的token预估怎么办啊...
建议:tokenx应对其他模型的token数量偏差可能有点大。如果ts里面没有类似py里transformer tokenizer那种精确工具的话,那是不是就只能建立精确的token usage序列跟踪机制、完全依托服务器的token usage统计反馈来搞定这事了
Beta Was this translation helpful? Give feedback.
All reactions