Created
January 9, 2026 05:02
-
-
Save mmguero/f7456921fb02cac8b992ebb0f60be163 to your computer and use it in GitHub Desktop.
run llama-server on a CPU-only box with a bunch of RAM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File: llama-server.sh | |
| #!/usr/bin/env bash | |
| # Paths | |
| LLAMA_BIN="./llama.cpp/build/bin/llama-server" | |
| MODELS_DIR="./models" | |
| # Network | |
| HOST="127.0.0.1" | |
| PORT="8081" | |
| # Global Performance Settings | |
| THREADS=4 | |
| BATCH_SIZE=256 | |
| CTX_SIZE=16384 | |
| taskset -c 0,1,2,3 \ | |
| "$LLAMA_BIN" \ | |
| --host "$HOST" \ | |
| --port "$PORT" \ | |
| --cpu-moe \ | |
| --n-gpu-layers 0 \ | |
| --mlock \ | |
| --threads "$THREADS" \ | |
| --batch-size "$BATCH_SIZE" \ | |
| --ctx-size "$CTX_SIZE" \ | |
| --cache-type-k q4_0 \ | |
| --cache-type-v q4_0 \ | |
| --models-dir "$MODELS_DIR" \ | |
| --models-max 1 \ | |
| --temp 0.3 \ | |
| --top-p 0.85 \ | |
| --api-prefix /v1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment