Skip to content

Commit

Permalink
fix: check for wte.weight along with embed_tokens.weight (#356)
Browse files Browse the repository at this point in the history
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
  • Loading branch information
willmj authored Sep 27, 2024
1 parent 0c6a062 commit a37f074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuning/utils/merge_model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def post_process_vLLM_adapters_new_tokens(
# vLLM requires renaming to output_embeddings
new_embeddings["output_embeddings"] = new_output_embeddings

elif "embed_tokens.weight" in k:
elif "embed_tokens.weight" in k or "wte.weight" in k:
embed_tokens = f.get_tensor(k)
# pull out tensor values of new tokens
new_input_embeddings = embed_tokens[-num_added_tokens:]
Expand Down

0 comments on commit a37f074

Please sign in to comment.