model, mtmd: fix gemma4 vision handling (#28335)

* model, mtmd: fix gemma4 vision handling

* nits
This commit is contained in:
Xuan-Son Nguyen
2026-09-04 12:23:27 +02:00
committed by GitHub
parent 8f83678fd8
commit 163a40796f
7 changed files with 30 additions and 9 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ void llama_model_deepseek4::load_arch_hparams(llama_model_loader & ml) {
hparams.set_swa_pattern(0);
// tokens of an image span attend bidirectionally to the whole span, the window only applies to older tokens
// ref: get_window_topk_idxs_visible in the reference impl
hparams.swa_full_non_causal = true;
hparams.non_causal_type = LLAMA_NON_CAUSAL_TYPE_SWA_FULL;
for (uint32_t il = hparams.n_layer(); il < hparams.n_layer_all; ++il) {
hparams.is_swa_impl[il] = true;
}