#!/bin/bash set -xe unset_proxy() { unset http_proxy https_proxy } if [ -z $1 ]; then echo "An error happend, model name must be provided, usage: bash scripts/download_model.sh " echo "Currently only supports: llama-7b, llama-13b, llama-65b, llama2-70b, chatglm-6b, chatglm2-6b, chatglm3-6b, baichuan-7b, baichuan-13b, baichuan2-7b, baichuan2-13b, bloom, gpt-neox-20b, qwen-7b, qwen-14b, qwen-72b and gptj-6b" exit 1 fi unset_proxy # Download the model if [ ! -d downloads ]; then mkdir -p downloads fi if [ ! -f downloads/$1.tar.gz ]; then pushd downloads wget -q https://klx-llm.fsh.bcebos.com/pretrained_models/$1.tar.gz && tar -I pigz -xf $1.tar.gz popd fi