Skip to content

Commit

Permalink
[Bugfix] Fix KeyError on loading GPT-NeoX (vllm-project#3925)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsato8094 authored Apr 9, 2024
1 parent 15a1d71 commit 13d3c36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vllm/model_executor/models/gpt_neox.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ def load_weights(self,
if ("attention.bias" in name or "attention.masked_bias" in name
or "rotary_emb.inv_freq" in name):
continue
if ("rotary_emb.cos_cached" in name
or "rotary_emb.sin_cached" in name):
# Models trained using OpenRLHF may include
# these tensors in the checkpoint. Skip them.
continue
param = params_dict[name]

if "query_key_value" in name:
Expand Down

0 comments on commit 13d3c36

Please sign in to comment.