Skip to content

Commit 8c90bbe

Browse files
committed
revert the changes related to skipped names
1 parent 796fcad commit 8c90bbe

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

vllm/model_executor/models/llama.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,6 @@ def sample(
296296
sampling_metadata)
297297
return next_tokens
298298

299-
def can_skip_param(self, name: str):
300-
# need to skip the names for model (e.g. llama2 70b) as those are not in the param_dict
301-
# when loading weights
302-
skip_name_list = [".bias", "g_idx", "qweight", "qzeros", "scales"]
303-
return any(name.endswith(skip_name) for skip_name in skip_name_list)
304-
305299
def load_weights(self,
306300
model_name_or_path: str,
307301
cache_dir: Optional[str] = None,
@@ -330,15 +324,15 @@ def load_weights(self,
330324
continue
331325
name = name.replace(weight_name, param_name)
332326
# Skip loading extra bias for GPTQ models.
333-
if name not in params_dict and self.can_skip_param(name):
327+
if name.endswith(".bias") and name not in params_dict:
334328
continue
335329
param = params_dict[name]
336330
weight_loader = param.weight_loader
337331
weight_loader(param, loaded_weight, shard_id)
338332
break
339333
else:
340334
# Skip loading extra bias for GPTQ models.
341-
if name not in params_dict and self.can_skip_param(name):
335+
if name.endswith(".bias") and name not in params_dict:
342336
continue
343337
param = params_dict[name]
344338
weight_loader = getattr(param, "weight_loader",

0 commit comments

Comments
 (0)