NVIDIA-NeMo/RL #4525, head 74295f6.
vLLM links pin v0.29.0, the version in uv.lock.
weight_block_size (128ร128).Two pages on this PR, one question each. This one: the setup failure on refined MoE grids.
vLLM blockwise FP8 stores one float32 scale per square block of weights. For MoE layers, when the per-GPU
expert width
is not a multiple of 128, vLLM picks a smaller square block (refine_fp8_moe_block_shape).
It keeps that block in quant_method.moe_block_shape and sizes the scales with it
(fp8.py:500,
:575).
But it still sets layer.weight_block_size to the checkpoint's 128ร128
(:556).
The new receiver reads weight_block_size
(vllm_backend.py:2015).
Where the fix lands: RL only, one function.
vllm_backend.py build_hf_to_local_param_map.
No vLLM change: vLLM already publishes the block it used.
@@ vllm_backend.py L2015-L2017 ยท build_hf_to_local_param_map (blockwise FP8 branch) - block_size = getattr(module, "weight_block_size", None) + # vLLM MoE layers may refine the scale grid when the per-rank + # intermediate size is not a multiple of weight_block_size. + block_size = getattr(module.quant_method, "moe_block_shape", None) + if block_size is None: + block_size = getattr(module, "weight_block_size", None) if block_size is None: block_size = module.quant_method.quant_config.weight_block_size
What each piece does. moe_block_shape is the block vLLM's MoE kernel actually reads
(fp8.py:790).
It equals weight_block_size when nothing was refined
(:485),
so the cases that work today do not change. Linear layers have no moe_block_shape and fall through to the old lookup.
The refined block is always square and divides the expert width, so the
quantizer call
and the gate/up scale-row split still hold. Not run on a GPU.
๐ด review comment โ vllm_backend.py:2016
is_mx: true).
But the PR's design-doc table marks blockwise-FP8 โ vLLM blockwise FP8 as supported. A user who tries it on a common MoE model at TP=4 or TP=8
without expert parallel gets a setup error. On main it worked. The unit test cannot catch it, because its mock module only has
weight_block_size; the review asks for a case with a different moe_block_shape.