[Misc] Remove no-op self-assignments across vLLM (#55988)
Signed-off-by: shaolila <shaolila@buaa.edu.cn> Co-authored-by: shaolila <shaolila@buaa.edu.cn>
This commit is contained in:
@@ -615,14 +615,15 @@ class RoutedExperts(PluggableLayer):
|
||||
# compressed-tensors checkpoints with packed weights are stored flipped
|
||||
# TODO (mgoin): check self.quant_method.quant_config.quant_format
|
||||
# against known CompressionFormat enum values that have this quality
|
||||
if quant_method_name in (
|
||||
"CompressedTensorsWNA16MoEMethod",
|
||||
"CompressedTensorsW4A16FlydslMoEMethod",
|
||||
if (
|
||||
quant_method_name
|
||||
in (
|
||||
"CompressedTensorsWNA16MoEMethod",
|
||||
"CompressedTensorsW4A16FlydslMoEMethod",
|
||||
)
|
||||
and is_transposed
|
||||
):
|
||||
if is_transposed:
|
||||
loaded_weight = loaded_weight.t().contiguous()
|
||||
else:
|
||||
loaded_weight = loaded_weight
|
||||
loaded_weight = loaded_weight.t().contiguous()
|
||||
|
||||
if shard_id not in ("w1", "w2", "w3"):
|
||||
raise ValueError(f"shard_id must be ['w1','w2','w3'] but got {shard_id}.")
|
||||
|
||||
@@ -780,9 +780,7 @@ class DeepCLIPVisionEmbeddings(CLIPVisionEmbeddings):
|
||||
self, pixel_values: torch.Tensor, patch_embeds: torch.Tensor | None = None
|
||||
) -> torch.Tensor:
|
||||
batch_size = pixel_values.shape[0]
|
||||
if patch_embeds is not None:
|
||||
patch_embeds = patch_embeds
|
||||
else:
|
||||
if patch_embeds is None:
|
||||
patch_embeds = self.patch_embedding(pixel_values)
|
||||
patch_embeds = patch_embeds.flatten(2).transpose(1, 2)
|
||||
|
||||
|
||||
@@ -964,7 +964,6 @@ class MiMoV2OmniMultiModalProcessor(BaseMultiModalProcessor[MiMoV2OmniProcessing
|
||||
assert isinstance(va_item, (list, tuple)) and len(va_item) == 2
|
||||
vid, audio_src = va_item
|
||||
va_item = VideoAudioInput(video=vid, audio=audio_src)
|
||||
vid = vid
|
||||
# Convert video frames to (TCHW, timestamps) if needed
|
||||
if (
|
||||
isinstance(vid, tuple)
|
||||
|
||||
@@ -173,7 +173,6 @@ class Step3p5Attention(nn.Module):
|
||||
rope_scaling = None
|
||||
|
||||
if sliding_window is not None and enable_sliding_window:
|
||||
sliding_window = sliding_window
|
||||
if swa_num_attention_heads is not None:
|
||||
num_heads = swa_num_attention_heads
|
||||
self.total_num_heads = swa_num_attention_heads
|
||||
|
||||
Reference in New Issue
Block a user