text-generation-webui
text-generation-webui copied to clipboard
powershell install script
Ive written a Simple .PS1 script to install from scratch maybe you can add to the repo ??
Create a new conda environment
Invoke-Expression "conda create -n tg python=3.10.9" Invoke-Expression "conda activate tg"
Install packages
Invoke-Expression "pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117"
Clone the repository
Invoke-Expression "git clone https://github.com/oobabooga/text-generation-webui.git" Set-Location -Path ".\text-generation-webui"
Install requirements
Invoke-Expression "pip install -r requirements.txt"
GPU only:
Invoke-Expression "pip uninstall -y llama-cpp-python" $env:CMAKE_ARGS="-DLLAMA_CUBLAS=on" $env:FORCE_CMAKE="1" Invoke-Expression "pip install llama-cpp-python --no-cache-dir"
If you get: ERROR: Failed building wheel for llama-cpp-python
$env:CMAKE_ARGS="-DLLAMA_OPENBLAS=on" $env:FORCE_CMAKE="1" Invoke-Expression "pip install llama-cpp-python --no-cache-dir"
Put checker.py in your text-generation-webui folder
Invoke-Expression "python checker.py" #Make sure you have cuda and it is enabled
If you get CUDA Setup failed despite GPU being available.:
Invoke-Expression "pip install bitsandbytes-windows"
If you get AttributeError: module 'bitsandbytes.nn' has no attribute 'Linear4bit'. Did you mean: 'Linear8bitLt'?
Invoke-Expression "pip install git+https://github.com/huggingface/peft@27af2198225cbb9e049f548440f2bd0fba2204aa --force-reinstall --no-deps"
Run the server
Invoke-Expression "python server.py"