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

This commit is contained in:
Frank committed 2026-08-15 22:31:29 -07:00
1 parent b6f2ee2945
commit c775077016
3 files changed
+11 -2

No files matched your search

+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