Update entrypoint.sh
Browse files- entrypoint.sh +10 -13
entrypoint.sh
CHANGED
|
@@ -1,28 +1,25 @@
|
|
| 1 |
#!/bin/sh
|
| 2 |
set -eu
|
| 3 |
|
| 4 |
-
MODEL_SPEC="${MODEL_SPEC:-
|
| 5 |
HOST="${HOST:-0.0.0.0}"
|
| 6 |
PORT="${PORT:-7860}"
|
| 7 |
CTX_SIZE="${CTX_SIZE:-8192}"
|
| 8 |
THREADS="${THREADS:-2}"
|
| 9 |
PARALLEL="${PARALLEL:-1}"
|
| 10 |
-
REASONING_MODE="${REASONING_MODE:-
|
| 11 |
-
CACHE_TYPE_K="${CACHE_TYPE_K:-
|
| 12 |
-
CACHE_TYPE_V="${CACHE_TYPE_V:-
|
| 13 |
-
FLASH_ATTN="${FLASH_ATTN:-
|
| 14 |
-
SPEC_TYPE="${SPEC_TYPE:-
|
| 15 |
|
| 16 |
# NOTE: the b8840 CPU build does not support draft-mtp (needs a newer
|
| 17 |
-
# llama.cpp build than this image ships).
|
| 18 |
-
#
|
| 19 |
-
#
|
| 20 |
-
#
|
| 21 |
-
# it's zero-cost on accuracy) — set SPEC_TYPE=ngram-cache as a Space secret
|
| 22 |
-
# to try it.
|
| 23 |
SPEC_FLAGS="--spec-type $SPEC_TYPE"
|
| 24 |
|
| 25 |
-
|
| 26 |
exec /app/llama-server \
|
| 27 |
-hf "$MODEL_SPEC" \
|
| 28 |
--host "$HOST" \
|
|
|
|
| 1 |
#!/bin/sh
|
| 2 |
set -eu
|
| 3 |
|
| 4 |
+
MODEL_SPEC="${MODEL_SPEC:-unsloth/gemma-4-E2B-it-qat-GGUF:UD-Q4_K_XL}"
|
| 5 |
HOST="${HOST:-0.0.0.0}"
|
| 6 |
PORT="${PORT:-7860}"
|
| 7 |
CTX_SIZE="${CTX_SIZE:-8192}"
|
| 8 |
THREADS="${THREADS:-2}"
|
| 9 |
PARALLEL="${PARALLEL:-1}"
|
| 10 |
+
REASONING_MODE="${REASONING_MODE:-off}"
|
| 11 |
+
CACHE_TYPE_K="${CACHE_TYPE_K:-q8_0}"
|
| 12 |
+
CACHE_TYPE_V="${CACHE_TYPE_V:-q8_0}"
|
| 13 |
+
FLASH_ATTN="${FLASH_ATTN:-on}"
|
| 14 |
+
SPEC_TYPE="${SPEC_TYPE:-ngram-cache}"
|
| 15 |
|
| 16 |
# NOTE: the b8840 CPU build does not support draft-mtp (needs a newer
|
| 17 |
+
# llama.cpp build than this image ships). ngram-cache is a self-speculation
|
| 18 |
+
# mode that needs no external draft model: it speculates from n-grams already
|
| 19 |
+
# seen in context/output, verified by the target model, so it's zero-cost on
|
| 20 |
+
# accuracy. Set SPEC_TYPE=none in Space secrets to disable entirely.
|
|
|
|
|
|
|
| 21 |
SPEC_FLAGS="--spec-type $SPEC_TYPE"
|
| 22 |
|
|
|
|
| 23 |
exec /app/llama-server \
|
| 24 |
-hf "$MODEL_SPEC" \
|
| 25 |
--host "$HOST" \
|