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

chore: update Qwen model params #2892

Merged
merged 9 commits into from
Mar 19, 2024

Conversation

soulteary
Copy link
Contributor

Description

Updated model calling parameters based on official website information and SDK parameters.

https://help.aliyun.com/zh/dashscope/developer-reference/api-details?disableWebsiteRedirect=true
image

https://help.aliyun.com/zh/dashscope/developer-reference/api-details

image

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

image

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 19, 2024
max: 2.0
help:
zh_Hans: 用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。
en_US: Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected. , the generated results are more certain.
- name: max_tokens
use_template: max_tokens
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite confused when setting all these common parameters (max_tokens, top_p and etc.) into not required by default.
These configs are not just for calling the LLM APIs, but also for the balance of productive and deliverable app constructions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I hope is that when the front-end is displayed, these options can be unchecked by default.

You are more familiar with the project, so I will follow your suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bowenliang123
Copy link
Contributor

Btw, as you're updating Qwen model's specification, use Qwen in PR title instead of Tongyi.

@soulteary soulteary changed the title chore: update Tongyi model params chore: update Qwen model params Mar 19, 2024
Copy link
Collaborator

@takatost takatost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm label Mar 19, 2024
@takatost takatost merged commit 8133ba1 into langgenius:main Mar 19, 2024
7 checks passed
@@ -8,54 +8,65 @@ model_properties:
parameter_rules:
- name: temperature
use_template: temperature
default: 1.0
type: float
default: 0.85
Copy link
Contributor

@bowenliang123 bowenliang123 Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, the default temperature here seems too high. In our practice on Qwen, it will make LLM's answer unrelated to the recalled knowledge. Would prefer setting relatively lower in 0.1 for more stable answer.

takatost pushed a commit that referenced this pull request Mar 19, 2024
@soulteary soulteary deleted the chore/update-qwen-params branch March 19, 2024 16:16
HuberyHuV1 pushed a commit to HuberyHuV1/dify that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants