Skip to content

Commit cfebb6e

Browse files
committed
access n_swa via hparams
1 parent adea1c9 commit cfebb6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/llama-graph.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,9 @@ llm_graph_input_attn_no_cache * llm_graph_context::build_attn_inp_no_cache() con
12431243
}
12441244

12451245
llm_graph_input_attn_no_cache * llm_graph_context::build_attn_inp_no_cache_iswa() const {
1246-
// Default sliding window size - can be made configurable via cparams
1247-
const int n_swa = 128;
1246+
// Use the sliding window size from hyperparameters
1247+
// If hparams.n_swa is 0, use a default value (128)
1248+
const int n_swa = hparams.n_swa > 0 ? hparams.n_swa : 128;
12481249

12491250
auto inp = std::make_unique<llm_graph_input_attn_no_cache>(hparams, cparams, n_swa);
12501251

0 commit comments

Comments
 (0)