Spaces:
Runtime error
Runtime error
Commit
·
11c22f2
1
Parent(s):
02a88a2
Update app.py
Browse files
app.py
CHANGED
@@ -1,28 +1 @@
|
|
1 |
-
output_dir = "/content/text-generation-webui/models/Llama-2-7b-Chat-GPTQ"
|
2 |
-
|
3 |
-
# Set the paths to the GPT-Q model files
|
4 |
-
config_json_path = os.path.join(output_dir, "config.json")
|
5 |
-
%cd /content
|
6 |
-
!apt-get -y install -qq aria2
|
7 |
-
|
8 |
-
!git clone -b v1.3 https://github.com/camenduru/text-generation-webui
|
9 |
-
%cd /content/text-generation-webui
|
10 |
-
!pip install -r requirements.txt
|
11 |
-
!pip install -U gradio==3.28.3
|
12 |
-
|
13 |
-
!mkdir /content/text-generation-webui/repositories
|
14 |
-
%cd /content/text-generation-webui/repositories
|
15 |
-
!git clone -b v1.2 https://github.com/camenduru/GPTQ-for-LLaMa.git
|
16 |
-
%cd GPTQ-for-LLaMa
|
17 |
-
!python setup_cuda.py install
|
18 |
-
|
19 |
-
# Download the GPT-Q model files
|
20 |
-
wget -O "${config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/config.json"
|
21 |
-
wget -O "${generation_config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/generation_config.json"
|
22 |
-
wget -O "${special_tokens_map_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/special_tokens_map.json"
|
23 |
-
wget -O "${tokenizer_model_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/resolve/main/tokenizer.model"
|
24 |
-
wget -O "${tokenizer_config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/tokenizer_config.json"
|
25 |
-
wget -O "${gptq_model_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/resolve/main/gptq_model-4bit-128g.safetensors"
|
26 |
-
|
27 |
-
# Start the text generation web UI
|
28 |
python server.py --share --chat --wbits 4 --groupsize 128 --model_type llama
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
python server.py --share --chat --wbits 4 --groupsize 128 --model_type llama
|