Skip to content

Commit bdfe09c

Browse files
committed
feat: support GLM 4.5 family of models
1 parent c90f63a commit bdfe09c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/llama-graph.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ ggml_tensor * llm_graph_context::build_ffn(
760760

761761
if (down) {
762762
cur = build_lora_mm(down, cur);
763-
if (arch == LLM_ARCH_GLM4) {
764-
// GLM4 seems to have numerical issues with half-precision accumulators
763+
if (arch == LLM_ARCH_GLM4 || arch == LLM_ARCH_GLM4_MOE) {
764+
// GLM4 and GLM4_MOE seem to have numerical issues with half-precision accumulators
765765
ggml_mul_mat_set_prec(cur, GGML_PREC_F32);
766766
}
767767
}
@@ -1481,8 +1481,8 @@ ggml_tensor * llm_graph_context::build_attn(
14811481

14821482
if (wo) {
14831483
cur = build_lora_mm(wo, cur);
1484-
if (arch == LLM_ARCH_GLM4) {
1485-
// GLM4 seems to have numerical issues with half-precision accumulators
1484+
if (arch == LLM_ARCH_GLM4 || arch == LLM_ARCH_GLM4_MOE) {
1485+
// GLM4 and GLM4_MOE seem to have numerical issues with half-precision accumulators
14861486
ggml_mul_mat_set_prec(cur, GGML_PREC_F32);
14871487
}
14881488
}

0 commit comments

Comments
 (0)