Create a virtual environment and install the model
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
Login huggingface
Install model
hf download bmwlab-ntust/log_copilot_32b_with_rag --local-dir /home/dgx/johnson/models/log_copilot_32b
Start API Server
python3 -m vllm.entrypoints.openai.api_server \
--model /home/dgx/johnson/models/log_copilot_32b \
--max-model-len 4096 \
--dtype bfloat16 \
--port 8000
--gpu-memory-utilization 0.8
Testing API
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "/home/dgx/johnson/models/log_copilot_32b",
"messages": [
{"role": "user", "content": "Here is a snippet of OAI gNB error log: [ERROR] RRC Connection Reestablishment Reject. Which parameter configuration might be misconfigured, and how can I fix the gNB configuration?"}
],
"temperature": 0.2,
"max_tokens": 1024
}'
Monitoring GPU