Skip to content

Commit 09f5096

Browse files
committed
feat: resolve precommit
Signed-off-by: Brayden Zhong <b8zhong@uwaterloo.ca>
1 parent 8d42e4a commit 09f5096

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

vllm/model_executor/models/llama4.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def load_moe_expert_weights(
444444

445445
loaded_params.add(full_param_name)
446446
expert_param_loaded = True
447-
is_expert = True
447+
is_expert = True # noqa: F841
448448
return expert_param_loaded
449449

450450
def load_weights(self, weights: Iterable[tuple[str,
@@ -474,7 +474,7 @@ def load_weights(self, weights: Iterable[tuple[str,
474474
loaded_params: set[str] = set()
475475
for name, loaded_weight in weights:
476476
if "experts.gate_up_proj" in name or "experts.down_proj" in name:
477-
fused_experts_params = True
477+
fused_experts_params = True # noqa: F841
478478
expert_params_mapping = expert_params_mapping_fused
479479
if (self.quant_config is not None and
480480
(scale_name := self.quant_config.get_cache_scale(name))):
@@ -508,7 +508,7 @@ def load_weights(self, weights: Iterable[tuple[str,
508508
weight_loader(param, loaded_weight)
509509
else:
510510
weight_loader(param, loaded_weight, shard_id)
511-
is_expert = False
511+
is_expert = False # noqa: F841
512512
loaded_params.add(name)
513513
break
514514
else:
@@ -544,7 +544,7 @@ def load_weights(self, weights: Iterable[tuple[str,
544544
shard_id=shard_id,
545545
expert_id=expert_id)
546546
loaded_params.add(name_mapped)
547-
is_expert = True
547+
is_expert = True # noqa: F841
548548
break
549549
else:
550550
# If we've identified this as an expert weight but couldn't
@@ -593,15 +593,14 @@ def load_weights(self, weights: Iterable[tuple[str,
593593
# Regular weight loader (handles both
594594
# param.weight_loader and default_weight_loader)
595595
weight_loader(param, loaded_weight)
596-
is_expert = True
596+
is_expert = True # noqa: F841
597597
loaded_params.add(name)
598598
continue
599599

600600
param = params_dict[name]
601601
weight_loader = getattr(param, "weight_loader",
602602
default_weight_loader)
603603
weight_loader(param, loaded_weight)
604-
is_expert = False
605604
loaded_params.add(name)
606605
return loaded_params
607606

0 commit comments

Comments
 (0)