Merge pull request #7124 from oobabooga/dev

Merge dev branch
This commit is contained in:
oobabooga 2025-07-07 18:13:30 -03:00 committed by GitHub
commit e1034fc79e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 303 additions and 213 deletions

View file

@ -62,7 +62,7 @@ One-click installer details
### One-click-installer ### One-click-installer
The script uses Miniconda to set up a Conda environment in the `installer_files` folder. The script uses Miniforge to set up a Conda environment in the `installer_files` folder.
If you ever need to install something manually in the `installer_files` environment, you can launch an interactive shell using the cmd script: `cmd_linux.sh`, `cmd_windows.bat`, or `cmd_macos.sh`. If you ever need to install something manually in the `installer_files` environment, you can launch an interactive shell using the cmd script: `cmd_linux.sh`, `cmd_windows.bat`, or `cmd_macos.sh`.
@ -115,15 +115,17 @@ Manual full installation with conda or docker
#### 0. Install Conda #### 0. Install Conda
https://docs.conda.io/en/latest/miniconda.html https://github.com/conda-forge/miniforge
On Linux or WSL, it can be automatically installed with these two commands ([source](https://educe-ubc.github.io/conda.html)): On Linux or WSL, Miniforge can be automatically installed with these two commands:
``` ```
curl -sL "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > "Miniconda3.sh" curl -sL "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" > "Miniforge3.sh"
bash Miniconda3.sh bash Miniforge3.sh
``` ```
For other platforms, download from: https://github.com/conda-forge/miniforge/releases/latest
#### 1. Create a new conda environment #### 1. Create a new conda environment
``` ```
@ -135,12 +137,12 @@ conda activate textgen
| System | GPU | Command | | System | GPU | Command |
|--------|---------|---------| |--------|---------|---------|
| Linux/WSL | NVIDIA | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | | Linux/WSL | NVIDIA | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124` |
| Linux/WSL | CPU only | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu` | | Linux/WSL | CPU only | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cpu` |
| Linux | AMD | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/rocm6.2.4` | | Linux | AMD | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/rocm6.2.4` |
| MacOS + MPS | Any | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0` | | MacOS + MPS | Any | `pip3 install torch==2.6.0` |
| Windows | NVIDIA | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124` | | Windows | NVIDIA | `pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124` |
| Windows | CPU only | `pip3 install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0` | | Windows | CPU only | `pip3 install torch==2.6.0` |
The up-to-date commands can be found here: https://pytorch.org/get-started/locally/. The up-to-date commands can be found here: https://pytorch.org/get-started/locally/.
@ -181,9 +183,9 @@ python server.py
Then browse to Then browse to
`http://localhost:7860/?__theme=dark` `http://127.0.0.1:7860`
##### Manual install #### Manual install
The `requirements*.txt` above contain various wheels precompiled through GitHub Actions. If you wish to compile things manually, or if you need to because no suitable wheels are available for your hardware, you can use `requirements_nowheels.txt` and then install your desired loaders manually. The `requirements*.txt` above contain various wheels precompiled through GitHub Actions. If you wish to compile things manually, or if you need to because no suitable wheels are available for your hardware, you can use `requirements_nowheels.txt` and then install your desired loaders manually.

View file

@ -2,7 +2,7 @@
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null

View file

@ -2,7 +2,7 @@
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null

View file

@ -4,7 +4,7 @@ cd /D "%~dp0"
set PATH=%PATH%;%SystemRoot%\system32 set PATH=%PATH%;%SystemRoot%\system32
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
@rem fix failed install when installing to a separate drive @rem fix failed install when installing to a separate drive
set TMP=%cd%\installer_files set TMP=%cd%\installer_files
@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
set "CUDA_HOME=%CUDA_PATH%" set "CUDA_HOME=%CUDA_PATH%"
@rem activate installer env @rem activate installer env
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
@rem enter commands @rem enter commands
cmd /k "%*" cmd /k "%*"

View file

@ -365,10 +365,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
gap: 0; gap: 0;
} }
#chat-tab button#Generate, #chat-tab button#stop {
width: 89.3438px !important;
}
#chat-tab button, #notebook-tab button, #default-tab button { #chat-tab button, #notebook-tab button, #default-tab button {
min-width: 0 !important; min-width: 0 !important;
} }
@ -670,7 +666,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
position: absolute; position: absolute;
background-color: transparent; background-color: transparent;
left: 23px; left: 23px;
top: -5px; top: -25px;
padding: var(--block-padding); padding: var(--block-padding);
} }
@ -830,7 +826,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
#chat-input-row { #chat-input-row {
padding: 1rem; padding: 1rem;
padding-top: 0;
} }
#chat-input-row.bigchat { #chat-input-row.bigchat {
@ -1296,18 +1291,16 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
opacity: 1; opacity: 1;
} }
/* Disable message action hover effects during generation */ /* Disable message actions and version navigation hover effects during generation */
._generating .message:hover .message-actions, ._generating :is(.message, .user-message, .assistant-message):hover :is(.message-actions, .version-navigation) {
._generating .user-message:hover .message-actions,
._generating .assistant-message:hover .message-actions {
opacity: 0 !important; opacity: 0 !important;
pointer-events: none;
} }
/* Disable message action hover effects during scrolling */ /* Disable message actions and version navigation hover effects during scrolling */
.scrolling .message:hover .message-actions, .scrolling :is(.message, .user-message, .assistant-message):hover :is(.message-actions, .version-navigation) {
.scrolling .user-message:hover .message-actions,
.scrolling .assistant-message:hover .message-actions {
opacity: 0 !important; opacity: 0 !important;
pointer-events: none;
} }
.footer-button svg { .footer-button svg {
@ -1670,3 +1663,19 @@ button:focus {
#textbox-notebook span { #textbox-notebook span {
display: none; display: none;
} }
.chat-parent {
/* Optimize for scrolling performance */
will-change: scroll-position;
contain: layout style paint;
/* Ensure GPU acceleration */
transform: translateZ(0);
/* Prevent layout shifts */
overflow-anchor: none;
}
#chat-input span {
display: none;
}

View file

@ -1,8 +1,14 @@
# Extensions # Extensions
Extensions are defined by files named `script.py` inside subfolders of `text-generation-webui/extensions`. They are loaded at startup if the folder name is specified after the `--extensions` flag. Extensions are defined by files named `script.py` inside subfolders of either:
- `text-generation-webui/extensions`
- `text-generation-webui/user_data/extensions`
For instance, `extensions/silero_tts/script.py` gets loaded with `python server.py --extensions silero_tts`. They are loaded at startup if the folder name is specified after the `--extensions` flag.
For instance, `extensions/silero_tts/script.py` or `user_data/extensions/silero_tts/script.py` gets loaded with `python server.py --extensions silero_tts`.
**Note:** Extensions in `user_data/extensions/` take priority over those in `extensions/` when both exist with the same name.
## [text-generation-webui-extensions](https://github.com/oobabooga/text-generation-webui-extensions) ## [text-generation-webui-extensions](https://github.com/oobabooga/text-generation-webui-extensions)

View file

@ -27,9 +27,7 @@ document.querySelector(".header_bar").addEventListener("click", function(event)
this.style.marginBottom = chatVisible ? "0px" : "19px"; this.style.marginBottom = chatVisible ? "0px" : "19px";
if (chatVisible && !showControlsChecked) { if (chatVisible && !showControlsChecked) {
document.querySelectorAll( document.querySelectorAll("#extensions").forEach(element => {
"#chat-tab > div > :nth-child(1), #chat-tab > div > :nth-child(3), #chat-tab > div > :nth-child(4), #extensions"
).forEach(element => {
element.style.display = "none"; element.style.display = "none";
}); });
} }
@ -189,8 +187,11 @@ const observer = new MutationObserver(function(mutations) {
doSyntaxHighlighting(); doSyntaxHighlighting();
if (!window.isScrolled && !isScrollingClassOnly && targetElement.scrollTop !== targetElement.scrollHeight) { if (!window.isScrolled && !isScrollingClassOnly) {
targetElement.scrollTop = targetElement.scrollHeight; const maxScroll = targetElement.scrollHeight - targetElement.clientHeight;
if (maxScroll > 0 && targetElement.scrollTop < maxScroll - 1) {
targetElement.scrollTop = maxScroll;
}
} }
const chatElement = document.getElementById("chat"); const chatElement = document.getElementById("chat");
@ -199,10 +200,11 @@ const observer = new MutationObserver(function(mutations) {
const lastChild = messagesContainer?.lastElementChild; const lastChild = messagesContainer?.lastElementChild;
const prevSibling = lastChild?.previousElementSibling; const prevSibling = lastChild?.previousElementSibling;
if (lastChild && prevSibling) { if (lastChild && prevSibling) {
lastChild.style.setProperty("margin-bottom", // Add padding to the messages container to create room for the last message.
`max(0px, calc(max(70vh, 100vh - ${prevSibling.offsetHeight}px - 84px) - ${lastChild.offsetHeight}px))`, // The purpose of this is to avoid constant scrolling during streaming in
"important" // instruct mode.
); const bufferHeight = Math.max(0, Math.max(0.7 * window.innerHeight, window.innerHeight - prevSibling.offsetHeight - 84) - lastChild.offsetHeight);
messagesContainer.style.paddingBottom = `${bufferHeight}px`;
} }
} }
}); });
@ -1046,3 +1048,56 @@ new MutationObserver(() => addMiniDeletes()).observe(
{childList: true, subtree: true} {childList: true, subtree: true}
); );
addMiniDeletes(); 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
//------------------------------------------------
document.fonts.addEventListener("loadingdone", (event) => {
setTimeout(() => {
if (!window.isScrolled) {
const maxScroll = targetElement.scrollHeight - targetElement.clientHeight;
if (targetElement.scrollTop < maxScroll - 5) {
targetElement.scrollTop = maxScroll;
}
}
}, 50);
});

View file

@ -2,10 +2,10 @@ import importlib
import traceback import traceback
from functools import partial from functools import partial
from inspect import signature from inspect import signature
from pathlib import Path
import gradio as gr import gradio as gr
import extensions
import modules.shared as shared import modules.shared as shared
from modules.logging_colors import logger from modules.logging_colors import logger
@ -28,27 +28,47 @@ def apply_settings(extension, name):
def load_extensions(): def load_extensions():
global state, setup_called global state, setup_called
state = {} state = {}
for i, name in enumerate(shared.args.extensions): for i, name in enumerate(shared.args.extensions):
if name in available_extensions: if name not in available_extensions:
continue
if name != 'api': if name != 'api':
logger.info(f'Loading the extension "{name}"') logger.info(f'Loading the extension "{name}"')
try:
try:
extension = importlib.import_module(f"extensions.{name}.script")
except ModuleNotFoundError:
logger.error(f"Could not import the requirements for '{name}'. Make sure to install the requirements for the extension.\n\n* To install requirements for all available extensions, launch the\n update_wizard script for your OS and choose the B option.\n\n* To install the requirements for this extension alone, launch the\n cmd script for your OS and paste the following command in the\n terminal window that appears:\n\nLinux / Mac:\n\npip install -r extensions/{name}/requirements.txt --upgrade\n\nWindows:\n\npip install -r extensions\\{name}\\requirements.txt --upgrade\n")
raise
# Only run setup() and apply settings from settings.yaml once try:
# Prefer user extension, fall back to system extension
user_script_path = Path(f'user_data/extensions/{name}/script.py')
if user_script_path.exists():
extension = importlib.import_module(f"user_data.extensions.{name}.script")
else:
extension = importlib.import_module(f"extensions.{name}.script")
if extension not in setup_called: if extension not in setup_called:
apply_settings(extension, name) apply_settings(extension, name)
if hasattr(extension, "setup"): if hasattr(extension, "setup"):
extension.setup() extension.setup()
setup_called.add(extension) setup_called.add(extension)
state[name] = [True, i] state[name] = [True, i, extension] # Store extension object
except:
except ModuleNotFoundError:
extension_location = Path('user_data/extensions') / name if user_script_path.exists() else Path('extensions') / name
windows_path = str(extension_location).replace('/', '\\')
logger.error(
f"Could not import the requirements for '{name}'. Make sure to install the requirements for the extension.\n\n"
f"* To install requirements automatically, launch the update_wizard script for your OS and:\n\n"
f"1. Choose option B (Install/update extensions requirements)\n"
f"2. Select '{name}' from the extension list\n\n"
f"* To install requirements manually, launch the cmd script for your OS and paste the following command:\n\n"
f"Linux / Mac:\n\n"
f"pip install -r {extension_location}/requirements.txt --upgrade\n\n"
f"Windows:\n\n"
f"pip install -r {windows_path}\\requirements.txt --upgrade\n"
)
raise
except Exception:
logger.error(f'Failed to load the extension "{name}".') logger.error(f'Failed to load the extension "{name}".')
traceback.print_exc() traceback.print_exc()
@ -57,7 +77,7 @@ def load_extensions():
def iterator(): def iterator():
for name in sorted(state, key=lambda x: state[x][1]): for name in sorted(state, key=lambda x: state[x][1]):
if state[name][0]: if state[name][0]:
yield getattr(extensions, name).script, name yield state[name][2], name # Use stored extension object
# Extension functions that map string -> string # Extension functions that map string -> string

View file

@ -116,29 +116,29 @@ def extract_thinking_block(string):
THINK_START_TAG = "&lt;think&gt;" THINK_START_TAG = "&lt;think&gt;"
THINK_END_TAG = "&lt;/think&gt;" THINK_END_TAG = "&lt;/think&gt;"
# Look for opening tag # Look for think tag
start_pos = string.lstrip().find(THINK_START_TAG) start_pos = string.find(THINK_START_TAG)
if start_pos == -1: end_pos = string.find(THINK_END_TAG)
# Return if neither tag is in string
if start_pos == -1 and end_pos == -1:
return None, string return None, string
# Adjust start position to account for any leading whitespace # handle missing start or end tags
start_pos = string.find(THINK_START_TAG) if start_pos == -1:
thought_start = 0
# Find the content after the opening tag
content_start = start_pos + len(THINK_START_TAG)
# Look for closing tag
end_pos = string.find(THINK_END_TAG, content_start)
if end_pos != -1:
# Both tags found - extract content between them
thinking_content = string[content_start:end_pos]
remaining_content = string[end_pos + len(THINK_END_TAG):]
return thinking_content, remaining_content
else: else:
# Only opening tag found - everything else is thinking content thought_start = start_pos + len(THINK_START_TAG)
thinking_content = string[content_start:] if end_pos == -1:
return thinking_content, "" thought_end = len(string)
content_start = len(string)
else:
thought_end = end_pos
content_start = end_pos + len(THINK_END_TAG)
thinking_content = string[thought_start:thought_end]
remaining_content = string[content_start:]
return thinking_content, remaining_content
@functools.lru_cache(maxsize=None) @functools.lru_cache(maxsize=None)

View file

@ -23,7 +23,6 @@ def get_fallback_settings():
'truncation_length': shared.settings['truncation_length'], 'truncation_length': shared.settings['truncation_length'],
'truncation_length_info': shared.settings['truncation_length'], 'truncation_length_info': shared.settings['truncation_length'],
'skip_special_tokens': shared.settings['skip_special_tokens'], 'skip_special_tokens': shared.settings['skip_special_tokens'],
'custom_stopping_strings': shared.settings['custom_stopping_strings'],
} }

View file

@ -296,7 +296,7 @@ def gather_interface_values(*args):
shared.persistent_interface_state.pop('textbox') shared.persistent_interface_state.pop('textbox')
# Prevent history loss if backend is restarted but UI is not refreshed # Prevent history loss if backend is restarted but UI is not refreshed
if output['history'] is None and output['unique_id'] is not None: if (output['history'] is None or (len(output['history'].get('visible', [])) == 0 and len(output['history'].get('internal', [])) == 0)) and output['unique_id'] is not None:
output['history'] = load_history(output['unique_id'], output['character_menu'], output['mode']) output['history'] = load_history(output['unique_id'], output['character_menu'], output['mode'])
return output return output

View file

@ -19,8 +19,9 @@ def create_ui():
shared.gradio['Chat input'] = gr.State() shared.gradio['Chat input'] = gr.State()
shared.gradio['history'] = gr.State({'internal': [], 'visible': [], 'metadata': {}}) shared.gradio['history'] = gr.State({'internal': [], 'visible': [], 'metadata': {}})
shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer
with gr.Tab('Chat', id='Chat', elem_id='chat-tab'): with gr.Tab('Chat', elem_id='chat-tab'):
with gr.Row(elem_id='past-chats-row', elem_classes=['pretty_scrollbar']): with gr.Row(elem_id='past-chats-row', elem_classes=['pretty_scrollbar']):
with gr.Column(): with gr.Column():
with gr.Row(elem_id='past-chats-buttons'): with gr.Row(elem_id='past-chats-buttons'):
@ -47,7 +48,6 @@ def create_ui():
with gr.Row(): with gr.Row():
with gr.Column(elem_id='chat-col'): with gr.Column(elem_id='chat-col'):
shared.gradio['display'] = gr.JSON(value={}, visible=False) # Hidden buffer
shared.gradio['html_display'] = gr.HTML(value=chat_html_wrapper({'internal': [], 'visible': [], 'metadata': {}}, '', '', 'chat', 'cai-chat', '')['html'], visible=True) shared.gradio['html_display'] = gr.HTML(value=chat_html_wrapper({'internal': [], 'visible': [], 'metadata': {}}, '', '', 'chat', 'cai-chat', '')['html'], visible=True)
with gr.Row(elem_id="chat-input-row"): with gr.Row(elem_id="chat-input-row"):
with gr.Column(scale=1, elem_id='gr-hover-container'): with gr.Column(scale=1, elem_id='gr-hover-container'):
@ -60,7 +60,7 @@ def create_ui():
with gr.Column(scale=1, elem_id='generate-stop-container'): with gr.Column(scale=1, elem_id='generate-stop-container'):
with gr.Row(): with gr.Row():
shared.gradio['Stop'] = gr.Button('Stop', elem_id='stop', visible=False) shared.gradio['Stop'] = gr.Button('Stop', elem_id='stop', visible=False)
shared.gradio['Generate'] = gr.Button('Generate', elem_id='Generate', variant='primary') shared.gradio['Generate'] = gr.Button('Send', elem_id='Generate', variant='primary')
# Hover menu buttons # Hover menu buttons
with gr.Column(elem_id='chat-buttons'): with gr.Column(elem_id='chat-buttons'):
@ -78,9 +78,8 @@ def create_ui():
with gr.Row(): with gr.Row():
shared.gradio['start_with'] = gr.Textbox(label='Start reply with', placeholder='Sure thing!', value=shared.settings['start_with'], elem_classes=['add_scrollbar']) shared.gradio['start_with'] = gr.Textbox(label='Start reply with', placeholder='Sure thing!', value=shared.settings['start_with'], elem_classes=['add_scrollbar'])
with gr.Row(): shared.gradio['enable_thinking'] = gr.Checkbox(value=shared.settings['enable_thinking'], label='Enable thinking', info='Used by Qwen3 to toggle <think> mode.')
shared.gradio['enable_web_search'] = gr.Checkbox(value=shared.settings.get('enable_web_search', False), label='Activate web search', elem_id='web-search') shared.gradio['enable_web_search'] = gr.Checkbox(value=shared.settings.get('enable_web_search', False), label='Activate web search', elem_id='web-search')
with gr.Row(visible=shared.settings.get('enable_web_search', False)) as shared.gradio['web_search_row']: with gr.Row(visible=shared.settings.get('enable_web_search', False)) as shared.gradio['web_search_row']:
shared.gradio['web_search_pages'] = gr.Number(value=shared.settings.get('web_search_pages', 3), precision=0, label='Number of pages to download', minimum=1, maximum=10) shared.gradio['web_search_pages'] = gr.Number(value=shared.settings.get('web_search_pages', 3), precision=0, label='Number of pages to download', minimum=1, maximum=10)

View file

@ -130,6 +130,10 @@ def create_ui():
def create_event_handlers(): def create_event_handlers():
mu = shared.args.multi_user
if mu:
return
shared.gradio['loader'].change(loaders.make_loader_params_visible, gradio('loader'), gradio(loaders.get_all_params()), show_progress=False) shared.gradio['loader'].change(loaders.make_loader_params_visible, gradio('loader'), gradio(loaders.get_all_params()), show_progress=False)
# In this event handler, the interface state is read and updated # In this event handler, the interface state is read and updated

View file

@ -85,7 +85,6 @@ def create_ui():
shared.gradio['auto_max_new_tokens'] = gr.Checkbox(value=shared.settings['auto_max_new_tokens'], label='auto_max_new_tokens', info='Expand max_new_tokens to the available context length.') shared.gradio['auto_max_new_tokens'] = gr.Checkbox(value=shared.settings['auto_max_new_tokens'], label='auto_max_new_tokens', info='Expand max_new_tokens to the available context length.')
shared.gradio['ban_eos_token'] = gr.Checkbox(value=shared.settings['ban_eos_token'], label='Ban the eos_token', info='Forces the model to never end the generation prematurely.') shared.gradio['ban_eos_token'] = gr.Checkbox(value=shared.settings['ban_eos_token'], label='Ban the eos_token', info='Forces the model to never end the generation prematurely.')
shared.gradio['add_bos_token'] = gr.Checkbox(value=shared.settings['add_bos_token'], label='Add the bos_token to the beginning of prompts', info='Disabling this can make the replies more creative.') shared.gradio['add_bos_token'] = gr.Checkbox(value=shared.settings['add_bos_token'], label='Add the bos_token to the beginning of prompts', info='Disabling this can make the replies more creative.')
shared.gradio['enable_thinking'] = gr.Checkbox(value=shared.settings['enable_thinking'], label='Enable thinking', info='Used by Qwen3 to toggle <think> mode.')
shared.gradio['skip_special_tokens'] = gr.Checkbox(value=shared.settings['skip_special_tokens'], label='Skip special tokens', info='Some specific models need this unset.') shared.gradio['skip_special_tokens'] = gr.Checkbox(value=shared.settings['skip_special_tokens'], label='Skip special tokens', info='Some specific models need this unset.')
shared.gradio['stream'] = gr.Checkbox(value=shared.settings['stream'], label='Activate text streaming') shared.gradio['stream'] = gr.Checkbox(value=shared.settings['stream'], label='Activate text streaming')
shared.gradio['static_cache'] = gr.Checkbox(value=shared.settings['static_cache'], label='Static KV cache', info='Use a static cache for improved performance.') shared.gradio['static_cache'] = gr.Checkbox(value=shared.settings['static_cache'], label='Static KV cache', info='Use a static cache for improved performance.')

View file

@ -17,7 +17,7 @@ def create_ui():
with gr.Column(): with gr.Column():
gr.Markdown("## Extensions & flags") gr.Markdown("## Extensions & flags")
shared.gradio['save_settings'] = gr.Button('Save settings to user_data/settings.yaml', elem_classes='refresh-button', interactive=not mu) shared.gradio['save_settings'] = gr.Button('Save extensions settings to user_data/settings.yaml', elem_classes='refresh-button', interactive=not mu)
shared.gradio['reset_interface'] = gr.Button("Apply flags/extensions and restart", interactive=not mu) shared.gradio['reset_interface'] = gr.Button("Apply flags/extensions and restart", interactive=not mu)
with gr.Row(): with gr.Row():
with gr.Column(): with gr.Column():
@ -27,6 +27,7 @@ def create_ui():
shared.gradio['bool_menu'] = gr.CheckboxGroup(choices=get_boolean_arguments(), value=get_boolean_arguments(active=True), label="Boolean command-line flags", elem_classes='checkboxgroup-table') shared.gradio['bool_menu'] = gr.CheckboxGroup(choices=get_boolean_arguments(), value=get_boolean_arguments(active=True), label="Boolean command-line flags", elem_classes='checkboxgroup-table')
shared.gradio['theme_state'] = gr.Textbox(visible=False, value='dark' if shared.settings['dark_theme'] else 'light') shared.gradio['theme_state'] = gr.Textbox(visible=False, value='dark' if shared.settings['dark_theme'] else 'light')
if not mu:
shared.gradio['save_settings'].click( shared.gradio['save_settings'].click(
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
handle_save_settings, gradio('interface_state', 'preset_menu', 'extensions_menu', 'show_controls', 'theme_state'), gradio('save_contents', 'save_filename', 'save_root', 'file_saver'), show_progress=False) handle_save_settings, gradio('interface_state', 'preset_menu', 'extensions_menu', 'show_controls', 'theme_state'), gradio('save_contents', 'save_filename', 'save_root', 'file_saver'), show_progress=False)
@ -42,6 +43,7 @@ def create_ui():
) )
# Reset interface event # Reset interface event
if not mu:
shared.gradio['reset_interface'].click( shared.gradio['reset_interface'].click(
set_interface_arguments, gradio('extensions_menu', 'bool_menu'), None).then( set_interface_arguments, gradio('extensions_menu', 'bool_menu'), None).then(
None, None, None, js='() => {document.body.innerHTML=\'<h1 style="font-family:monospace;padding-top:20%;margin:0;height:100vh;color:lightgray;text-align:center;background:var(--body-background-fill)">Reloading...</h1>\'; setTimeout(function(){location.reload()},2500); return []}') None, None, None, js='() => {document.body.innerHTML=\'<h1 style="font-family:monospace;padding-top:20%;margin:0;height:100vh;color:lightgray;text-align:center;background:var(--body-background-fill)">Reloading...</h1>\'; setTimeout(function(){location.reload()},2500); return []}')

View file

@ -183,8 +183,18 @@ def get_available_instruction_templates():
def get_available_extensions(): def get_available_extensions():
extensions = sorted(set(map(lambda x: x.parts[1], Path('extensions').glob('*/script.py'))), key=natural_keys) # User extensions (higher priority)
return extensions user_extensions = []
user_ext_path = Path('user_data/extensions')
if user_ext_path.exists():
user_exts = map(lambda x: x.parts[2], user_ext_path.glob('*/script.py'))
user_extensions = sorted(set(user_exts), key=natural_keys)
# System extensions (excluding those overridden by user extensions)
system_exts = map(lambda x: x.parts[1], Path('extensions').glob('*/script.py'))
system_extensions = sorted(set(system_exts) - set(user_extensions), key=natural_keys)
return user_extensions + system_extensions
def get_available_loras(): def get_available_loras():

View file

@ -1,6 +1,9 @@
import concurrent.futures import concurrent.futures
import html
import re
from concurrent.futures import as_completed from concurrent.futures import as_completed
from datetime import datetime from datetime import datetime
from urllib.parse import quote_plus
import requests import requests
@ -44,19 +47,26 @@ def download_web_page(url, timeout=10):
return "" return ""
def perform_web_search(query, num_pages=3, max_workers=5): def perform_web_search(query, num_pages=3, max_workers=5, timeout=10):
"""Perform web search and return results with content""" """Perform web search and return results with content"""
from duckduckgo_search import DDGS
try: try:
with DDGS() as ddgs: # Use DuckDuckGo HTML search endpoint
results = list(ddgs.text(query, max_results=num_pages)) search_url = f"https://html.duckduckgo.com/html/?q={quote_plus(query)}"
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'}
response = requests.get(search_url, headers=headers, timeout=timeout)
response.raise_for_status()
# Extract results with regex
titles = re.findall(r'<a[^>]*class="[^"]*result__a[^"]*"[^>]*>(.*?)</a>', response.text, re.DOTALL)
urls = re.findall(r'<a[^>]*class="[^"]*result__url[^"]*"[^>]*>(.*?)</a>', response.text, re.DOTALL)
# Prepare download tasks # Prepare download tasks
download_tasks = [] download_tasks = []
for i, result in enumerate(results): for i in range(min(len(titles), len(urls), num_pages)):
url = result.get('href', '') url = f"https://{urls[i].strip()}"
title = result.get('title', f'Search Result {i+1}') title = re.sub(r'<[^>]+>', '', titles[i]).strip()
title = html.unescape(title)
download_tasks.append((url, title, i)) download_tasks.append((url, title, i))
search_results = [None] * len(download_tasks) # Pre-allocate to maintain order search_results = [None] * len(download_tasks) # Pre-allocate to maintain order

View file

@ -2,7 +2,6 @@ accelerate==1.5.*
bitsandbytes==0.45.* bitsandbytes==0.45.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -34,8 +33,8 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,7 +32,7 @@ sse-starlette==1.6.5
tiktoken tiktoken
# AMD wheels # AMD wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64"

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,7 +32,7 @@ sse-starlette==1.6.5
tiktoken tiktoken
# AMD wheels # AMD wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+rocm6.2.4.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl; platform_system != "Darwin" and platform_machine != "x86_64"

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,7 +32,7 @@ sse-starlette==1.6.5
tiktoken tiktoken
# Mac wheels # Mac wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,8 +32,8 @@ sse-starlette==1.6.5
tiktoken tiktoken
# Mac wheels # Mac wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4-py3-none-any.whl
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1-py3-none-any.whl

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,5 +32,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# llama.cpp (CPU only, AVX2) # llama.cpp (CPU only, AVX2)
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -33,5 +32,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# llama.cpp (CPU only, no AVX2) # llama.cpp (CPU only, no AVX2)
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -2,7 +2,6 @@ accelerate==1.5.*
bitsandbytes==0.45.* bitsandbytes==0.45.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -34,8 +33,8 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -2,7 +2,6 @@ accelerate==1.5.*
bitsandbytes==0.45.* bitsandbytes==0.45.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -34,8 +33,8 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/turboderp-org/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu128.torch2.7.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu128.torch2.7.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -2,7 +2,6 @@ accelerate==1.5.*
bitsandbytes==0.45.* bitsandbytes==0.45.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
@ -34,8 +33,8 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"
https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11" https://github.com/oobabooga/exllamav3/releases/download/v0.0.4/exllamav3-0.0.4+cu124.torch2.6.0-cp311-cp311-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" and python_version == "3.11"
https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11" https://github.com/turboderp-org/exllamav2/releases/download/v0.3.1/exllamav2-0.3.1+cu124.torch2.6.0-cp311-cp311-win_amd64.whl; platform_system == "Windows" and python_version == "3.11"

View file

@ -1,7 +1,6 @@
accelerate==1.5.* accelerate==1.5.*
colorama colorama
datasets datasets
duckduckgo_search==8.0.2
einops einops
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# Mac wheels # Mac wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_x86_64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,6 +18,6 @@ sse-starlette==1.6.5
tiktoken tiktoken
# Mac wheels # Mac wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_15_0_arm64.whl; platform_system == "Darwin" and platform_release >= "24.0.0" and platform_release < "25.0.0"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_14_0_arm64.whl; platform_system == "Darwin" and platform_release >= "23.0.0" and platform_release < "24.0.0"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0-py3-none-macosx_13_0_arm64.whl; platform_system == "Darwin" and platform_release >= "22.0.0" and platform_release < "23.0.0"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# llama.cpp (CPU only, AVX2) # llama.cpp (CPU only, AVX2)
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx2-py3-none-win_amd64.whl; platform_system == "Windows"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# llama.cpp (CPU only, no AVX2) # llama.cpp (CPU only, no AVX2)
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cpuavx-py3-none-win_amd64.whl; platform_system == "Windows"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+cu124avx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkan-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"

View file

@ -1,4 +1,3 @@
duckduckgo_search==8.0.2
fastapi==0.112.4 fastapi==0.112.4
gradio==4.37.* gradio==4.37.*
html2text==2025.4.15 html2text==2025.4.15
@ -19,5 +18,5 @@ sse-starlette==1.6.5
tiktoken tiktoken
# CUDA wheels # CUDA wheels
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-win_amd64.whl; platform_system == "Windows"
https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.20.0/llama_cpp_binaries-0.20.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64" https://github.com/oobabooga/llama-cpp-binaries/releases/download/v0.24.0/llama_cpp_binaries-0.24.0+vulkanavx-py3-none-linux_x86_64.whl; platform_system == "Linux" and platform_machine == "x86_64"

View file

@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then
exit $? exit $?
fi fi
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
@ -30,29 +30,29 @@ esac
INSTALL_DIR="$(pwd)/installer_files" INSTALL_DIR="$(pwd)/installer_files"
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda" CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
INSTALL_ENV_DIR="$(pwd)/installer_files/env" INSTALL_ENV_DIR="$(pwd)/installer_files/env"
MINICONDA_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-Linux-${OS_ARCH}.sh" MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-${OS_ARCH}.sh"
conda_exists="F" conda_exists="F"
# figure out whether git and conda needs to be installed # figure out whether git and conda needs to be installed
if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi
# (if necessary) install git and conda into a contained environment # (if necessary) install git and conda into a contained environment
# download miniconda # download miniforge
if [ "$conda_exists" == "F" ]; then if [ "$conda_exists" == "F" ]; then
echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh" echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh"
mkdir -p "$INSTALL_DIR" mkdir -p "$INSTALL_DIR"
curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh" curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh"
chmod u+x "$INSTALL_DIR/miniconda_installer.sh" chmod u+x "$INSTALL_DIR/miniforge_installer.sh"
bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX
# test the conda binary # test the conda binary
echo "Miniconda version:" echo "Miniforge version:"
"$CONDA_ROOT_PREFIX/bin/conda" --version "$CONDA_ROOT_PREFIX/bin/conda" --version
# delete the Miniconda installer # delete the Miniforge installer
rm "$INSTALL_DIR/miniconda_installer.sh" rm "$INSTALL_DIR/miniforge_installer.sh"
fi fi
# create the installer env # create the installer env

View file

@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then
exit $? exit $?
fi fi
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
@ -30,29 +30,29 @@ esac
INSTALL_DIR="$(pwd)/installer_files" INSTALL_DIR="$(pwd)/installer_files"
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda" CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
INSTALL_ENV_DIR="$(pwd)/installer_files/env" INSTALL_ENV_DIR="$(pwd)/installer_files/env"
MINICONDA_DOWNLOAD_URL="https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-MacOSX-${OS_ARCH}.sh" MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-${OS_ARCH}.sh"
conda_exists="F" conda_exists="F"
# figure out whether git and conda needs to be installed # figure out whether git and conda needs to be installed
if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi
# (if necessary) install git and conda into a contained environment # (if necessary) install git and conda into a contained environment
# download miniconda # download miniforge
if [ "$conda_exists" == "F" ]; then if [ "$conda_exists" == "F" ]; then
echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh" echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh"
mkdir -p "$INSTALL_DIR" mkdir -p "$INSTALL_DIR"
curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh" curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh"
chmod u+x "$INSTALL_DIR/miniconda_installer.sh" chmod u+x "$INSTALL_DIR/miniforge_installer.sh"
bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX
# test the conda binary # test the conda binary
echo "Miniconda version:" echo "Miniforge version:"
"$CONDA_ROOT_PREFIX/bin/conda" --version "$CONDA_ROOT_PREFIX/bin/conda" --version
# delete the Miniconda installer # delete the Miniforge installer
rm "$INSTALL_DIR/miniconda_installer.sh" rm "$INSTALL_DIR/miniforge_installer.sh"
fi fi
# create the installer env # create the installer env

View file

@ -16,7 +16,7 @@ if exist "portable_env" (
set PATH=%PATH%;%SystemRoot%\system32 set PATH=%PATH%;%SystemRoot%\system32
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
@rem Check for special characters in installation path @rem Check for special characters in installation path
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!"" set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
@ -36,8 +36,8 @@ set TEMP=%cd%\installer_files
set INSTALL_DIR=%cd%\installer_files set INSTALL_DIR=%cd%\installer_files
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
set INSTALL_ENV_DIR=%cd%\installer_files\env set INSTALL_ENV_DIR=%cd%\installer_files\env
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-py311_24.11.1-0-Windows-x86_64.exe set MINIFORGE_DOWNLOAD_URL=https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Windows-x86_64.exe
set MINICONDA_CHECKSUM=43dcbcc315ff91edf959e002cd2f1ede38c64b999fefcc951bccf2ed69c9e8bb set MINIFORGE_CHECKSUM=b48cd98430170983076dfb51769a6d37668176f59bf3b59c4b21ac4c9bc24f39
set conda_exists=F set conda_exists=F
@rem figure out whether git and conda needs to be installed @rem figure out whether git and conda needs to be installed
@ -47,40 +47,40 @@ if "%ERRORLEVEL%" EQU "0" set conda_exists=T
@rem (if necessary) install git and conda into a contained environment @rem (if necessary) install git and conda into a contained environment
@rem download conda @rem download conda
if "%conda_exists%" == "F" ( if "%conda_exists%" == "F" (
echo Downloading Miniconda from %MINICONDA_DOWNLOAD_URL% to %INSTALL_DIR%\miniconda_installer.exe echo Downloading Miniforge from %MINIFORGE_DOWNLOAD_URL% to %INSTALL_DIR%\miniforge_installer.exe
mkdir "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"
call curl -Lk "%MINICONDA_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniconda_installer.exe" || ( echo. && echo Miniconda failed to download. && goto end ) call curl -Lk "%MINIFORGE_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniforge_installer.exe" || ( echo. && echo Miniforge failed to download. && goto end )
@rem Try CertUtil first @rem Try CertUtil first
for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniconda_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINICONDA_CHECKSUM%"') do ( for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniforge_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINIFORGE_CHECKSUM%"') do (
set "output=%%a" set "output=%%a"
) )
@rem If CertUtil fails, try PowerShell @rem If CertUtil fails, try PowerShell
if not defined output ( if not defined output (
for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniconda_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINICONDA_CHECKSUM%''){echo true}"') do ( for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniforge_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINIFORGE_CHECKSUM%''){echo true}"') do (
set "output=%%a" set "output=%%a"
) )
) )
if not defined output ( if not defined output (
echo The checksum verification for miniconda_installer.exe has failed. echo The checksum verification for miniforge_installer.exe has failed.
del "%INSTALL_DIR%\miniconda_installer.exe" del "%INSTALL_DIR%\miniforge_installer.exe"
goto end goto end
) else ( ) else (
echo The checksum verification for miniconda_installer.exe has passed successfully. echo The checksum verification for miniforge_installer.exe has passed successfully.
) )
echo Installing Miniconda to %CONDA_ROOT_PREFIX% echo Installing Miniforge to %CONDA_ROOT_PREFIX%
start /wait "" "%INSTALL_DIR%\miniconda_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX% start /wait "" "%INSTALL_DIR%\miniforge_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX%
@rem test the conda binary @rem test the conda binary
echo Miniconda version: echo Miniforge version:
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniconda not found. && goto end ) call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniforge not found. && goto end )
@rem delete the Miniconda installer @rem delete the Miniforge installer
del "%INSTALL_DIR%\miniconda_installer.exe" del "%INSTALL_DIR%\miniforge_installer.exe"
) )
@rem create the installer env @rem create the installer env
@ -96,7 +96,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
set "CUDA_HOME=%CUDA_PATH%" set "CUDA_HOME=%CUDA_PATH%"
@rem activate installer env @rem activate installer env
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
@rem setup installer env @rem setup installer env
call python one_click.py %* call python one_click.py %*

View file

@ -2,7 +2,7 @@
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null

View file

@ -2,7 +2,7 @@
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
# deactivate existing conda envs as needed to avoid conflicts # deactivate existing conda envs as needed to avoid conflicts
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null { conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null

View file

@ -4,7 +4,7 @@ cd /D "%~dp0"
set PATH=%PATH%;%SystemRoot%\system32 set PATH=%PATH%;%SystemRoot%\system32
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
@rem fix failed install when installing to a separate drive @rem fix failed install when installing to a separate drive
set TMP=%cd%\installer_files set TMP=%cd%\installer_files
@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
set "CUDA_HOME=%CUDA_PATH%" set "CUDA_HOME=%CUDA_PATH%"
@rem activate installer env @rem activate installer env
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
@rem update installer env @rem update installer env
call python one_click.py --update-wizard && ( call python one_click.py --update-wizard && (

View file

@ -33,18 +33,14 @@
skip_special_tokens: false skip_special_tokens: false
.*alpaca-native-4bit: .*alpaca-native-4bit:
instruction_template: 'Alpaca' instruction_template: 'Alpaca'
custom_stopping_strings: '"### End"'
.*llava: .*llava:
instruction_template: 'LLaVA' instruction_template: 'LLaVA'
custom_stopping_strings: '"\n###"'
.*llava.*1.5: .*llava.*1.5:
instruction_template: 'Vicuna-v1.1' instruction_template: 'Vicuna-v1.1'
.*wizard.*mega: .*wizard.*mega:
instruction_template: 'Wizard-Mega' instruction_template: 'Wizard-Mega'
custom_stopping_strings: '"</s>"'
.*starchat-beta: .*starchat-beta:
instruction_template: 'Starchat-Beta' instruction_template: 'Starchat-Beta'
custom_stopping_strings: '"<|end|>"'
(?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable)(?!.*chinese).*vicuna: (?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable)(?!.*chinese).*vicuna:
instruction_template: 'Vicuna-v0' instruction_template: 'Vicuna-v0'
.*vicuna.*v0: .*vicuna.*v0:
@ -151,7 +147,6 @@
instruction_template: 'Alpaca' instruction_template: 'Alpaca'
.*(openorca-platypus2): .*(openorca-platypus2):
instruction_template: 'OpenOrca-Platypus2' instruction_template: 'OpenOrca-Platypus2'
custom_stopping_strings: '"### Instruction:", "### Response:"'
.*longchat: .*longchat:
instruction_template: 'Vicuna-v1.1' instruction_template: 'Vicuna-v1.1'
.*vicuna-33b: .*vicuna-33b: