未加入线程:
你的固定基础配置
BASE="/home/yblgt/llama.cpp/build/bin/llama-bench \
--model /data/models/qwen3.6-27b-mtp/Qwen3.6-27B-MTP-Q4_K_M.gguf \
-t 6 \
-ngl 81 \
--flash-attn 1 \
-n 256 -p 512 \
-r 3"
测试不同的 batch-size 和 ubatch-size 组合
for batch in 512 1024 1536 1920 2048 4096; do
for ubatch in 256 512 768 1024); do
echo "=== Testing batch=$batch ubatch=$ubatch ==="
$BASE --batch-size $batch --ubatch-size $ubatch
done
done
加入线程
bash
!/bin/bash
基础配置(不再包含 -t)
BASE="/home/yblgt/llama.cpp/build/bin/llama-bench \
--model /data/models/qwen3.6-27b-mtp/Qwen3.6-27B-MTP-Q4_K_M.gguf \
-ngl 81 \
--flash-attn 1 \
-n 256 -p 512 \
-r 3"
测试不同的线程数、batch-size 和 ubatch-size 组合
for t in 6 12; do
for batch in 512 1024 1536 1920 2048 4096; do
for ubatch in 256 512 768 1024); do
echo "=== Testing threads=$t batch=$batch ubatch=$ubatch ==="
$BASE -t $t --batch-size $batch --ubatch-size $ubatch
done
done
done