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

[Feature Request]: 关于 max_tokens 用法的建议 #4729

Closed
code-october opened this issue May 18, 2024 · 3 comments
Closed

[Feature Request]: 关于 max_tokens 用法的建议 #4729

code-october opened this issue May 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@code-october
Copy link

Problem Description

不同模型的 max_tokens 参数使用方式不一而足,有些模型如果 max_tokens 传的值不合适会导致请求拒绝或者吐字被中断,给视觉模型加上 max_tokens 的额外设置就是由于这个问题,关于 max_tokens 传不传参的 issue 讨论也不少。

Solution Description

对此我想给出一个建议,可以在前端设置一个切换按钮,用来控制当前对话是否给模型传入 max_tokens 参数。这样在适配新模型的时候可以适当减少在程序中硬编码的工作,因为除了 isVisionModel 的判别外,用户可以直接通过前端控制传 max_tokens。我想这样的设计能有效减少 max_tokens 参数带来的对话困扰。

Alternatives Considered

No response

Additional Context

No response

@code-october code-october added the enhancement New feature or request label May 18, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Feature Request]: Suggestions on max_tokens usage

Problem Description

The max_tokens parameter of different models is used in different ways. In some models, if the value passed in max_tokens is inappropriate, the request will be rejected or the enunciation will be interrupted. Adding additional settings of max_tokens to the visual model is due to this problem. Regarding whether max_tokens should be passed or not. There are also many issues discussed.

Solution Description

I would like to give a suggestion for this. You can set a toggle button on the front end to control whether the current conversation passes the max_tokens parameter to the model. This can appropriately reduce the hard coding work in the program when adapting to the new model, because in addition to the determination of isVisionModel, the user can directly pass max_tokens through the front-end control. I think this design can effectively reduce the conversation trouble caused by the max_tokens parameter.

Alternatives Considered

No response

Additional Context

No response

@Dean-YZG
Copy link
Contributor

非常同意你对max_tokens的看法,目前看,max_tokens和具体模型是强关联的,因此,在新版本中,我们将会把max_tokens作为具体模型的参数,支持用户对于模型的max_tokens进行自定义

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I very much agree with your view on max_tokens. At present, max_tokens is strongly related to the specific model. Therefore, in the new version, we will use max_tokens as a parameter of the specific model to support users to customize the max_tokens of the model.

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

No branches or pull requests

3 participants