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] Top_P #4078

Open
Araz-g opened this issue Feb 20, 2024 · 4 comments
Open

[Feature] Top_P #4078

Araz-g opened this issue Feb 20, 2024 · 4 comments

Comments

@Araz-g
Copy link

Araz-g commented Feb 20, 2024

  • Why we are not using 2 decimal instead of 1 i mean like Top_p 0.95
  • Sorry, I'm not good at TypeScript.
<ListItem title={Locale.Settings.TopP.Title}
        subTitle={Locale.Settings.TopP.SubTitle}
      >
        <InputRange
          value={(props.modelConfig.top_p ?? 1).toFixed(2)}
          min="0"
          max="1"
          step="0.01"
          onChange={(e) => {
            props.updateConfig(
              (config) =>
                (config.top_p = ModalConfigValidator.top_p(
                  e.currentTarget.valueAsNumber,
                )),
            );
          }}
        ></InputRange>
      </ListItem>
@reece00
Copy link
Contributor

reece00 commented Feb 20, 2024

Because there will be the next question: So why use 2 instead of 1?

@Araz-g
Copy link
Author

Araz-g commented Feb 21, 2024

A value of 0.95 strikes a good balance between efficiency and effectiveness on coding task, making it suitable for smaller models like the qwen 1.5 7b.

@H0llyW00dzZ
Copy link
Contributor

It's due to OpenAI's default settings, and I'm not certain if it supports being adjusted to 2 decimal such as Top_p 0.95.

Ref: https://platform.openai.com/docs/api-reference/chat/create#chat-create-top_p

@Araz-g
Copy link
Author

Araz-g commented Feb 21, 2024

@H0llyW00dzZ: sorry for the delay. In my local tests, both 0.9 and 0.95 (which are floating point values) worked fine. It seems that the chatbox is already using them,

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

3 participants