forked from roger/k3s-cluster
fix qwen3.8 deployment
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Qwen3.8-27B with MTP speculative decoding served by llama.cpp.
|
||||
# The primary and draft GGUFs are downloaded by llama-server into the shared
|
||||
# persistent llama.cpp cache on the NUCBox Radeon 8060S.
|
||||
# The primary and draft GGUFs are downloaded by an initContainer into the
|
||||
# shared model PVC before llama-server starts.
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -27,15 +27,41 @@ spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
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:
|
||||
- name: llama-server
|
||||
image: ghcr.io/ggml-org/llama.cpp:server-vulkan
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- -hf
|
||||
- ggml-org/Qwen3.8-27B-GGUF:Q4_K_M
|
||||
- -hfd
|
||||
- ggml-org/Qwen3.8-27B-GGUF:Q4_0
|
||||
- -m
|
||||
- /models/Qwen3.8-27B-Q4_K_M.gguf
|
||||
- --model-draft
|
||||
- /models/mtp-Qwen3.8-27B-Q4_0.gguf
|
||||
- --spec-default
|
||||
- --spec-type
|
||||
- draft-mtp
|
||||
@@ -79,14 +105,15 @@ spec:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 180
|
||||
initialDelaySeconds: 600
|
||||
periodSeconds: 30
|
||||
failureThreshold: 5
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: models
|
||||
mountPath: /root/.cache/llama.cpp
|
||||
mountPath: /models
|
||||
readOnly: true
|
||||
- name: dri
|
||||
mountPath: /dev/dri
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user