Views
No views yet
ℹ️ Unlike NVFP4 format (4-bit weights + 4-bit activation), NVFP4A16 is not limited to Blackwell GPUs and will be supported efficiently in vLLM with RTX 3000s and RTX 4000s GPUs.
--max-model-len in VLLM and/or quantize the KV cache and/or use multiple GPUs with for example tensor-parallelism.--override-generation-config "${SAMPLER_JSONCONFIG}" to override the sampler (which is a merge of generation_config.json and vLLM defaults)1# Model configuration (Mandatory)
2MODEL="mratsim/Dungeonmaster-V2.2-Expanded-LLaMa-70B-NVFP4A16"
3MODELNAME="Dungeonmaster-V2.2-Expanded-LLaMa-70B"
4GPU_UTIL=0.45
5NUM_GPUS=2
6
7# Sampling configuration (Optional, if departing from `generation_config.json`)
8SAMPLER_OVERRIDE='{"temperature": 0.8, "min_p": 0.02}'
9
10# Prevent vLLM from using 100% CPU when idle (Very Recommended)
11export VLLM_SLEEP_WHEN_IDLE=1
12
13# Use FlashInfer backend (fastest, recommended, "instant" context reprocessing)
14export VLLM_ATTENTION_BACKEND=FLASHINFER
15
16vllm serve "${MODEL}" \
17 --served-model-name "${MODELNAME}" \
18 --tensor-parallel-size "${NUM_GPUS}" \
19 --gpu-memory-utilization ${GPU_UTIL} \
20 --override-generation-config "${SAMPLER_OVERRIDE}"ℹ️ The FlashInfer backend may fail with an error similar toFailed to allocate memory for batch_prefill_tmp_v with size XYZ and alignment 16 in AlignedAllocator.A workaround is running a sed replacement command within vllm install to increase buffer spacesed -i 's/FLASHINFER_WORKSPACE_BUFFER_SIZE = 256 \* 1024 \* 1024/FLASHINFER_WORKSPACE_BUFFER_SIZE = 512 \* 1024 \* 1024/g' vllm/v1/attention/backends/flashinfer.pyThis will be fixed by PR https://github.com/vllm-project/vllm/pull/25344
1default_stage:
2 default_modifiers:
3 QuantizationModifier:
4 targets: [Linear]
5 ignore: [lm_head]
6 scheme: NVFP4A16