File size: 1,048 Bytes
33158af
 
d9f625a
33158af
6a68b24
d9f625a
2f41a6a
6a68b24
e9be6ec
d9f625a
6a68b24
d9f625a
 
e9be6ec
d9f625a
6a68b24
d9f625a
0aa6d68
e9be6ec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM ghcr.io/ggml-org/llama.cpp:server

RUN apt update && apt install -y wget ca-certificates && rm -rf /var/lib/apt/lists/*

# TARGET MODEL: Google Gemma 4 E2B Instruct QAT (Unsloth Dynamic Q4_K_XL — verified filename)
RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf" -O /model.gguf

# MTP DRAFTER: Official Gemma 4 E2B assistant (Q8_0 — smallest/fastest for CPU free tier, verified filename)
RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf" -O /draft.gguf

# Run the server (CPU-only, MTP speculative decoding enabled)
CMD ["-m", "/model.gguf", \
     "--port", "7860", "--host", "0.0.0.0", \
     "-t", "2", "--load-mode", "mlock", "-c", "4096", \
     "--jinja", "--flash-attn", "on", \
     "--cache-type-k", "q8_0", "--cache-type-v", "q8_0", \
     "--spec-type", "draft-mtp", "-md", "/draft.gguf", \
     "--spec-draft-n-max", "3", "--spec-draft-n-min", "0", \
     "--temp", "1.0", "--top-p", "0.95", "--top-k", "64"]