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

自建model请求token超出 #12

Open
lxqall opened this issue Apr 6, 2023 · 1 comment
Open

自建model请求token超出 #12

lxqall opened this issue Apr 6, 2023 · 1 comment

Comments

@lxqall
Copy link

lxqall commented Apr 6, 2023

使用自己的训练库文件,片段:{"prompt":"什么汤最鲜->","completion":" 鱼羊汤,因为鱼羊一鲜\nENDEND"},创建一个model。
调用的时候:
CompletionReq req = CompletionReq.builder().model("curie:ft-personal-2023-04-06-09-02-34").prompt("什么汤最鲜").stop("\nENDEND").build();
CompletionRes res = service.completions(req);
返回:
"error": {
"message": "This model's maximum context length is 2049 tokens, however you requested 2060 tokens (12 in your prompt; 2048 for the completion). Please reduce your prompt; or completion length.",
"type": "invalid_request_error",
"param": null,
"code": null
}
加了max_token,就强行把答案补充到max_token的长度,最后一个文字一直重复,不能正常对话,不加max_token,就一直报这个错。有遇到同样问题的吗?

@gulihua10010
Copy link
Owner

我没创建过自己的model,所以不太清楚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants