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