Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
minhthuc2502 committed May 16, 2024
1 parent 67a950c commit 7e5de1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/layers/attention_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ namespace ctranslate2 {
"/rotary_scaling_long_factor");
const auto rotary_short_factor = model.get_variable_if_exists(scope +
"/rotary_scaling_short_factor");
const auto original_max_position_embeddings = model.get_attribute_with_default<float>(
scope + "/original_max_position_embeddings", 0.f);
const auto original_max_position_embeddings = model.get_attribute_with_default<int32_t>(
scope + "/original_max_position_embeddings", 0);

const auto max_position_embeddings = model.get_attribute_with_default<float>(
scope + "/max_position_embeddings", 0.f);
const auto max_position_embeddings = model.get_attribute_with_default<int32_t>(
scope + "/max_position_embeddings", 0);

return std::make_unique<RotaryEmbeddings>(rotary_dim,
interleave,
Expand Down

0 comments on commit 7e5de1d

Please sign in to comment.