7900xtx 本地跑Qwen 27B模型的一些参数

目前来说,模型本身用q5,kv缓存用了一篇文章里面测试的结果,上下文到128K,通过了压力测试。相关讨论

llama-server \
    -m ./models/Qwen3.6-27B-Uncensored-HauhauCS-Balanced-MTP-Q5_K_P.gguf \
    --mmproj ./models/mmproj-Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-f16.gguf \
    -c 131072 \
    --parallel 1 \
    -b 2048 \
    -ub 512 \
    -fa 1 \
    -ngl 99 \
    -t 16 \
    --spec-type draft-mtp \
    --cache-type-k q5_0 \
    --cache-type-v q4_1 \
    --no-mmap \
    --temp 0.4 \
    --spec-draft-n-max 3 \
    --top-p 0.95 \
    --top-k 20 \
    --host 0.0.0.0 \
    --port 8080 \
    --tools all

token速度50左右,看占用上下文多少,扯淡够用,输出代码感觉更快点就好了…

qwen 3.8 27B出来后的参数,q5模型 + q8精度kv + 128k上下文。

/opt/llama.cpp/current/bin/llama-server \
  --model ./models/Qwen3.8-27B-UD-Q5_K_M.gguf \
  --mmproj ./models/mmproj-F16.gguf \
  --alias Qwen3.8-27B-UD-Q5_K_M \
  --ctx-size 131072 \
  --parallel 1 \
  --device Vulkan0 \
  --no-host \
  --gpu-layers all \
  --flash-attn on \
  --threads 16 \
  --batch-size 2048 \
  --ubatch-size 512 \
  --cache-type-k q8_0 \
  --cache-type-v q8_0 \
  --fit off \
  --load-mode none \
  --warmup \
  --spec-type ngram-map-k4v,draft-mtp \
  --spec-draft-ngl all \
  --spec-draft-n-max 3 \
  --spec-draft-p-min 0.1 \
  --spec-draft-type-k q8_0 \
  --spec-draft-type-v q8_0 \
  --spec-ngram-map-k4v-size-n 32 \
  --spec-ngram-map-k4v-size-m 48 \
  --spec-ngram-map-k4v-min-hits 1 \
  --temperature 1.0 \
  --top-p 0.95 \
  --top-k 20 \
  --min-p 0 \
  --presence-penalty 0 \
  --repeat-penalty 1 \
  --reasoning on \
  --reasoning-effort low \
  --image-min-tokens 1024 \
  --jinja \
  --cache-ram 32768 \
  --host 0.0.0.0 \
  --port 8080 \
  --metrics \
  --perf \
  --log-timestamps

对于7900xtx,运行后,显存占用情况

qwen 3.8 27B无审查版本下载:HauhauCS/Qwen3.8-27B-Uncensored-HauhauCS-Aggressive-MTP-GGUF · Hugging Face

这套参数也可以试试,使用q4,提高了上下文

/opt/llama.cpp/current/bin/llama-server \
    --model ./models/Qwen3.8-27B-Uncensored-HauhauCS-Aggressive-Q4_K_P.gguf \
    --alias Qwen3.8-27B-Uncensored-Aggressive-Q4_K_P \
    --ctx-size 157696 \
    --parallel 1 \
    --device Vulkan0 \
    --no-host \
    --gpu-layers all \
    --flash-attn on \
    --threads 16 \
    --batch-size 2048 \
    --ubatch-size 512 \
    --cache-type-k q8_0 \
    --cache-type-v q8_0 \
    --fit off \
    --load-mode none \
    --warmup \
    --spec-type ngram-map-k4v,draft-mtp \
    --spec-draft-ngl all \
    --spec-draft-n-max 3 \
    --spec-draft-p-min 0.1 \
    --spec-draft-type-k q8_0 \
    --spec-draft-type-v q8_0 \
    --spec-ngram-map-k4v-size-n 32 \
    --spec-ngram-map-k4v-size-m 48 \
    --spec-ngram-map-k4v-min-hits 1 \
    --temperature 1.0 \
    --top-p 0.95 \
    --top-k 20 \
    --min-p 0 \
    --presence-penalty 0 \
    --repeat-penalty 1 \
    --reasoning on \
    --reasoning-effort medium \
    --reasoning-preserve \
    --cache-ram 32768 \
    --host 0.0.0.0 \
    --port 8080 \
    --metrics \
    --perf \
    --log-timestamps