Skip to content

Commit

Permalink
support gw for c++
Browse files Browse the repository at this point in the history
  • Loading branch information
rnwang04 committed Nov 26, 2024
1 parent 24b46b2 commit b99281b
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ def convert_llm_for_deploy(model: torch.nn.Module,
"qkv_bias": True,
"use_prefill_sdp": False,
"weight_num": 7,
"weight_idx": 8}
"weight_idx": 8,
"n_splits_linear": n_splits_linear,
"n_splits_down_proj": n_splits_down_proj}
model.config.update(update_dict)
model.config.save_pretrained(save_directory)

Expand Down Expand Up @@ -495,7 +497,9 @@ def convert_llm_for_deploy(model: torch.nn.Module,
"weight_num": 7,
"weight_idx": 5,
"embedding_post": embedding_post,
"cos_sin_input": cos_sin_input}
"cos_sin_input": cos_sin_input,
"n_splits_linear": n_splits_linear,
"n_splits_down_proj": n_splits_down_proj}
model.config.update(update_dict)
model.config.save_pretrained(save_directory)

Expand Down Expand Up @@ -530,7 +534,9 @@ def convert_llm_for_deploy(model: torch.nn.Module,
"weight_num": 7,
"weight_idx": 5,
"model_type": "minicpm",
"embedding_post": True}
"embedding_post": True,
"n_splits_linear": n_splits_linear,
"n_splits_down_proj": n_splits_down_proj}
model.config.update(update_dict)
model.config.save_pretrained(save_directory)

Expand Down

0 comments on commit b99281b

Please sign in to comment.