dankclaw: add MTP=1 toggle - prepend draft-mtp before --spec-default ngram-mod fallback

This commit is contained in:
Frank
2026-08-15 22:31:29 -07:00
parent b6f2ee2945
commit c775077016
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -19,8 +19,10 @@ CTX_SIZE=524288
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]].
# DSpark multi-slot ROCm crash. MTP=1 prepends the bundled in-model MTP
# head (draft-mtp) before the ngram-mod fallback. See [[qwen3.8-spec-matrix]].
SPEC_DEFAULT=1
MTP=1
SPEC_TYPE=
DRAFT_FILE=
SPEC_DRAFT_N_MAX=
+1 -1
View File
@@ -1,5 +1,5 @@
[Unit]
Description=llama.cpp Qwen3.8-27B UD-Q8_K_XL spec-default ngram-mod (frank-default-large)
Description=llama.cpp Qwen3.8-27B UD-Q8_K_XL draft-mtp+ngram-mod (frank-default-large)
After=network.target
[Service]
+7
View File
@@ -26,6 +26,7 @@ fi
: "${CTX_SIZE:=262144}" # Qwen3.8 native context (env may raise for parallel≥2)
: "${PARALLEL:=2}"
: "${SPEC_DEFAULT:=0}" # 1: use --spec-default (ngram-mod preset) instead of --spec-type
: "${MTP:=0}" # 1: prepend --spec-type draft-mtp before --spec-default (MTP drafts, ngram fallback)
: "${SPEC_DRAFT_N_MAX:=10}"
: "${SPEC_NGRAM_MOD_N_MIN:=48}"
: "${SPEC_NGRAM_MOD_N_MAX:=64}"
@@ -57,6 +58,12 @@ fi
# --spec-type / draft-model path is used when SPEC_DEFAULT is 0.
SPEC_ARGS=()
if [[ "${SPEC_DEFAULT}" == "1" ]]; then
if [[ "${MTP}" == "1" ]]; then
# MTP first (bundled in-model head), then the --spec-default ngram-mod
# fallback. Order matters: the chain drafts through impls in types
# vector order. --spec-type appends, so it must precede --spec-default.
SPEC_ARGS+=(--spec-type draft-mtp)
fi
SPEC_ARGS+=(--spec-default)
else
if [[ -z "${SPEC_TYPE:-}" ]]; then