vllm-project/vllm · error · ValueError
VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negativ
Error message
VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negative, got {qr_min_size} What it means
CustomQuickAllReduce._get_qr_min_size reads VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB and validates it: a negative value raises ValueError because a minimum-size threshold below zero is meaningless. The value is later multiplied by MB to become the byte threshold under which the ROCm quick allreduce path is skipped.
Source
Thrown at vllm/distributed/device_communicators/quick_all_reduce.py:267
logger.info(
"Custom quick allreduce: min size override = %d MB",
qr_min_size // MB,
)
if self.qr_quantization_min_size is not None:
logger.info(
"Custom quick allreduce: quantization codec threshold = %d KB",
self.qr_quantization_min_size // KB,
)
self.create_shared_buffer()
self.disabled = False
@staticmethod
def _get_qr_min_size(qr_max_size: int | None) -> int | None:
qr_min_size = envs.VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB
if qr_min_size is None:
return None
if qr_min_size < 0:
raise ValueError(
"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be non-negative, "
f"got {qr_min_size}"
)
qr_min_size *= MB
if qr_max_size is not None and qr_min_size > qr_max_size:
raise ValueError(
"VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be less than or "
"equal to the effective QuickReduce max size"
)
return qr_min_size
@staticmethod
def _get_qr_quantization_min_size() -> int | None:
quantization_min_size = envs.VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB
if quantization_min_size is None:
return None
if quantization_min_size < 0:
raise ValueError(View on GitHub (pinned to c794754062)
Solutions
- Set the variable to a non-negative value (0 disables the threshold floor) or unset it entirely
- Grep deploy scripts/env files for the variable and fix the sign
Example fix
# before export VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB=-1 # after unset VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB # or export VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB=0
Defensive patterns
Strategy: validation
Validate before calling
v = os.environ.get("VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB")
if v is not None:
assert int(v) >= 0, "VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be >= 0" Prevention
- Lint numeric env vars at launcher startup
- Use 0 or unset instead of negative sentinels
- Keep tuning env vars in one reviewed config file
When it happens
Trigger: Starting vLLM with VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB set to a negative number (e.g. -1) on an AMD MI300/MI350 (gfx94/gfx95) node where the custom quick allreduce is enabled.
Common situations: Typos in env files (e.g. '-8' vs '8'); attempting to 'disable the threshold' by passing -1 instead of unsetting the variable; CI configs copied from an experiment.
Related errors
- VLLM_ROCM_QUICK_REDUCE_MIN_SIZE_BYTES_MB must be less than o
- VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB must be non-
- Flashinfer allreduce is not supported for multi-node allredu
- {kind} parsing is not available for model `{model_id}`
- {kind} parsing is disabled by frontend configuration
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/9b7e8811a147b838.
Report an issue: GitHub.