forked from roger/k3s-cluster
redeploy qwen3.6 27b
This commit is contained in:
@@ -63,8 +63,7 @@ spec:
|
||||
hardware: high-memory
|
||||
initContainers:
|
||||
# Idempotently download the (3-part, split) GGUF into the shared models
|
||||
# PVC on first boot. Also removes the retired Qwen3.6 GGUFs so the new
|
||||
# 87 GiB model fits on the PVC. Downloads are atomic (→ .partial, then
|
||||
# PVC on first boot. Downloads are atomic (→ .partial, then
|
||||
# rename) and resumable, so a failed/interrupted download is recovered
|
||||
# on the next pod start without re-fetching from scratch. A free-space
|
||||
# check fails loudly if the hostPath disk is genuinely too small (no
|
||||
@@ -76,14 +75,8 @@ spec:
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
# Reclaim space from the retired Qwen3.6 models (their Deployments
|
||||
# are gone; the GGUFs are dead weight on the shared PVC).
|
||||
for old in Qwen3.6-27B-UD-Q4_K_XL.gguf Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf; do
|
||||
if [ -f "/models/$old" ]; then
|
||||
echo "Removing retired model $old ..."
|
||||
rm -f "/models/$old"
|
||||
fi
|
||||
done
|
||||
# Qwen3.6-27B is intentionally co-located on this PVC; do not remove
|
||||
# it on DeepSeek pod restarts.
|
||||
# Skip entirely if every shard is already fully downloaded.
|
||||
if [ -s "/models/$SHARD1" ] && [ -s "/models/$SHARD2" ] && [ -s "/models/$SHARD3" ]; then
|
||||
echo "All 3 shards already present — skipping download."
|
||||
|
||||
139
llamacpp/deployment-qwen36-27b.yaml
Normal file
139
llamacpp/deployment-qwen36-27b.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
# Qwen3.6-27B (dense, Q4_K_XL) served by llama.cpp alongside DeepSeek.
|
||||
# The model is fully offloaded to the NUCBox Radeon 8060S; Qwen weights and
|
||||
# DeepSeek weights share the llamacpp-models hostPath PVC.
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: llamacpp-qwen36-27b
|
||||
namespace: llamacpp
|
||||
labels:
|
||||
app: llamacpp
|
||||
model: qwen3.6-27b
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: llamacpp
|
||||
model: qwen3.6-27b
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: llamacpp
|
||||
model: qwen3.6-27b
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
hardware: high-memory
|
||||
initContainers:
|
||||
- name: fetch-model
|
||||
image: alpine:3.20
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
if [ -s "/models/$MODEL_FILE" ]; then
|
||||
echo "Model $MODEL_FILE already present — skipping download."
|
||||
exit 0
|
||||
fi
|
||||
echo "Installing curl..."
|
||||
apk add --no-cache curl
|
||||
echo "Downloading $MODEL_FILE from $MODEL_URL ..."
|
||||
curl -fL --retry 5 --retry-delay 5 -o "/models/$MODEL_FILE.partial" "$MODEL_URL"
|
||||
mv "/models/$MODEL_FILE.partial" "/models/$MODEL_FILE"
|
||||
echo "Download complete: $(ls -lh /models/$MODEL_FILE)"
|
||||
env:
|
||||
- name: MODEL_URL
|
||||
value: "https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF/resolve/main/Qwen3.6-27B-UD-Q4_K_XL.gguf"
|
||||
- name: MODEL_FILE
|
||||
value: "Qwen3.6-27B-UD-Q4_K_XL.gguf"
|
||||
volumeMounts:
|
||||
- name: models
|
||||
mountPath: /models
|
||||
containers:
|
||||
- name: llama-server
|
||||
image: ghcr.io/ggml-org/llama.cpp:server-vulkan
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- -m
|
||||
- /models/Qwen3.6-27B-UD-Q4_K_XL.gguf
|
||||
- --alias
|
||||
- qwen3.6-27b
|
||||
- --host
|
||||
- 0.0.0.0
|
||||
- --port
|
||||
- "8080"
|
||||
- --jinja
|
||||
- -ngl
|
||||
- "999"
|
||||
- -c
|
||||
- "131072"
|
||||
- -np
|
||||
- "1"
|
||||
- --cont-batching
|
||||
- --cache-type-k
|
||||
- q8_0
|
||||
- --cache-type-v
|
||||
- q8_0
|
||||
- --threads
|
||||
- "8"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1000m"
|
||||
memory: 2Gi
|
||||
limits:
|
||||
cpu: "4000m"
|
||||
memory: 24Gi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
failureThreshold: 6
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 180
|
||||
periodSeconds: 30
|
||||
failureThreshold: 5
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: models
|
||||
mountPath: /models
|
||||
readOnly: true
|
||||
- name: dri
|
||||
mountPath: /dev/dri
|
||||
volumes:
|
||||
- name: models
|
||||
persistentVolumeClaim:
|
||||
claimName: llamacpp-models
|
||||
- name: dri
|
||||
hostPath:
|
||||
path: /dev/dri
|
||||
type: Directory
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: llamacpp-qwen36-27b
|
||||
namespace: llamacpp
|
||||
labels:
|
||||
app: llamacpp
|
||||
model: qwen3.6-27b
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: llamacpp
|
||||
model: qwen3.6-27b
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
Reference in New Issue
Block a user