# 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