[New Model] Gemma 4 (#21952)

Signed-off-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
Co-authored-by: Pengyu Chen <pychen96@gmail.com>
Co-authored-by: kpham-sgl <khoa.pham@radixark.ai>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Luo <andy.luo@amd.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: adarshxs <adarsh.shirawalmath@gmail.com>
This commit is contained in:
Xinyuan Tong
2026-04-06 20:24:44 -07:00
committed by GitHub
co-authored by Pengyu Chen kpham-sgl Claude Opus 4.6 Andy Luo gemini-code-assist[bot] adarshxs
parent be0277f9a0
commit 2813cb6d9a
35 changed files with 6007 additions and 70 deletions
+4
View File
@@ -1878,6 +1878,10 @@ class ServerArgs:
f"Disable hybrid SWA memory for {model_arch} as it is not yet supported."
)
self.disable_hybrid_swa_memory = True
elif model_arch == "Gemma4ForConditionalGeneration":
if self.is_attention_backend_not_set():
self.attention_backend = "triton"
logger.info("Use triton as default attention backend for Gemma4")
elif model_arch in ["Exaone4ForCausalLM", "ExaoneMoEForCausalLM"]:
if hf_config.sliding_window_pattern is not None:
logger.warning(