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

Token章节疑问 #173

Open
WuShaogui opened this issue Nov 4, 2024 · 1 comment
Open

Token章节疑问 #173

WuShaogui opened this issue Nov 4, 2024 · 1 comment

Comments

@WuShaogui
Copy link

token章节提出以下观点:
image

限制token=输入+ 输出 token 数之和,但是后文max_token=1,限制模型输出1个token
image

我不是专业的NLP工程师,请问这里该如何理解?

@fchange
Copy link

fchange commented Nov 11, 2024

因为前面的提示词限定了,让AI的回复只有“Y”或者“N”,所以此时,我们就可以“限制模型输出1个token”了

至于token=输入+ 输出 token 数之和,这一般是说的语言模型的能力,指某一个模型所能支持的最大tken数。

这里摘抄官网的文档说明

The maximum number of tokens that can be generated in the completion.

The token count of your prompt plus max_tokens cannot exceed the model's context length. [Example Python code] (https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.

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