[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpt-4o-mini模型的token计算和官方出入较大 #461

Closed
hcppxgit opened this issue Sep 3, 2024 · 5 comments
Closed

gpt-4o-mini模型的token计算和官方出入较大 #461

hcppxgit opened this issue Sep 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@hcppxgit
Copy link
hcppxgit commented Sep 3, 2024

今天发现日志里面gpt-4o-mini这个模型的token和上游对不上,最初怀疑是上游耍诈,然后找来官方计算器算了一下,上游其实是对的,newapi对这个模型的计算量大概少算了1/3,用的官方计算器测试的同样的输出内容。顺便测了其他的两个模型gpt-3.5-turbo、gpt-4-0125-preview都是对的,就gpt-4o-mini的token对不上,望抽空查证,谢谢。

官方token计算器 https://platform.openai.com/tokenizer

@hcppxgit hcppxgit added the bug Something isn't working label Sep 3, 2024
@Calcium-Ion
Copy link
Owner

token计算是完全正确的,请不要再提此类问题

@Calcium-Ion Calcium-Ion closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
@Calcium-Ion
Copy link
Owner

gpt-4o-mini使用了新的分词器,就是会比旧的模型少算token,如果多算了才是错误的

@hcppxgit
Copy link
Author
hcppxgit commented Sep 3, 2024

gpt-4o-mini使用了新的分词器,就是会比旧的模型少算token,如果多算了才是错误的

原来如此,看来是上游用的shellapi没更新,官方那个token计算器看来也是旧的,感谢科普。

@Calcium-Ion
Copy link
Owner

gpt-4o-mini使用了新的分词器,就是会比旧的模型少算token,如果多算了才是错误的

原来如此,看来是上游用的shellapi没更新,官方那个token计算器看来也是旧的,感谢科普。

你说的这个shell是可以自己偷偷改分词器的

@hcppxgit
Copy link
Author
hcppxgit commented Sep 3, 2024

gpt-4o-mini使用了新的分词器,就是会比旧的模型少算token,如果多算了才是错误的

原来如此,看来是上游用的shellapi没更新,官方那个token计算器看来也是旧的,感谢科普。

你说的这个shell是可以自己偷偷改分词器的

这么恶心,以后不接shell上游了,谢谢告知。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants