Skip to content

Commit adc2003

Browse files
committed
Merge branch 'main' of github.com:oobabooga/text-generation-webui
2 parents 20f5b45 + 66e8d12 commit adc2003

File tree

1 file changed

+49
-26
lines changed

1 file changed

+49
-26
lines changed

README.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Its goal is to become the [AUTOMATIC1111/stable-diffusion-webui](https://github.
2121
* Advanced chat features (send images, get audio responses with TTS).
2222
* Stream the text output in real time.
2323
* Load parameter presets from text files.
24-
* Load large models in 8-bit mode (see [here](https://github.com/oobabooga/text-generation-webui/issues/147#issuecomment-1456040134), [here](https://github.com/oobabooga/text-generation-webui/issues/20#issuecomment-1411650652) and [here](https://www.reddit.com/r/PygmalionAI/comments/1115gom/running_pygmalion_6b_with_8gb_of_vram/) if you are on Windows).
24+
* Load large models in 8-bit mode.
2525
* Split large models across your GPU(s), CPU, and disk.
2626
* CPU mode.
2727
* [FlexGen offload](https://github.com/oobabooga/text-generation-webui/wiki/FlexGen).
@@ -34,39 +34,56 @@ Its goal is to become the [AUTOMATIC1111/stable-diffusion-webui](https://github.
3434
* [Extensions](https://github.com/oobabooga/text-generation-webui/wiki/Extensions).
3535
* [Works on Google Colab](https://github.com/oobabooga/text-generation-webui/wiki/Running-on-Colab).
3636

37-
## Installation option 1: conda
37+
## Installation
3838

39-
Open a terminal and copy and paste these commands one at a time ([install conda](https://docs.conda.io/en/latest/miniconda.html) first if you don't have it already):
39+
The recommended installation methods are the following:
40+
41+
* Linux and MacOS: using conda natively.
42+
* Windows: using conda on WSL ([WSL installation guide](https://github.com/oobabooga/text-generation-webui/wiki/Windows-Subsystem-for-Linux-(Ubuntu)-Installation-Guide)).
43+
44+
Conda can be downloaded here: https://docs.conda.io/en/latest/miniconda.html
45+
46+
On Linux or WSL, it can be installed with these two commands:
4047

4148
```
42-
conda create -n textgen
43-
conda activate textgen
44-
conda install torchvision=0.14.1 torchaudio=0.13.1 pytorch-cuda=11.7 git -c pytorch -c nvidia
45-
git clone https://github.com/oobabooga/text-generation-webui
46-
cd text-generation-webui
47-
pip install -r requirements.txt
49+
curl -sL "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > "Miniconda3.sh"
50+
bash Miniconda3.sh
4851
```
4952

50-
The third line assumes that you have an NVIDIA GPU.
53+
Source: https://educe-ubc.github.io/conda.html
5154

52-
* If you have an AMD GPU, replace the third command with this one:
55+
#### 1. Create a new conda environment
5356

5457
```
55-
pip3 install torch torchvision=0.14.1 torchaudio=0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
58+
conda create -n textgen python=3.10.9
59+
conda activate textgen
5660
```
57-
58-
* If you are running it in CPU mode, replace the third command with this one:
61+
62+
#### 2. Install Pytorch
63+
64+
| System | GPU | Command |
65+
|--------|---------|---------|
66+
| Linux/WSL | NVIDIA | `conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia` |
67+
| Linux | AMD | `pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2` |
68+
| MacOS + MPS (untested) | Any | `conda install pytorch torchvision torchaudio -c pytorch` |
69+
70+
The up to date commands can be found here: https://pytorch.org/get-started/locally/
71+
72+
#### 3. Install the web UI
5973

6074
```
61-
conda install pytorch torchvision=0.14.1 torchaudio=0.13.1 git -c pytorch
75+
git clone https://github.com/oobabooga/text-generation-webui
76+
cd text-generation-webui
77+
pip install -r requirements.txt
6278
```
6379

64-
> **Note**
65-
> 1. If you are on Windows, it may be easier to run the commands above in a WSL environment. The performance may also be better. A full guide can be found here: [Windows Subsystem for Linux (Ubuntu) Installation Guide
66-
](https://github.com/oobabooga/text-generation-webui/wiki/Windows-Subsystem-for-Linux-(Ubuntu)-Installation-Guide).
67-
> 2. For a more detailed, user-contributed guide, see: [Installation instructions for human beings](https://github.com/oobabooga/text-generation-webui/wiki/Installation-instructions-for-human-beings).
80+
If you experience bitsandbytes issues on WSL while trying to use `--load-in-8bit`, see this thread: https://github.com/microsoft/WSL/issues/5548#issuecomment-1292858815
81+
82+
### Alternative: native Windows installation
83+
84+
As an alternative to the recommended WSL method, you can install the web UI natively on Windows using this guide. It will be a lot harder and the performance may be slower: [Installation instructions for human beings](https://github.com/oobabooga/text-generation-webui/wiki/Installation-instructions-for-human-beings).
6885

69-
## Installation option 2: one-click installers
86+
### Alternative: one-click installers
7087

7188
[oobabooga-windows.zip](https://github.com/oobabooga/one-click-installers/archive/refs/heads/oobabooga-windows.zip)
7289

@@ -77,19 +94,25 @@ Just download the zip above, extract it, and double click on "install". The web
7794
* To download a model, double click on "download-model"
7895
* To start the web UI, double click on "start-webui"
7996

80-
## Downloading models
97+
Source codes: https://github.com/oobabooga/one-click-installers
98+
99+
This method lags behind the newest developments and does not support 8-bit mode on Windows without additional set up: https://github.com/oobabooga/text-generation-webui/issues/147#issuecomment-1456040134, https://github.com/oobabooga/text-generation-webui/issues/20#issuecomment-1411650652
81100

82-
Models should be placed under `models/model-name`. For instance, `models/gpt-j-6B` for [GPT-J 6B](https://huggingface.co/EleutherAI/gpt-j-6B/tree/main).
101+
### Alternative: Docker
83102

84-
#### Hugging Face
103+
https://github.com/oobabooga/text-generation-webui/issues/174, https://github.com/oobabooga/text-generation-webui/issues/87
104+
105+
## Downloading models
106+
107+
Models should be placed inside the `models` folder.
85108

86109
[Hugging Face](https://huggingface.co/models?pipeline_tag=text-generation&sort=downloads) is the main place to download models. These are some noteworthy examples:
87110

88-
* [GPT-J 6B](https://huggingface.co/EleutherAI/gpt-j-6B/tree/main)
89-
* [GPT-Neo](https://huggingface.co/models?pipeline_tag=text-generation&sort=downloads&search=eleutherai+%2F+gpt-neo)
90111
* [Pythia](https://huggingface.co/models?search=eleutherai/pythia)
91112
* [OPT](https://huggingface.co/models?search=facebook/opt)
92113
* [GALACTICA](https://huggingface.co/models?search=facebook/galactica)
114+
* [GPT-J 6B](https://huggingface.co/EleutherAI/gpt-j-6B/tree/main)
115+
* [GPT-Neo](https://huggingface.co/models?pipeline_tag=text-generation&sort=downloads&search=eleutherai+%2F+gpt-neo)
93116
* [\*-Erebus](https://huggingface.co/models?search=erebus) (NSFW)
94117
* [Pygmalion](https://huggingface.co/models?search=pygmalion) (NSFW)
95118

@@ -103,7 +126,7 @@ For instance:
103126

104127
If you want to download a model manually, note that all you need are the json, txt, and pytorch\*.bin (or model*.safetensors) files. The remaining files are not necessary.
105128

106-
#### GPT-4chan
129+
### GPT-4chan
107130

108131
[GPT-4chan](https://huggingface.co/ykilcher/gpt-4chan) has been shut down from Hugging Face, so you need to download it elsewhere. You have two options:
109132

0 commit comments

Comments
 (0)