Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/models/gemma3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ llm_build_gemma3<iswa>::llm_build_gemma3(const llama_model & model, const llm_gr
float freq_base_l = 0.0f;
float freq_scale_l = 0.0f;

if constexpr (iswa) {
if (hparams.is_swa(il)) {
freq_base_l = model.get_rope_freq_base (cparams, il);
freq_scale_l = model.get_rope_freq_scale(cparams, il);
} else {
Expand Down
1 change: 1 addition & 0 deletions src/models/modern-bert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ llm_build_modern_bert<iswa>::llm_build_modern_bert(const llama_model & model, co
for (int il = 0; il < n_layer; ++il) {
float freq_base_l = 0.0f;

// TODO @ngxson : do we expect to apply this globally, or dynamically per layer?
if constexpr (iswa) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite strange here because modern-bert uses build_attn_inp_no_cache, so iswa has no effects here. Probably a copy-pasting mistake?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, check out #15798

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though the templating was probably unnecessary.

freq_base_l = model.get_rope_freq_base(cparams, il);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/models/plamo3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ llm_build_plamo3<iswa>::llm_build_plamo3(const llama_model & model, const llm_gr

float freq_base_l = 0.0f;
float freq_scale_l = 0.0f;
if constexpr (iswa) {
if (hparams.is_swa(il)) {
freq_base_l = model.get_rope_freq_base (cparams, il);
freq_scale_l = model.get_rope_freq_scale(cparams, il);
} else {
Expand Down
Loading