perf: frank-default-small batch 3072 / ubatch 1536 + ctx-checkpoints
Bigger logical/physical batches for prefill throughput. Enable --ctx-checkpoints to park attention checkpoints in RAM, holding peak GPU memory down so the larger ubatch fits the 24GB VRAM alongside 3x262144 KV without OOM. Weight split unchanged (experts CPU, non-experts GPU).
This commit is contained in:
@@ -15,5 +15,11 @@ CACHE_TYPE_V=f16
|
||||
N_CPU_MOE=40
|
||||
# Every non-expert tensor (attention, norms, embedding, LM head) goes to GPU.
|
||||
N_GPU_LAYERS=all
|
||||
# Larger batches for prefill throughput. The bigger physical batch grows GPU
|
||||
# activation buffers; ctx-checkpoints parks attention checkpoints in RAM to
|
||||
# hold peak GPU memory down so the larger ubatch fits without OOM.
|
||||
BATCH_SIZE=3072
|
||||
UBATCH_SIZE=1536
|
||||
CTX_CHECKPOINTS=4
|
||||
THREADS=8
|
||||
THREADS_HTTP=8
|
||||
@@ -32,6 +32,9 @@ fi
|
||||
: "${CACHE_TYPE_V:=f16}"
|
||||
: "${N_CPU_MOE:=40}" # all 40 layers: MoE expert weights stay on CPU
|
||||
: "${N_GPU_LAYERS:=all}" # every non-expert tensor goes to GPU
|
||||
: "${BATCH_SIZE:=2048}"
|
||||
: "${UBATCH_SIZE:=512}"
|
||||
: "${CTX_CHECKPOINTS:=0}"
|
||||
: "${THREADS:=8}" # 7700X physical cores
|
||||
: "${THREADS_HTTP:=8}"
|
||||
|
||||
@@ -60,6 +63,9 @@ exec "$LLAMA_SERVER" \
|
||||
--parallel "$PARALLEL" \
|
||||
--n-cpu-moe "$N_CPU_MOE" \
|
||||
--gpu-layers "$N_GPU_LAYERS" \
|
||||
--batch-size "$BATCH_SIZE" \
|
||||
--ubatch-size "$UBATCH_SIZE" \
|
||||
--ctx-checkpoints "$CTX_CHECKPOINTS" \
|
||||
--threads "$THREADS" \
|
||||
--threads-http "$THREADS_HTTP" \
|
||||
--alias "$ALIAS" \
|
||||
|
||||
Reference in New Issue
Block a user