This commit is contained in:
Xuan Son Nguyen
2026-09-02 16:46:27 +02:00
parent 402a11ee85
commit 316ed8aade
+2 -1
View File
@@ -161,7 +161,8 @@ struct llama_hparams {
// the size of the sliding window (0 - no SWA)
uint32_t n_swa = 0;
// deepseek4 vision: when set to non-causal attention, SWA should not be applied (case: input is multimodal)
// deepseek4 vision: when decoding non-causally (multimodal input), SWA is not applied between tokens of the current ubatch (the image span); older tokens are still window-clipped
// for other models (like gemma 3, gemma 4): SWA is always applied to match transformers implementation
bool swa_full_non_causal = false;
// if is_swa_impl[il] == 1, then layer il is SWA