mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 14:45:28 +00:00
Update llama.cpp, remove noavx2 builds, add ROCm Windows portable builds
This commit is contained in:
parent
d7dd533b99
commit
b8fcc8ea32
24 changed files with 64 additions and 362 deletions
|
|
@ -59,7 +59,6 @@ jobs:
|
|||
$matrix = @{
|
||||
'os' = @('ubuntu-22.04', 'windows-2022')
|
||||
'pyver' = @("3.13")
|
||||
'avx' = @("AVX2")
|
||||
'cuda' = @("12.4")
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +74,7 @@ jobs:
|
|||
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT
|
||||
|
||||
build_wheels:
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }} CPU ${{ matrix.avx }} CUDA ${{ matrix.cuda }}
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }} CUDA ${{ matrix.cuda }}
|
||||
needs: define_matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -84,7 +83,6 @@ jobs:
|
|||
run:
|
||||
shell: pwsh
|
||||
env:
|
||||
AVXVER: ${{ matrix.avx }}
|
||||
PCKGVER: ${{ inputs.version }}
|
||||
|
||||
steps:
|
||||
|
|
@ -113,7 +111,6 @@ jobs:
|
|||
|
||||
# Define common variables
|
||||
CUDA_VERSION="${{ matrix.cuda }}"
|
||||
AVX_SUPPORT="${{ matrix.avx }}"
|
||||
VERSION="${{ inputs.version }}"
|
||||
|
||||
# 1. Set platform-specific variables
|
||||
|
|
@ -138,16 +135,9 @@ jobs:
|
|||
tar -xzf python-build.tar.gz
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on AVX and CUDA
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
BASE_REQ_FILE="requirements/portable/requirements.txt"
|
||||
else
|
||||
BASE_REQ_FILE="requirements/portable/requirements_noavx2.txt"
|
||||
fi
|
||||
|
||||
# Create CUDA-specific requirements file if needed
|
||||
# 3. Prepare requirements file
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
REQ_FILE="$BASE_REQ_FILE"
|
||||
REQ_FILE="requirements/portable/requirements.txt"
|
||||
|
||||
# 4. Install packages
|
||||
echo "Installing Python packages from $REQ_FILE..."
|
||||
|
|
|
|||
|
|
@ -57,9 +57,8 @@ jobs:
|
|||
id: set-matrix
|
||||
run: |
|
||||
$matrix = @{
|
||||
'os' = @('ubuntu-22.04')
|
||||
'os' = @('ubuntu-22.04', 'windows-2022')
|
||||
'pyver' = @("3.13")
|
||||
'avx' = @("AVX2")
|
||||
}
|
||||
|
||||
if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})}
|
||||
|
|
@ -74,7 +73,7 @@ jobs:
|
|||
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT
|
||||
|
||||
build_wheels:
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }} CPU ${{ matrix.avx }}
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }}
|
||||
needs: define_matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -83,7 +82,6 @@ jobs:
|
|||
run:
|
||||
shell: pwsh
|
||||
env:
|
||||
AVXVER: ${{ matrix.avx }}
|
||||
PCKGVER: ${{ inputs.version }}
|
||||
|
||||
steps:
|
||||
|
|
@ -111,15 +109,22 @@ jobs:
|
|||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
# Define common variables
|
||||
AVX_SUPPORT="${{ matrix.avx }}"
|
||||
VERSION="${{ inputs.version }}"
|
||||
|
||||
# 1. Set platform-specific variables (Linux only for ROCm)
|
||||
PLATFORM="linux"
|
||||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20260303/cpython-3.13.12+20260303-x86_64-unknown-linux-gnu-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/bin/python -m pip"
|
||||
PACKAGES_PATH="portable_env/lib/python3.13/site-packages"
|
||||
rm start_macos.sh start_windows.bat
|
||||
# 1. Set platform-specific variables
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
PLATFORM="windows"
|
||||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20260303/cpython-3.13.12+20260303-x86_64-pc-windows-msvc-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/python.exe -m pip"
|
||||
PACKAGES_PATH="portable_env/Lib/site-packages"
|
||||
rm start_linux.sh start_macos.sh
|
||||
else
|
||||
PLATFORM="linux"
|
||||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20260303/cpython-3.13.12+20260303-x86_64-unknown-linux-gnu-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/bin/python -m pip"
|
||||
PACKAGES_PATH="portable_env/lib/python3.13/site-packages"
|
||||
rm start_macos.sh start_windows.bat
|
||||
fi
|
||||
|
||||
# 2. Download and extract Python
|
||||
cd ..
|
||||
|
|
@ -128,13 +133,8 @@ jobs:
|
|||
tar -xzf python-build.tar.gz
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on AVX
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
BASE_REQ_FILE="requirements/portable/requirements_amd.txt"
|
||||
else
|
||||
BASE_REQ_FILE="requirements/portable/requirements_amd_noavx2.txt"
|
||||
fi
|
||||
REQ_FILE="$BASE_REQ_FILE"
|
||||
# 3. Prepare requirements file
|
||||
REQ_FILE="requirements/portable/requirements_amd.txt"
|
||||
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
|
|
@ -150,7 +150,11 @@ jobs:
|
|||
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-rocm.zip"
|
||||
echo "Creating archive: $ZIP_NAME"
|
||||
|
||||
zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}"
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME"
|
||||
else
|
||||
zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}"
|
||||
fi
|
||||
|
||||
- name: Upload files to a GitHub release
|
||||
id: upload-release
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ jobs:
|
|||
$matrix = @{
|
||||
'os' = @('ubuntu-22.04', 'windows-2022')
|
||||
'pyver' = @("3.13")
|
||||
'avx' = @("AVX2")
|
||||
}
|
||||
|
||||
if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})}
|
||||
|
|
@ -74,7 +73,7 @@ jobs:
|
|||
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT
|
||||
|
||||
build_wheels:
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }} CPU ${{ matrix.avx }}
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }}
|
||||
needs: define_matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -83,7 +82,6 @@ jobs:
|
|||
run:
|
||||
shell: pwsh
|
||||
env:
|
||||
AVXVER: ${{ matrix.avx }}
|
||||
PCKGVER: ${{ inputs.version }}
|
||||
|
||||
steps:
|
||||
|
|
@ -111,7 +109,6 @@ jobs:
|
|||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
# Define common variables
|
||||
AVX_SUPPORT="${{ matrix.avx }}"
|
||||
VERSION="${{ inputs.version }}"
|
||||
|
||||
# 1. Set platform-specific variables
|
||||
|
|
@ -136,13 +133,8 @@ jobs:
|
|||
tar -xzf python-build.tar.gz
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on AVX
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
BASE_REQ_FILE="requirements/portable/requirements_vulkan.txt"
|
||||
else
|
||||
BASE_REQ_FILE="requirements/portable/requirements_vulkan_noavx2.txt"
|
||||
fi
|
||||
REQ_FILE="$BASE_REQ_FILE"
|
||||
# 3. Prepare requirements file
|
||||
REQ_FILE="requirements/portable/requirements_vulkan.txt"
|
||||
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
|
|
|
|||
14
.github/workflows/build-portable-release.yml
vendored
14
.github/workflows/build-portable-release.yml
vendored
|
|
@ -59,7 +59,6 @@ jobs:
|
|||
$matrix = @{
|
||||
'os' = @('ubuntu-22.04', 'windows-2022', 'macos-14')
|
||||
'pyver' = @("3.13")
|
||||
'avx' = @("AVX2")
|
||||
}
|
||||
|
||||
if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})}
|
||||
|
|
@ -74,7 +73,7 @@ jobs:
|
|||
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT
|
||||
|
||||
build_wheels:
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }} CPU ${{ matrix.avx }}
|
||||
name: ${{ matrix.os }} ${{ matrix.pyver }}
|
||||
needs: define_matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
@ -83,7 +82,6 @@ jobs:
|
|||
run:
|
||||
shell: pwsh
|
||||
env:
|
||||
AVXVER: ${{ matrix.avx }}
|
||||
PCKGVER: ${{ inputs.version }}
|
||||
|
||||
steps:
|
||||
|
|
@ -111,7 +109,6 @@ jobs:
|
|||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
# Define common variables
|
||||
AVX_SUPPORT="${{ matrix.avx }}"
|
||||
VERSION="${{ inputs.version }}"
|
||||
OS_TYPE="${{ matrix.os }}"
|
||||
|
||||
|
|
@ -151,7 +148,7 @@ jobs:
|
|||
tar -xzf python-build.tar.gz
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on platform and AVX
|
||||
# 3. Prepare requirements file based on platform
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
# Select requirements file based on platform
|
||||
|
|
@ -162,12 +159,7 @@ jobs:
|
|||
REQ_FILE="requirements/portable/requirements_apple_silicon.txt"
|
||||
fi
|
||||
else
|
||||
# For Windows and Linux, check AVX support
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
REQ_FILE="requirements/portable/requirements_cpu_only.txt"
|
||||
else
|
||||
REQ_FILE="requirements/portable/requirements_cpu_only_noavx2.txt"
|
||||
fi
|
||||
REQ_FILE="requirements/portable/requirements_cpu_only.txt"
|
||||
fi
|
||||
|
||||
echo "Using requirements file: $REQ_FILE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue