Skip to content

feat: add DEFAULT_TOP_PROBABILITY config option - #790

Open
codexanima1 wants to merge 1 commit into
TheR1D:mainfrom
codexanima1:feat/top-p-config
Open

feat: add DEFAULT_TOP_PROBABILITY config option#790
codexanima1 wants to merge 1 commit into
TheR1D:mainfrom
codexanima1:feat/top-p-config

Conversation

@codexanima1

Copy link
Copy Markdown

Description

This PR adds the ability to configure top_p (top probability) via the .sgptrc config file or DEFAULT_TOP_PROBABILITY environment variable, just like DEFAULT_TEMPERATURE already works.

Changes

  • config.py: Added DEFAULT_TOP_PROBABILITY to the default config (falls back to 1.0)
  • app.py: Changed top_p default from hardcoded 1.0 to cfg.get("DEFAULT_TOP_PROBABILITY")

Testing

  • top_p now reads from config/env vars with a fallback to 1.0
  • Follows the same pattern as DEFAULT_TEMPERATURE

Closes #425

Allow users to set default top_p value in .sgptrc config file
or via DEFAULT_TOP_PROBABILITY environment variable.

Previously top_p was hardcoded to 1.0. Now it reads from:
1. DEFAULT_TOP_PROBABILITY env var
2. sgptrc config file
3. Falls back to 1.0

Closes TheR1D#425
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

Successfully merging this pull request may close these issues.

Set temperature and top-probability via config?

1 participant