Skip to content

Commit

Permalink
fix: fix the usage of the code model
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM committed May 31, 2024
1 parent 21936dd commit 17a5e9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions convert-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2442,10 +2442,10 @@ def get_tensors(self):
if 'gated_layer' in name:
d1 = data[:self.intermediate_size, :]
name1 = name.replace('gated_layers', 'gated_layers_w')
name1 = name.replace('up_gated_layer', 'gated_layers_w')
name1 = name.replace('up_gated_layer', 'gated_layers_v')
d2 = data[self.intermediate_size:, :]
name2 = name.replace('gated_layers', 'gated_layers_v')
name2 = name.replace('up_gated_layer', 'gated_layers_v')
name2 = name.replace('up_gated_layer', 'gated_layers_w')
yield name1, d1
yield name2, d2
continue
Expand Down
2 changes: 2 additions & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8506,6 +8506,8 @@ struct llm_build_context {
cur = llm_build_norm(ctx0, cur, hparams, model.layers[il].attn_out_norm, model.layers[il].attn_out_norm_b, LLM_NORM, cb, il);

if (model.layers[il].attn_norm_2 != nullptr) {
// re-add the layer input
cur = ggml_add(ctx0, cur, inpL);
cur = llm_build_norm(ctx0, cur, hparams, model.layers[il].attn_norm_2, model.layers[il].attn_norm_2_b, LLM_NORM, cb, il);
}

Expand Down

0 comments on commit 17a5e9f

Please sign in to comment.