test_gguf / start.sh
hsuwill000's picture
Update start.sh
fe6bc69 verified
raw
history blame contribute delete
949 Bytes
#!/bin/bash
set -e
export WORK="/home/user/app"
mkdir -p "$WORK"
cd "$WORK"
python3 -m venv venv
source venv/bin/activate
echo "[PYTHON] Installing dependencies..."
pip install --upgrade pip
pip install gradio openai "setuptools>=70.0.0" wheel flask
wget -q -O model.gguf https://huggingface.co/LiquidAI/LFM2-8B-A1B-GGUF/resolve/main/LFM2-8B-A1B-Q4_K_M.gguf
#wget -q -O model.gguf https://huggingface.co/DevQuasar/huihui-ai.Qwen3-16B-A3B-abliterated-GGUF/resolve/main/huihui-ai.Qwen3-16B-A3B-abliterated.Q4_K_M.gguf
unzip -o llama_cpp_avx512.zip > /dev/null 2>&1
echo "[LLAMA] 啟動伺服器..."
#nohup ./llama-server -m "$WORK/model.gguf" --port 8000 --host 0.0.0.0 --threads 2 --ctx-size 4096 --mlock --jinja --temp 1.1 --top-p 0.95 \
# > llama_server.log 2>&1 &
./llama-server -m "$WORK/model.gguf" --port 8000 --host 0.0.0.0 \
--threads 2 --ctx-size 4096 --mlock --jinja --temp 1.1 --top-p 0.95 &
sleep 3
cd "$WORK"
python3 app.py