ChatBot / app.py
AnishKumbhar's picture
Update app.py
037f494
raw
history blame
1.49 kB
output_dir = "/content/text-generation-webui/models/Llama-2-7b-Chat-GPTQ"
# Set the paths to the GPT-Q model files
config_json_path = os.path.join(output_dir, "config.json")
generation_config_json_path = os.path.join(output_dir, "generation_config.json")
special_tokens_map_json_path = os.path.join(output_dir, "special_tokens_map.json")
tokenizer_model_path = os.path.join(output_dir, "tokenizer.model")
tokenizer_config_json_path = os.path.join(output_dir, "tokenizer_config.json")
gptq_model_path = os.path.join(output_dir, "gptq_model-4bit-128g.safetensors")
# Change the directory to the output directory
os.chdir(output_dir)
# Download the GPT-Q model files
wget -O "${config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/config.json"
wget -O "${generation_config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/generation_config.json"
wget -O "${special_tokens_map_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/special_tokens_map.json"
wget -O "${tokenizer_model_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/resolve/main/tokenizer.model"
wget -O "${tokenizer_config_json_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/raw/main/tokenizer_config.json"
wget -O "${gptq_model_path}" "https://huggingface.co/4bit/Llama-2-7b-Chat-GPTQ/resolve/main/gptq_model-4bit-128g.safetensors"
# Start the text generation web UI
python server.py --share --chat --wbits 4 --groupsize 128 --model_type llama