ramedde commited on
Commit
8b15c4a
·
verified ·
1 Parent(s): 740bf6d

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -13
entrypoint.sh CHANGED
@@ -1,28 +1,25 @@
1
  #!/bin/sh
2
  set -eu
3
 
4
- MODEL_SPEC="${MODEL_SPEC:-owao/Nanbeige4.2-3B-GGUF:Q4_K_M}"
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:-auto}"
11
- CACHE_TYPE_K="${CACHE_TYPE_K:-f16}"
12
- CACHE_TYPE_V="${CACHE_TYPE_V:-f16}"
13
- FLASH_ATTN="${FLASH_ATTN:-off}"
14
- SPEC_TYPE="${SPEC_TYPE:-none}"
15
 
16
  # NOTE: the b8840 CPU build does not support draft-mtp (needs a newer
17
- # llama.cpp build than this image ships). Defaulting to "none" for a
18
- # guaranteed clean startup. If you want to experiment, ngram-cache is a
19
- # self-speculation mode needing no external draft model (speculates from
20
- # n-grams already seen in context/output, verified by the target model, so
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" \