File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
vllm/model_executor/layers/fused_moe Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1409,12 +1409,13 @@ def _maybe_make_contiguous(
14091409 Note: This function handles the "weight_scale" tensors specifically.
14101410 This could however be generalized to handle similar tensors.
14111411 """
1412+ if p .ndim != 3 :
1413+ return p
14121414 # Check if the last 2 dimensions are trasposed
14131415 is_transposed = p .stride (1 ) == 1 and p .stride (2 ) != 1
14141416 if p .is_contiguous () or not is_transposed or "weight_scale" not in name :
14151417 # do nothing.
14161418 return p
1417- assert p .ndim == 3
14181419 # Do not update the layer paramater as the layer's MoE operations would
14191420 # expect the parameter's tensor to the same shape / stride. Instead,
14201421 # make a new torch.nn.Parameter that is used just in the context of
You can’t perform that action at this time.
0 commit comments