Skip to content

Commit d5b59b2

Browse files
jeejeeleegarg-amit
authored andcommitted
[Misc] Skip loading extra bias for Qwen2-VL GPTQ-Int8 (vllm-project#8442)
Signed-off-by: Amit Garg <mitgarg17495@gmail.com>
1 parent 213f1de commit d5b59b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vllm/model_executor/models/qwen2_vl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,9 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
10551055
if weight_name not in name:
10561056
continue
10571057
name = name.replace(weight_name, param_name)
1058+
# Skip loading extra bias for GPTQ models.
1059+
if name.endswith(".bias") and name not in params_dict:
1060+
continue
10581061
param = params_dict[name]
10591062
weight_loader = param.weight_loader
10601063
weight_loader(param, loaded_weight, shard_id)
@@ -1078,6 +1081,9 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
10781081
loaded_weight = loaded_weight.transpose(0, 1)
10791082
loaded_weight = loaded_weight.reshape(-1)
10801083
try:
1084+
# Skip loading extra bias for GPTQ models.
1085+
if name.endswith(".bias") and name not in params_dict:
1086+
continue
10811087
param = params_dict[name]
10821088
except KeyError:
10831089
print(params_dict.keys())

0 commit comments

Comments
 (0)