fix qwen3.8 deployment
This commit is contained in:
@@ -13,13 +13,13 @@ Ollama endpoint.
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `qwen3.8-27b` | Qwen3.8-27B with MTP | `Q4_K_M` primary, `Q4_0` draft, 196k context, q8_0 K/V cache | `llamacpp-qwen38-27b.llamacpp:80` |
|
| `qwen3.8-27b` | Qwen3.8-27B with MTP | `Q4_K_M` primary, `Q4_0` draft, 196k context, q8_0 K/V cache | `llamacpp-qwen38-27b.llamacpp:80` |
|
||||||
|
|
||||||
The active Deployment uses llama.cpp's Hugging Face downloader for both model
|
An initContainer downloads both model files atomically before llama-server
|
||||||
repositories:
|
starts:
|
||||||
|
|
||||||
- Primary: `ggml-org/Qwen3.8-27B-GGUF:Q4_K_M`
|
- Primary: `ggml-org/Qwen3.8-27B-GGUF:Q4_K_M`
|
||||||
- Draft: `ggml-org/Qwen3.8-27B-GGUF:Q4_0`
|
- Draft: `ggml-org/Qwen3.8-27B-GGUF:Q4_0`
|
||||||
|
|
||||||
The model cache is stored on the shared hostPath PVC at
|
The model files are stored on the shared hostPath PVC at
|
||||||
`/data/llamacpp/models` on the NUCBox. The server is configured with
|
`/data/llamacpp/models` on the NUCBox. The server is configured with
|
||||||
`--spec-default --spec-type draft-mtp`, `--reasoning-preserve`, `--fit off`,
|
`--spec-default --spec-type draft-mtp`, `--reasoning-preserve`, `--fit off`,
|
||||||
and `--agent`.
|
and `--agent`.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Qwen3.8-27B with MTP speculative decoding served by llama.cpp.
|
# Qwen3.8-27B with MTP speculative decoding served by llama.cpp.
|
||||||
# The primary and draft GGUFs are downloaded by llama-server into the shared
|
# The primary and draft GGUFs are downloaded by an initContainer into the
|
||||||
# persistent llama.cpp cache on the NUCBox Radeon 8060S.
|
# shared model PVC before llama-server starts.
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -27,15 +27,41 @@ spec:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/arch: amd64
|
kubernetes.io/arch: amd64
|
||||||
hardware: high-memory
|
hardware: high-memory
|
||||||
|
initContainers:
|
||||||
|
- name: fetch-models
|
||||||
|
image: alpine:3.20
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
apk add --no-cache curl
|
||||||
|
for entry in \
|
||||||
|
"https://huggingface.co/ggml-org/Qwen3.8-27B-GGUF/resolve/main/Qwen3.8-27B-Q4_K_M.gguf|Qwen3.8-27B-Q4_K_M.gguf" \
|
||||||
|
"https://huggingface.co/ggml-org/Qwen3.8-27B-GGUF/resolve/main/mtp-Qwen3.8-27B-Q4_0.gguf|mtp-Qwen3.8-27B-Q4_0.gguf"; do
|
||||||
|
url=${entry%%|*}
|
||||||
|
file=${entry##*|}
|
||||||
|
if [ -s "/models/$file" ]; then
|
||||||
|
echo "$file already present - skipping download."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Downloading $file ..."
|
||||||
|
curl -fL --retry 5 --retry-delay 5 -C - \
|
||||||
|
-o "/models/$file.partial" "$url"
|
||||||
|
mv "/models/$file.partial" "/models/$file"
|
||||||
|
echo "Download complete: $(ls -lh "/models/$file")"
|
||||||
|
done
|
||||||
|
volumeMounts:
|
||||||
|
- name: models
|
||||||
|
mountPath: /models
|
||||||
containers:
|
containers:
|
||||||
- name: llama-server
|
- name: llama-server
|
||||||
image: ghcr.io/ggml-org/llama.cpp:server-vulkan
|
image: ghcr.io/ggml-org/llama.cpp:server-vulkan
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- -hf
|
- -m
|
||||||
- ggml-org/Qwen3.8-27B-GGUF:Q4_K_M
|
- /models/Qwen3.8-27B-Q4_K_M.gguf
|
||||||
- -hfd
|
- --model-draft
|
||||||
- ggml-org/Qwen3.8-27B-GGUF:Q4_0
|
- /models/mtp-Qwen3.8-27B-Q4_0.gguf
|
||||||
- --spec-default
|
- --spec-default
|
||||||
- --spec-type
|
- --spec-type
|
||||||
- draft-mtp
|
- draft-mtp
|
||||||
@@ -79,14 +105,15 @@ spec:
|
|||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 8080
|
port: 8080
|
||||||
initialDelaySeconds: 180
|
initialDelaySeconds: 600
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
failureThreshold: 5
|
failureThreshold: 5
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: models
|
- name: models
|
||||||
mountPath: /root/.cache/llama.cpp
|
mountPath: /models
|
||||||
|
readOnly: true
|
||||||
- name: dri
|
- name: dri
|
||||||
mountPath: /dev/dri
|
mountPath: /dev/dri
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# IMPORTANT: capacity is only metadata for a hostPath volume — k8s does NOT
|
# IMPORTANT: capacity is only metadata for a hostPath volume — k8s does NOT
|
||||||
# enforce it and bumping it does NOT add physical disk space. The active Qwen
|
# enforce it and bumping it does NOT add physical disk space. The active Qwen
|
||||||
# primary and draft GGUFs are downloaded into this cache, so the hostPath
|
# primary and draft GGUFs are downloaded into this directory, so the hostPath
|
||||||
# filesystem must have enough free space for both models.
|
# filesystem must have enough free space for both models.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
|
|||||||
Reference in New Issue
Block a user