**VRAM & Offloading**
- Set `--gpu-layers` (or `-ngl`) to the maximum supported. Any layer falling back to CPU during prefill causes severe stalls.
- Verify VRAM usage matches model size + KV cache. Fragmentation or OOM fallback to system RAM kills prefill speed.

**KV Cache & Context**
- Trim `--ctx-size` to your actual maximum prompt+response length. Over-allocating forces unnecessary memory initialization.
- Use `--cache-type-k q4_0 --cache-type-v q4_0` to cut KV cache memory bandwidth pressure during prefill.

**Compute Kernels & Backend**
- Enable `--flash-attn` (requires Ampere/Ada/Hopper GPU). Dramatically reduces prefill memory bandwidth usage.
- Ensure llama.cpp is built against your CUDA version and GPU architecture. Mismatched PTX/cubin causes fallback kernels.
- Avoid `--mmap` on slow storage; use default memory mapping or `--mlock` if RAM is fast.

**Memory Layout & Batching**
- Tune `--batch-size` (default 512). Too high causes memory thrashing; too low underutilizes the GPU. Match to available VRAM.
- For single-request prefill, ensure `--parallel` is not forcing unnecessary thread contention. Keep it at default or `1`.

**Monitoring & Isolation**
- Run `nvtop` or `nvidia-smi` during prefill. GPU util <70% indicates CPU-bound tokenization, PCIe transfer stalls, or suboptimal kernel launch.
- Test with a short prompt (e.g., 128 tokens). If prefill remains slow, the bottleneck is kernel/backend; if it scales linearly, it's prompt length/KV cache overhead.
- Verify quantization: Q4_K_M or Q5_K_M typically offer the best speed/quality balance on modern GPUs. Avoid legacy Q4_0/Q8_0 unless specifically optimized.