[PR #10016] [MERGED] feat: Tweak and add advanced parameters for ollama #22454

Closed
opened 2026-04-20 04:09:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/10016
Author: @ferret99gt
Created: 2/14/2025
Status: Merged
Merged: 2/16/2025
Merged by: @tjbck

Base: devHead: tweak-and-add-advanced-parameters-for-ollama


📝 Commits (3)

  • 2017856 Merge pull request #9945 from open-webui/dev
  • 941c787 Add presence penalty (openAi/ollama/others) and repeat penalty (ollama only?)
  • bb72957 Update field label for Ollama convention

📊 Changes

3 files changed (+125 additions, -6 deletions)

View changed files

📝 src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte (+119 -6)
📝 src/lib/components/chat/Settings/General.svelte (+4 -0)
📝 src/lib/i18n/locales/en-US/translation.json (+2 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • Minor adjustment to the ranges of some advanced parameters, and the addition of two more, presence_penalty (Most providers? Including OpenAI and Ollama) and repeat_penalty (Ollama only)

Added

  • Two new parameters, presence_penality and repeat_penalty, added to Advanced Parameters
    • Presence_penality defaults to 0, disabled, in most providers, so this should not have an impact
    • Repeat_penalty is only for Ollama, and uses default value.

Changed

  • Adjusted range of Temperature to allow a maximum of 2 as several Ollama models recommend temperatures around 1.0-1.3
  • Adjusted range of Top K to allow a maximum of 1000, as several Ollama models recommend Top K around 150-350.
  • Tweaked description of Frequency Penalty in-line with OpenAI documentation.

Additional Information

  • I was able to build and test this on Windows, and use the new parameters, but as I believe the core development is done under Linux and the documentation doesn't contain explicit Windows instructions, someone else may want to test.
  • Originally mentioned in discussion #9772
  • Note that though I mentioned it in 9772 above, I did not remove tfs_z, although it is no longer supported by Ollama. I am not sure if other providers use it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/10016 **Author:** [@ferret99gt](https://github.com/ferret99gt) **Created:** 2/14/2025 **Status:** ✅ Merged **Merged:** 2/16/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `tweak-and-add-advanced-parameters-for-ollama` --- ### 📝 Commits (3) - [`2017856`](https://github.com/open-webui/open-webui/commit/2017856791b666fac5f1c2f80a3bc7916439438b) Merge pull request #9945 from open-webui/dev - [`941c787`](https://github.com/open-webui/open-webui/commit/941c787806bef9015a32733b7a6fccac580d3d1c) Add presence penalty (openAi/ollama/others) and repeat penalty (ollama only?) - [`bb72957`](https://github.com/open-webui/open-webui/commit/bb729575354ad39f5a0d450f005c6e1d63eede10) Update field label for Ollama convention ### 📊 Changes **3 files changed** (+125 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte` (+119 -6) 📝 `src/lib/components/chat/Settings/General.svelte` (+4 -0) 📝 `src/lib/i18n/locales/en-US/translation.json` (+2 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests for validating the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - Minor adjustment to the ranges of some advanced parameters, and the addition of two more, presence_penalty (Most providers? Including OpenAI and Ollama) and repeat_penalty (Ollama only) ### Added - Two new parameters, presence_penality and repeat_penalty, added to Advanced Parameters - Presence_penality defaults to 0, disabled, in most providers, so this should not have an impact - Repeat_penalty is only for Ollama, and uses default value. ### Changed - Adjusted range of Temperature to allow a maximum of 2 as several Ollama models recommend temperatures around 1.0-1.3 - Adjusted range of Top K to allow a maximum of 1000, as several Ollama models recommend Top K around 150-350. - Tweaked description of Frequency Penalty in-line with OpenAI documentation. --- ### Additional Information - I was able to build and test this on Windows, and use the new parameters, but as I believe the core development is done under Linux and the documentation doesn't contain explicit Windows instructions, someone else may want to test. - Originally mentioned in discussion #9772 - Note that though I mentioned it in 9772 above, I did not remove tfs_z, although it is no longer supported by Ollama. I am not sure if other providers use it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:09:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#22454