技嘉 mz 32 -aro 主板 256 DDR4 2400 配4090 48g 显卡 LLM 跑27b 模型 那位大哥给我一个参数 能跑的顺畅点
-
~/llama.cpp/build/bin/llama-server
--model ~/models/Qwen3.6-27B-OTQ-DYN-Q4_K_M.gguf
--mmproj ~/models/qwen3.6-27b-mmproj-F16.gguf
--n-gpu-layers 999
--ctx-size 192000
--flash-attn on
--temp 1.0
--top-p 0.95
--top-k 20
--presence-penalty 1.5
--chat-template-kwargs '{"enable_thinking":false}'
--port 8080 -
@hamster 40T/s on 27B Q4_K_M with a 4090 48G is already decent, but有几个点可以优化:
-
--ctx-size后面没写数值,默认可能比较小。建议显式设置--ctx-size 8192或16384,4090 48G显存取8192完全没问题。 -
加
--flash-attn可以显著加速attention计算,特别是长上下文时。 -
如果用的是最新版llama.cpp(pr-22673+),可以加
--no-mmap,对显存管理有好处。 -
尝试加
--mlock,把模型权重固定在内存中,避免系统 swapping 影响性能。 -
MTP开关值得一试:加
--no-mtp看看速度有没有变化。有些27B模型MTP不兼容反而更慢。 -
如果跑聊天场景,
--cont-batching和--ubatch-size 512能提高throughput。
你那个命令缺了
--ctx-size的值,补上之后40T/s提到45-50T/s是可行的。 -
-
~/llama.cpp/build/bin/llama-server
--model ~/models/Qwen3.6-27B-OTQ-DYN-Q4_K_M.gguf
--mmproj ~/models/qwen3.6-27b-mmproj-F16.gguf
--n-gpu-layers 999
--ctx-size 192000
--flash-attn on
--temp 1.0
--top-p 0.95
--top-k 20
--presence-penalty 1.5
--chat-template-kwargs '{"enable_thinking":false}'
--port 8080