chore: Refactor to using models dir instead of nested empty folders

This commit is contained in:
vuonghoainam 2023-09-12 16:59:12 +07:00
parent 6aae985a55
commit d75116abf0
3 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -2,5 +2,5 @@
.env .env
# Jan inference # Jan inference
jan-inference/llm/models/** models/**
error.log error.log

6
run.sh
View File

@ -32,6 +32,8 @@ progress() {
} }
step=1 step=1
mkdir -p models/
### macOS setup ### macOS setup
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
MAX_STEPS=13 MAX_STEPS=13
@ -124,10 +126,10 @@ progress 'cp -f sample.env .env' "Prepare .env file" $((step++))
### ###
### Download Model ### Download Model
if [ -f "jan-inference/llm/models/llama-2-7b.Q4_K_S.gguf" ]; then if [ -f "/models/llama-2-7b.Q4_K_S.gguf" ]; then
progress '' "Llama model - Installed" $((step++)) progress '' "Llama model - Installed" $((step++))
else else
progress 'wget https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_S.gguf -P jan-inference/llm/models' "Download Llama model" $((step++)) progress 'wget https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_S.gguf -P models' "Download Llama model" $((step++))
fi fi
### ###