From 86cb5e058711633bd4fa45faabcac699020386e5 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:02:19 -0700 Subject: [PATCH 1/8] Standardize margins and paddings across all chat styles --- css/chat_style-Dark.css | 28 ++++++++++++++++++++++++++- css/chat_style-TheEncrypted777.css | 28 ++++++++++++++++++++++++++- css/chat_style-cai-chat.css | 31 ++++++++++++++++++++++++++---- css/chat_style-messenger.css | 28 ++++++++++++++++++++++++++- css/chat_style-wpp.css | 27 ++++++++++++++++++++++++-- css/html_readable_style.css | 28 ++++++++++++++++++++++++--- 6 files changed, 158 insertions(+), 12 deletions(-) diff --git a/css/chat_style-Dark.css b/css/chat_style-Dark.css index 6a4784cc..aae82f8b 100644 --- a/css/chat_style-Dark.css +++ b/css/chat_style-Dark.css @@ -91,7 +91,6 @@ } .message-body p { - margin-bottom: 0 !important; font-size: 16px !important; line-height: 1.5 !important; color: #e0e0e0 !important; /* Light color for text */ @@ -129,3 +128,30 @@ font-size: 18px; /* Smaller username for mobile */ } } + +/* Standard spacing */ +.chat .message-body :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.chat .message-body :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.chat .message-body :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.chat .message-body ul, .chat .message-body ol { + padding-inline-start: 2em; +} + +.message-body li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} + +.message-body li > p { + display: inline !important; +} diff --git a/css/chat_style-TheEncrypted777.css b/css/chat_style-TheEncrypted777.css index fbd47072..7f37377d 100644 --- a/css/chat_style-TheEncrypted777.css +++ b/css/chat_style-TheEncrypted777.css @@ -87,7 +87,6 @@ } .message-body p { - margin-bottom: 0 !important; font-size: 18px !important; line-height: 1.428571429 !important; color: rgb(243 244 246) !important; @@ -135,3 +134,30 @@ font-size: 20px; } } + +/* Standard spacing */ +.chat .message-body :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.chat .message-body :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.chat .message-body :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.chat .message-body ul, .chat .message-body ol { + padding-inline-start: 2em; +} + +.message-body li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} + +.message-body li > p { + display: inline !important; +} diff --git a/css/chat_style-cai-chat.css b/css/chat_style-cai-chat.css index b06b1269..d2e8f44a 100644 --- a/css/chat_style-cai-chat.css +++ b/css/chat_style-cai-chat.css @@ -52,10 +52,6 @@ font-weight: 500; } -.message-body p, .chat .message-body ul, .chat .message-body ol { - margin-bottom: 10px !important; -} - .dark .message-body p em { color: rgb(138 138 138) !important; } @@ -64,3 +60,30 @@ color: rgb(110 110 110) !important; font-weight: 500; } + +/* Standard spacing */ +.chat .message-body :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.chat .message-body :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.chat .message-body :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.chat .message-body ul, .chat .message-body ol { + padding-inline-start: 2em; +} + +.message-body li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} + +.message-body li > p { + display: inline !important; +} diff --git a/css/chat_style-messenger.css b/css/chat_style-messenger.css index 65af5f7a..a6189a4a 100644 --- a/css/chat_style-messenger.css +++ b/css/chat_style-messenger.css @@ -86,7 +86,6 @@ } .message-body p { - margin-bottom: 0 !important; font-size: 15px !important; line-height: 1.428571429 !important; font-weight: 500; @@ -99,3 +98,30 @@ .message-body p em { color: rgb(110 110 110) !important; } + +/* Standard spacing */ +.chat .message-body :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.chat .message-body :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.chat .message-body :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.chat .message-body ul, .chat .message-body ol { + padding-inline-start: 2em; +} + +.message-body li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} + +.message-body li > p { + display: inline !important; +} diff --git a/css/chat_style-wpp.css b/css/chat_style-wpp.css index b2ac4d2a..c86e577d 100644 --- a/css/chat_style-wpp.css +++ b/css/chat_style-wpp.css @@ -100,6 +100,29 @@ margin-top: 8px; } -.message-body p, .chat .message-body ul, .chat .message-body ol { - margin-bottom: 10px !important; +/* Standard spacing */ +.chat .message-body :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.chat .message-body :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.chat .message-body :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.chat .message-body ul, .chat .message-body ol { + padding-inline-start: 2em; +} + +.message-body li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} + +.message-body li > p { + display: inline !important; } diff --git a/css/html_readable_style.css b/css/html_readable_style.css index 760649d6..74a913e9 100644 --- a/css/html_readable_style.css +++ b/css/html_readable_style.css @@ -11,9 +11,8 @@ .readable-container p, .readable-container li { font-size: 16px !important; - color: #efefef !important; - margin-bottom: 22px; line-height: 1.4 !important; + color: #efefef !important; } .readable-container li > p { @@ -30,4 +29,27 @@ .readable-container .hoverable { font-size: 14px; -} \ No newline at end of file +} + +/* Standard spacing */ +.readable-container :is(p, ul, ol) { + margin: 1.25em 0 !important; +} + +.readable-container :is(p, ul, ol):first-child { + margin-top: 0 !important; +} + +.readable-container :is(p, ul, ol):last-child { + margin-bottom: 0 !important; +} + +.readable-container ul, .readable-container ol { + padding-inline-start: 2em; +} + +.readable-container li { + list-style-position: outside; + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; +} From c6c1b725e95594f03891cdabe0be51ca8cb33c0a Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:11:13 -0700 Subject: [PATCH 2/8] CSS simplifications --- css/chat_style-Dark.css | 20 +------------------- css/chat_style-TheEncrypted777.css | 20 +------------------- css/chat_style-cai-chat.css | 21 +-------------------- css/chat_style-messenger.css | 23 +---------------------- css/chat_style-wpp.css | 20 +------------------- css/html_readable_style.css | 12 +----------- 6 files changed, 6 insertions(+), 110 deletions(-) diff --git a/css/chat_style-Dark.css b/css/chat_style-Dark.css index aae82f8b..11603ff5 100644 --- a/css/chat_style-Dark.css +++ b/css/chat_style-Dark.css @@ -35,10 +35,6 @@ color: #f0f0f0; /* Light text color for readability */ } -.text p { - margin-top: 2px; -} - .username { padding-left: 10px; font-size: 20px; @@ -129,7 +125,7 @@ } } -/* Standard spacing */ +/* Standard spacing from instruct style */ .chat .message-body :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -141,17 +137,3 @@ .chat .message-body :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.chat .message-body ul, .chat .message-body ol { - padding-inline-start: 2em; -} - -.message-body li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} diff --git a/css/chat_style-TheEncrypted777.css b/css/chat_style-TheEncrypted777.css index 7f37377d..e1f37839 100644 --- a/css/chat_style-TheEncrypted777.css +++ b/css/chat_style-TheEncrypted777.css @@ -38,10 +38,6 @@ text-shadow: 2px 2px 2px rgb(0 0 0 / 40%); } -.text p { - margin-top: 2px; -} - .username { padding-left: 10px; font-size: 22px; @@ -135,7 +131,7 @@ } } -/* Standard spacing */ +/* Standard spacing from instruct style */ .chat .message-body :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -147,17 +143,3 @@ .chat .message-body :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.chat .message-body ul, .chat .message-body ol { - padding-inline-start: 2em; -} - -.message-body li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} diff --git a/css/chat_style-cai-chat.css b/css/chat_style-cai-chat.css index d2e8f44a..ef1f1f62 100644 --- a/css/chat_style-cai-chat.css +++ b/css/chat_style-cai-chat.css @@ -9,11 +9,6 @@ line-height: 22.5px !important; } -.message-body { - margin-top: 3px; - font-size: 15px !important; -} - .circle-you { width: 50px; height: 50px; @@ -61,7 +56,7 @@ font-weight: 500; } -/* Standard spacing */ +/* Standard spacing from instruct style */ .chat .message-body :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -73,17 +68,3 @@ .chat .message-body :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.chat .message-body ul, .chat .message-body ol { - padding-inline-start: 2em; -} - -.message-body li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} diff --git a/css/chat_style-messenger.css b/css/chat_style-messenger.css index a6189a4a..b6da2bb2 100644 --- a/css/chat_style-messenger.css +++ b/css/chat_style-messenger.css @@ -68,17 +68,10 @@ max-width: 80%; } -.text p { - margin-top: 5px; -} - .username { font-weight: bold; } -.message-body { -} - .message-body img { max-width: 300px; max-height: 300px; @@ -99,7 +92,7 @@ color: rgb(110 110 110) !important; } -/* Standard spacing */ +/* Standard spacing from instruct style */ .chat .message-body :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -111,17 +104,3 @@ .chat .message-body :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.chat .message-body ul, .chat .message-body ol { - padding-inline-start: 2em; -} - -.message-body li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} diff --git a/css/chat_style-wpp.css b/css/chat_style-wpp.css index c86e577d..d11172ef 100644 --- a/css/chat_style-wpp.css +++ b/css/chat_style-wpp.css @@ -83,10 +83,6 @@ font-weight: 400; } -.message-body p:first-child { - margin-top: 0 !important; -} - .dark .message-body p em { color: rgb(170 170 170) !important; } @@ -100,7 +96,7 @@ margin-top: 8px; } -/* Standard spacing */ +/* Standard spacing from instruct style */ .chat .message-body :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -112,17 +108,3 @@ .chat .message-body :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.chat .message-body ul, .chat .message-body ol { - padding-inline-start: 2em; -} - -.message-body li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} diff --git a/css/html_readable_style.css b/css/html_readable_style.css index 74a913e9..74f69b73 100644 --- a/css/html_readable_style.css +++ b/css/html_readable_style.css @@ -31,7 +31,7 @@ font-size: 14px; } -/* Standard spacing */ +/* Standard spacing from instruct style */ .readable-container :is(p, ul, ol) { margin: 1.25em 0 !important; } @@ -43,13 +43,3 @@ .readable-container :is(p, ul, ol):last-child { margin-bottom: 0 !important; } - -.readable-container ul, .readable-container ol { - padding-inline-start: 2em; -} - -.readable-container li { - list-style-position: outside; - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} From 42191a36abe90b09b984bafbc552c62b951e7eef Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 8 Jul 2025 07:08:23 -0700 Subject: [PATCH 3/8] Keep navigation icons visible when switching versions --- js/main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/main.js b/js/main.js index e5b14d8e..138569c0 100644 --- a/js/main.js +++ b/js/main.js @@ -147,11 +147,15 @@ window.isScrolled = false; let scrollTimeout; targetElement.addEventListener("scroll", function() { - // Add scrolling class to disable hover effects - targetElement.classList.add("scrolling"); - let diff = targetElement.scrollHeight - targetElement.clientHeight; - if(Math.abs(targetElement.scrollTop - diff) <= 10 || diff == 0) { + let isAtBottomNow = Math.abs(targetElement.scrollTop - diff) <= 10 || diff == 0; + + // Add scrolling class to disable hover effects + if (window.isScrolled || !isAtBottomNow) { + targetElement.classList.add("scrolling"); + } + + if(isAtBottomNow) { window.isScrolled = false; } else { window.isScrolled = true; @@ -163,7 +167,6 @@ targetElement.addEventListener("scroll", function() { targetElement.classList.remove("scrolling"); doSyntaxHighlighting(); // Only run after scrolling stops }, 150); - }); // Create a MutationObserver instance From 93e08c0d4a435734ada5d9f948371941d1a234be Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:59:29 -0700 Subject: [PATCH 4/8] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 466e4edb..c80dacde 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Its goal is to become the [AUTOMATIC1111/stable-diffusion-webui](https://github. - **File attachments**: Upload text files, PDF documents, and .docx documents to talk about their contents. - **Web search**: Optionally search the internet with LLM-generated queries to add context to the conversation. - Aesthetic UI with dark and light themes. +- Syntax highlighting for code blocks and LaTeX rendering for mathematical expressions. - `instruct` mode for instruction-following (like ChatGPT), and `chat-instruct`/`chat` modes for talking to custom characters. - Automatic prompt formatting using Jinja2 templates. You don't need to ever worry about prompt formats. - Edit messages, navigate between message versions, and branch conversations at any point. From 2f544fe199be17cc60016abbd64d248e0c64c354 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:02:42 -0700 Subject: [PATCH 5/8] Update the keyboard shortcuts documentation --- docs/13 - Keyboard Shortcuts.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/13 - Keyboard Shortcuts.md b/docs/13 - Keyboard Shortcuts.md index b48c7da7..3ba48423 100644 --- a/docs/13 - Keyboard Shortcuts.md +++ b/docs/13 - Keyboard Shortcuts.md @@ -5,7 +5,6 @@ | Shortcut | Description | |-------------------------|--------------------------------------------------| | Esc | Stop generation | -| Tab | Switch between current tab and Parameters tab | #### Chat tab @@ -15,6 +14,6 @@ | Ctrl + Enter | Regenerate | | Alt + Enter | Continue | | Ctrl + Shift + Backspace| Remove last | -| Ctrl + Shift + K | Copy last | -| Ctrl + Shift + L | Replace last | | Ctrl + Shift + M | Impersonate | +| ← (Left Arrow) | Navigate to previous version of last assistant message | +| → (Right Arrow) | Navigate to next version of last assistant message (or regenerate if at latest version) | From 3e24a127c7b0193ef5a211750f1d5ffcd6a15de8 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 8 Jul 2025 09:13:11 -0700 Subject: [PATCH 6/8] Remove more unnecessary files from portable builds --- .github/workflows/build-portable-release-cuda.yml | 3 ++- .github/workflows/build-portable-release-vulkan.yml | 5 ++++- .github/workflows/build-portable-release.yml | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-portable-release-cuda.yml b/.github/workflows/build-portable-release-cuda.yml index 82ca6536..2d2685dd 100644 --- a/.github/workflows/build-portable-release-cuda.yml +++ b/.github/workflows/build-portable-release-cuda.yml @@ -107,7 +107,7 @@ jobs: cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" cd "text-generation-webui-${VERSION_CLEAN}" - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore + # Remove extensions that need additional requirements allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -163,6 +163,7 @@ jobs: if [[ "$CUDA_VERSION" == "11.7" ]]; then rm requirements_cuda_temp.txt fi + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore requirements/ one_click.py # 6. Create ZIP file cd .. diff --git a/.github/workflows/build-portable-release-vulkan.yml b/.github/workflows/build-portable-release-vulkan.yml index 62e8b669..d275460b 100644 --- a/.github/workflows/build-portable-release-vulkan.yml +++ b/.github/workflows/build-portable-release-vulkan.yml @@ -106,7 +106,7 @@ jobs: cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" cd "text-generation-webui-${VERSION_CLEAN}" - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore + # Remove extensions that need additional requirements allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -150,6 +150,9 @@ jobs: echo "Installing Python packages from $REQ_FILE..." $PIP_PATH install --target="./$PACKAGES_PATH" -r "$REQ_FILE" + # 5. Clean up + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore requirements/ one_click.py + # 6. Create ZIP file cd .. ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip" diff --git a/.github/workflows/build-portable-release.yml b/.github/workflows/build-portable-release.yml index 3d6734af..51567ec8 100644 --- a/.github/workflows/build-portable-release.yml +++ b/.github/workflows/build-portable-release.yml @@ -106,7 +106,7 @@ jobs: cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" cd "text-generation-webui-${VERSION_CLEAN}" - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore + # Remove extensions that need additional requirements allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -176,7 +176,10 @@ jobs: echo "Installing Python packages from $REQ_FILE..." $PIP_PATH install --target="./$PACKAGES_PATH" -r "$REQ_FILE" - # 5. Create ZIP file + # 5. Clean up + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg .github .gitignore requirements/ one_click.py + + # 6. Create ZIP file cd .. ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip" echo "Creating archive: $ZIP_NAME" From cd5d867b62fac8a20ada2c0f879397436f5d148f Mon Sep 17 00:00:00 2001 From: Cats <42129397+Cats1337@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:54:38 -0700 Subject: [PATCH 7/8] docs: Add Mirostat Explanation (#7128) --- docs/03 - Parameters Tab.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/03 - Parameters Tab.md b/docs/03 - Parameters Tab.md index 06eebe50..8c758ce6 100644 --- a/docs/03 - Parameters Tab.md +++ b/docs/03 - Parameters Tab.md @@ -51,10 +51,12 @@ For more information about the parameters, the [transformers documentation](http * **guidance_scale**: The main parameter for Classifier-Free Guidance (CFG). [The paper](https://arxiv.org/pdf/2306.17806.pdf) suggests that 1.5 is a good value. It can be used in conjunction with a negative prompt or not. * **Negative prompt**: Only used when `guidance_scale != 1`. It is most useful for instruct models and custom system messages. You place your full prompt in this field with the system message replaced with the default one for the model (like "You are Llama, a helpful assistant...") to make the model pay more attention to your custom system message. * **penalty_alpha**: Contrastive Search is enabled by setting this to greater than zero and unchecking "do_sample". It should be used with a low value of top_k, for instance, top_k = 4. -* **mirostat_mode**: Activates the Mirostat sampling technique. It aims to control perplexity during sampling. See the [paper](https://arxiv.org/abs/2007.14966). -* **mirostat_tau**: No idea, see the paper for details. According to the Preset Arena, 8 is a good value. -* **mirostat_eta**: No idea, see the paper for details. According to the Preset Arena, 0.1 is a good value. -* **dynamic_temperature**: Activates Dynamic Temperature. This modifies temperature to range between "dynatemp_low" (minimum) and "dynatemp_high" (maximum), with an entropy-based scaling. The steepness of the curve is controlled by "dynatemp_exponent". +* **mirostat_mode**: Activates Mirostat sampling, an adaptive decoding method that dynamically controls output perplexity for higher-quality text generation. 0 is disabled. 1 is the classic Mirostat algorithm described in [the paper](https://arxiv.org/abs/2007.14966), but can be less stable, or “wobbly,” and produce less coherent text. 2 is the improved version that is more stable and has lower perplexity, recommended for most use cases. +*Note: Use either mirostat or dynamic_temperature, not both at the same time.* +* **mirostat_tau**: Target perplexity for Mirostat sampling. Controls how “surprising” the text is. Higher values = more diverse, lower = more predictable. Preset Arena suggests 8 as a good value. +* **mirostat_eta**: Learning rate for Mirostat’s perplexity adjustment. Higher values = adapts faster but less stable, lower values = slower but more stable. Preset Arena suggests 0.1 as a good value. +* **dynamic_temperature**: Activates Dynamic Temperature. This modifies temperature to range between "dynatemp_low" (minimum) and "dynatemp_high" (maximum), with an entropy-based scaling. The steepness of the curve is controlled by "dynatemp_exponent". +*Note: Use either dynamic_temperature or mirostat, not both at the same time.* * **smoothing_factor**: Activates Quadratic Sampling. When `0 < smoothing_factor < 1`, the logits distribution becomes flatter. When `smoothing_factor > 1`, it becomes more peaked. * **temperature_last**: Makes temperature the last sampler instead of the first. With this, you can remove low probability tokens with a sampler like min_p and then use a high temperature to make the model creative without losing coherency. Note: this parameter takes precedence over "Sampler priority". That means that `temperature`/`dynamic_temperature`/`quadratic_sampling` will be removed from wherever they are and moved to the end of the stack. * **do_sample**: When unchecked, sampling is entirely disabled, and greedy decoding is used instead (the most likely token is always picked). From d1e9301a43795abb56a46c63f6a5108ccbb80588 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 8 Jul 2025 19:57:25 -0700 Subject: [PATCH 8/8] Remove fragile js from 9a58964834833e37fc830f06f4d4a87a142d4179 --- js/main.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/js/main.js b/js/main.js index 138569c0..e0f9314d 100644 --- a/js/main.js +++ b/js/main.js @@ -1052,45 +1052,6 @@ new MutationObserver(() => addMiniDeletes()).observe( ); addMiniDeletes(); -//------------------------------------------------ -// Maintain distance from bottom when input height changes -//------------------------------------------------ -let wasAtBottom = false; -let preservedDistance = 0; - -function checkIfAtBottom() { - const distanceFromBottom = targetElement.scrollHeight - targetElement.scrollTop - targetElement.clientHeight; - wasAtBottom = distanceFromBottom <= 1; // Allow for rounding errors -} - -function preserveScrollPosition() { - preservedDistance = targetElement.scrollHeight - targetElement.scrollTop - targetElement.clientHeight; -} - -function restoreScrollPosition() { - if (wasAtBottom) { - // Force to bottom - targetElement.scrollTop = targetElement.scrollHeight - targetElement.clientHeight; - } else { - // Restore original distance - targetElement.scrollTop = targetElement.scrollHeight - targetElement.clientHeight - preservedDistance; - } -} - -// Check position before input -chatInput.addEventListener("beforeinput", () => { - checkIfAtBottom(); - preserveScrollPosition(); -}); - -// Restore after input -chatInput.addEventListener("input", () => { - requestAnimationFrame(() => restoreScrollPosition()); -}); - -// Update wasAtBottom when user scrolls -targetElement.addEventListener("scroll", checkIfAtBottom); - //------------------------------------------------ // Fix autoscroll after fonts load //------------------------------------------------