File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments