The f16/f16 KV pool costs 15640 MiB at 800768 cells. At full 800K the 3090 idled at 23966/24576 MiB and the 1472x1472 image warmup graph failed cudaMalloc (needed +248 MiB). 700416 cells (175104/slot, 4 slots) leaves ~2.3 GiB free after warmup. Parallel stays 4.
59 lines
2.7 KiB
Bash
59 lines
2.7 KiB
Bash
# Tunables for frank-default-small (HauhauCS Q6_K_P, ngram-mod spec, dankserver)
|
|
# Runtime: llama-server b10108; RTX 3090 24GB; Ryzen 7 7700X; 62GB RAM.
|
|
MODEL_DIR=/home/dank/models
|
|
ALIAS=frank-default-small
|
|
HOST=0.0.0.0
|
|
PORT=7770
|
|
# 4 parallel slots x 175104 ctx each = 700416 total context pool.
|
|
# (2026-08-14: refitted from 800000 when the KV cache went dual-f16; the
|
|
# f16/f16 pool costs 15640 MiB at 800768 cells and did not fit the 3090's
|
|
# 24 GiB with the image-warmup graph. 700416 cells leaves ~2.3 GiB free.)
|
|
CTX_SIZE=700000
|
|
PARALLEL=4
|
|
# Spec: ngram-mod. n_min=48, n_max=64, n_match=24 (defaults). 4 expert
|
|
# layers back on GPU; 36 on CPU. Batch 8192 / ubatch 3072.
|
|
SPEC_TYPE=ngram-mod
|
|
NGRAM_MOD_N_MIN=48
|
|
NGRAM_MOD_N_MAX=64
|
|
NGRAM_MOD_N_MATCH=24
|
|
# Expert offload: 36 of 40 layers keep MoE weights on CPU; remaining
|
|
# 4 layers have their expert weights resident on GPU for faster routing.
|
|
# Chosen for prefill-max stability at ubatch 3072: frees ~0.75 GiB peak
|
|
# VRAM vs ncmoe 35 (grid: peak 8606 vs 9360 MiB) for -2% prefill, -2%
|
|
# decode. Fixes the cuBLAS OOM crash class during big prefills.
|
|
N_CPU_MOE=36
|
|
N_GPU_LAYERS=all
|
|
# KV cache on GPU, both K and V at f16 (2026-08-14 diagnostic).
|
|
# F16 K removes the flash-attention F16-conversion workspace (the MMA_F16
|
|
# prefill kernel needs no copy when K is already f16), trading static pool
|
|
# size for the context-proportional workspace growth that caused the
|
|
# cublasSgemm_v2 crashes. Run with VERBOSITY=4 so the load log shows the
|
|
# real allocation sizes; refit CTX_SIZE if it does not fit.
|
|
CACHE_TYPE_K=f16
|
|
CACHE_TYPE_V=f16
|
|
# Diagnostic verbosity for this run; logs the KV/graph allocation sizes.
|
|
VERBOSITY=4
|
|
# Store SWA checkpoints in RAM to hold peak GPU memory down for the
|
|
# larger batch/ubatch (leaves headroom for ctx-checkpoints operation).
|
|
CTX_CHECKPOINTS=4
|
|
# Larger batches / ubatch for big prefill workloads.
|
|
# ubatch 3072 (benchmark-chosen): prefill is the priority; this is the top
|
|
# prefill tier (~1458 t/s) with ~1.2 GiB headroom. Decode is independent.
|
|
BATCH_SIZE=8192
|
|
UBATCH_SIZE=3072
|
|
# Load the model into RAM rather than lazy-mapping it. The MoE experts live on
|
|
# CPU, so eager RAM load avoids page faults during decode (uses ~31GB RAM).
|
|
NO_MMAP=1
|
|
# Compute threads lowered to 7 so other processes on the box keep a core.
|
|
# Sampling settings — per HauhauCS Qwen3.6-35B-A3B model card.
|
|
# Thinking-general: temp=1.0, top_p=0.95, top_k=20, min_p=0.
|
|
# Clients may override per-request; these are the server-side defaults.
|
|
# WARNING: do not name this variable TEMP. The ROCm HIP runtime reads the
|
|
# TEMP environment variable (JIT kernel-cache dir); TEMP=1.0 made the HIP
|
|
# runtime SEGV (NULL unref) during model load on Aug 13 2026.
|
|
TEMPERATURE=1.0
|
|
TOP_K=20
|
|
TOP_P=0.95
|
|
MIN_P=0.0
|
|
THREADS=7
|
|
THREADS_HTTP=8 |