model : Add support for Metis-1.6 models (#31134)

Assisted-by: Claude
This commit is contained in:
Giulianno authored and GitHub committed 2026-11-03 16:24:45 +01:00
1 parent d1044bc827
commit 9309bf1bcf
20 files changed
+1112 -2

No files matched your search

+5 -1
View File
@@ -290,7 +290,11 @@ ggml_tensor * llm_build_mamba_base::build_mamba2_layer(llm_graph_input_rs * inp,
// grouped RMS norm
if (model.layers[il].ssm_norm) {
y = ggml_reshape_4d(ctx0, y, d_inner / n_group, n_group, n_seq_tokens, n_seqs);
y = build_norm(y, model.layers[il].ssm_norm, NULL, LLM_NORM_RMS, il);
if (hparams.ssm_norm_eps > 0.0f) {
y = ggml_mul(ctx0, ggml_rms_norm(ctx0, y, hparams.ssm_norm_eps), model.layers[il].ssm_norm);
} else {
y = build_norm(y, model.layers[il].ssm_norm, NULL, LLM_NORM_RMS, il);
}
}
y = ggml_reshape_2d(ctx0, y, d_inner, n_seq_tokens * n_seqs);