Spaces:
Runtime error
Runtime error
File size: 2,750 Bytes
4420226 b5ee7bb 1c32155 b5ee7bb 4420226 fdbd5f2 b5ee7bb 4420226 b42d1bb bc5d508 b42d1bb 4420226 b5ee7bb 4420226 b5ee7bb 0a78419 b5ee7bb cd6e6ed b5ee7bb ff09653 b8c6e4d 0a78419 b8c6e4d b5ee7bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # FROM ghcr.io/ggml-org/llama.cpp:server
# about 10tps
# RUN apt-get update && apt-get install wget -y && rm -rf /var/lib/apt/lists/*
# 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 /gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf
# RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf" -O /mtp-gemma-4-E2B-it.gguf
# RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf" -O /gemma-4-E2B-it-mmproj.gguf
# 90 s
# RUN curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf -o /gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf \
# && curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf -o /mtp-gemma-4-E2B-it.gguf \
# && curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf -o /gemma-4-E2B-it-mmproj.gguf
FROM alpine:latest
RUN apk add --no-cache curl aria2 && \
curl -LsSf https://llama.app/install.sh | sh && \
aria2c -c -x 16 -s 16 -k 1M https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf -d/ -o gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf \
&& aria2c -c -x 16 -s 16 -k 1M https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf -d/ -o mtp-gemma-4-E2B-it.gguf \
&& aria2c -c -x 16 -s 16 -k 1M https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf -d/ -o gemma-4-E2B-it-mmproj.gguf
# curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf -o /gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf \
# && curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf -o /mtp-gemma-4-E2B-it.gguf \
# && curl -sS -C - -L https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf -o /gemma-4-E2B-it-mmproj.gguf
ENTRYPOINT []
CMD [ \
"/root/.local/bin/llama", "serve", \
"-m", "/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf", \
"--spec-draft-model", "/mtp-gemma-4-E2B-it.gguf", \
"--mmproj", "/gemma-4-E2B-it-mmproj.gguf", \
"--port", "7860", \
"--host", "0.0.0.0", \
"-t", "2", \
"-tb", "2", \
"-fa", "on", \
"-ub", "128", \
"-b", "512", \
"--spec-type", "draft-mtp", \
"--spec-draft-n-max", "3", \
"-a", "gemma-4-e2b-it-qat-ud-q4" \
]
# let llama-server autodetect -t -tb: very slow
#
# 10 tps
# "-t", "2", \
# "-tb", "2", \
#
# 7.5 tps
# -fa on
# "-t", "2", \
# "-tb", "2", \
# 5 tps -fa off
# https://huggingface.co/spaces/Monster/gemma-4-E2B-it-GGUF/blob/main/Dockerfile |