dankclaw: retire DSpark, use llama.cpp --spec-default (ngram-mod) preset; PARALLEL=2 trial

This commit is contained in:
Frank committed 2026-08-15 15:15:06 -07:00
1 parent 020e874a5c
commit 1dbc70cb32
3 files changed
+36 -36

No files matched your search

+13 -21
View File
@@ -11,27 +11,19 @@ PORT=7770
# contextWindow=262144 for frank-default-large. Model is 29GB; ROCm has # contextWindow=262144 for frank-default-large. Model is 29GB; ROCm has
# ~70GB headroom, so 2x262k quantized KV fits. Verify at startup. # ~70GB headroom, so 2x262k quantized KV fits. Verify at startup.
CTX_SIZE=524288 CTX_SIZE=524288
# Parallel slots. 2026-08-15: two concurrent 16k prose prompts (high # Parallel slots. 2026-08-15: DSpark multi-slot crashed the ROCm backend
# prompt-cache reuse) crashed DSpark with 'ROCm error: an illegal memory # (illegal memory access, status 6/ABRT) under two concurrent 16k prose
# access was encountered' inside per-sequence block sampling # prompts, so DSpark was retired and --spec-default (ngram-mod) is used.
# (ggml_cuda_synchronize in common_speculative_impl_draft_dflash::draft, # ngram-mod is draftless and passed the strict parallel test historically.
# status 6/ABRT, systemd restarted). DSpark multi-slot is NOT safe on this # PARALLEL=2 is the current trial; pin to 1 if the 2x32k stream test fails.
# box, same class as the DFlash shared-draft-context bug. Pinned to 1 slot PARALLEL=2
# per user instruction; revisit after an upstream multi-slot DSpark fix. # Spec: llama.cpp --spec-default preset = ngram-mod (n_match 24, n_min 48,
PARALLEL=1 # n_max 64). No draft model. Switched from DSpark 2026-08-15 after the
# Spec: DSpark sidecar draft (magnitudedev/Qwen3.8-27B-DSpark-GGUF Q8_0, # DSpark multi-slot ROCm crash. See [[qwen3.8-spec-matrix]].
# 1.36B, block_size 7, Markov confidence head). Switched from bundled-MTP SPEC_DEFAULT=1
# 2026-08-15 at the user's request. DSpark is the semi-autoregressive SPEC_TYPE=
# extension of DFlash (DeepSeek, arXiv 2607.05147): parallel diffusion DRAFT_FILE=
# backbone + sequential Markov head + confidence-scheduled verification. SPEC_DRAFT_N_MAX=
# n_max clamps to the trained block_size 7 (server warning if set higher).
# Parallel safety FAILED on this box (see the PARALLEL=1 note above);
# single-slot only until an upstream multi-slot DSpark fix lands.
# DRAFT_FILE names the sidecar GGUF in MODEL_DIR (downloaded 2026-08-15,
# sha256 b007a76b2ce57c1a3ecf36046543aebf60a763861624647d653f16d336c781d2).
SPEC_TYPE=draft-dspark
DRAFT_FILE=Qwen3.8-27B-DSpark-Q8_0.gguf
SPEC_DRAFT_N_MAX=7
SPEC_DRAFT_P_MIN= SPEC_DRAFT_P_MIN=
SPEC_NGRAM_MOD_N_MIN=48 SPEC_NGRAM_MOD_N_MIN=48
SPEC_NGRAM_MOD_N_MAX=64 SPEC_NGRAM_MOD_N_MAX=64
+1 -1
View File
@@ -1,5 +1,5 @@
[Unit] [Unit]
Description=llama.cpp Qwen3.8-27B UD-Q8_K_XL + DSpark sidecar draft (frank-default-large) Description=llama.cpp Qwen3.8-27B UD-Q8_K_XL spec-default ngram-mod (frank-default-large)
After=network.target After=network.target
[Service] [Service]
+22 -14
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Serve unsloth Qwen3.8-27B UD-Q8_K_XL on dankclaw with a DSpark # Serve unsloth Qwen3.8-27B UD-Q8_K_XL on dankclaw with llama.cpp's
# sidecar draft model (draft-dspark). ROCm backend. # --spec-default preset (ngram-mod). ROCm backend.
# Runtime: llama.cpp llama-server (>= b10411). # Runtime: llama.cpp llama-server (>= b10411).
# #
# Tunables come from frank-default-large.env in this directory unless the # Tunables come from frank-default-large.env in this directory unless the
@@ -25,7 +25,7 @@ fi
: "${PORT:=7770}" : "${PORT:=7770}"
: "${CTX_SIZE:=262144}" # Qwen3.8 native context (env may raise for parallel≥2) : "${CTX_SIZE:=262144}" # Qwen3.8 native context (env may raise for parallel≥2)
: "${PARALLEL:=2}" : "${PARALLEL:=2}"
: "${SPEC_TYPE:=draft-mtp}" : "${SPEC_DEFAULT:=0}" # 1: use --spec-default (ngram-mod preset) instead of --spec-type
: "${SPEC_DRAFT_N_MAX:=10}" : "${SPEC_DRAFT_N_MAX:=10}"
: "${SPEC_NGRAM_MOD_N_MIN:=48}" : "${SPEC_NGRAM_MOD_N_MIN:=48}"
: "${SPEC_NGRAM_MOD_N_MAX:=64}" : "${SPEC_NGRAM_MOD_N_MAX:=64}"
@@ -52,29 +52,37 @@ if [[ ! -f "$MODEL" ]]; then
exit 1 exit 1
fi fi
# Draft-model flag applies only when a separate draft file is provided. # Spec flags. --spec-default is a preset that enables ngram-mod
# Qwen3.8-UD bundles MTP in-model; leave DRAFT_FILE empty for bundled MTP, # (n_match=24, n_min=48, n_max=64) and takes no draft model. The explicit
# or set it to a DSpark/DFlash sidecar GGUF for a dedicated draft. # --spec-type / draft-model path is used when SPEC_DEFAULT is 0.
SPEC_ARGS=() SPEC_ARGS=()
if [[ -n "$DRAFT_FILE" ]]; then if [[ "${SPEC_DEFAULT}" == "1" ]]; then
SPEC_ARGS+=(--spec-default)
else
if [[ -z "${SPEC_TYPE:-}" ]]; then
echo "SPEC_TYPE must be set when SPEC_DEFAULT=0" >&2
exit 1
fi
SPEC_ARGS+=(--spec-type "$SPEC_TYPE")
if [[ -n "$DRAFT_FILE" ]]; then
if [[ ! -f "$DRAFT" ]]; then if [[ ! -f "$DRAFT" ]]; then
echo "missing required file: $DRAFT" >&2 echo "missing required file: $DRAFT" >&2
exit 1 exit 1
fi fi
SPEC_ARGS+=(--spec-draft-model "$DRAFT") SPEC_ARGS+=(--spec-draft-model "$DRAFT")
fi fi
if [[ -n "${SPEC_DRAFT_P_MIN:-}" ]]; then if [[ -n "${SPEC_DRAFT_P_MIN:-}" ]]; then
SPEC_ARGS+=(--spec-draft-p-min "$SPEC_DRAFT_P_MIN") SPEC_ARGS+=(--spec-draft-p-min "$SPEC_DRAFT_P_MIN")
fi
SPEC_ARGS+=(--spec-draft-n-max "$SPEC_DRAFT_N_MAX")
SPEC_ARGS+=(--spec-ngram-mod-n-min "$SPEC_NGRAM_MOD_N_MIN")
SPEC_ARGS+=(--spec-ngram-mod-n-max "$SPEC_NGRAM_MOD_N_MAX")
SPEC_ARGS+=(--spec-ngram-mod-n-match "$SPEC_NGRAM_MOD_N_MATCH")
fi fi
exec "$LLAMA_SERVER" \ exec "$LLAMA_SERVER" \
--model "$MODEL" \ --model "$MODEL" \
"${SPEC_ARGS[@]}" \ "${SPEC_ARGS[@]}" \
--spec-type "$SPEC_TYPE" \
--spec-draft-n-max "$SPEC_DRAFT_N_MAX" \
--spec-ngram-mod-n-min "$SPEC_NGRAM_MOD_N_MIN" \
--spec-ngram-mod-n-max "$SPEC_NGRAM_MOD_N_MAX" \
--spec-ngram-mod-n-match "$SPEC_NGRAM_MOD_N_MATCH" \
--device "$DEVICE" \ --device "$DEVICE" \
--gpu-layers "$N_GPU_LAYERS" \ --gpu-layers "$N_GPU_LAYERS" \
--fit off \ --fit off \