Toaster496 commited on
Commit
b74a9ac
1 Parent(s): 9f057be

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ %cd /content
2
+ !apt-get -y install -qq aria2
3
+
4
+ !git clone -b v1.2 https://github.com/camenduru/text-generation-webui
5
+ %cd /content/text-generation-webui
6
+ !pip install -r requirements.txt
7
+ !pip install -U gradio==3.28.3
8
+
9
+ !mkdir /content/text-generation-webui/repositories
10
+ %cd /content/text-generation-webui/repositories
11
+ !git clone -b v1.2 https://github.com/camenduru/GPTQ-for-LLaMa.git
12
+ %cd GPTQ-for-LLaMa
13
+ !python setup_cuda.py install
14
+
15
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/raw/main/config.json -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o config.json
16
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/raw/main/generation_config.json -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o generation_config.json
17
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/raw/main/special_tokens_map.json -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o special_tokens_map.json
18
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/resolve/main/tokenizer.model -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o tokenizer.model
19
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/raw/main/tokenizer_config.json -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o tokenizer_config.json
20
+ !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4bit/gpt4-x-alpaca-13b-native-4bit-128g-cuda/resolve/main/4bit-128g.safetensors -d /content/text-generation-webui/models/gpt4-x-alpaca-13b-native-4bit-128g-cuda -o 4bit-128g.safetensors
21
+
22
+ %cd /content/text-generation-webui
23
+ !python server.py --share --chat --wbits 4 --groupsize 128 --model_type llama