Set GLM4 blk.*.attn_output.weight, kqv_out-* matmul to GGML_PREC_F32 to fix infinity values in output (#13639)
This commit is contained in:
parent
c00a2634be
commit
c9c64dee57
1 changed files with 4 additions and 0 deletions
|
@ -1368,6 +1368,10 @@ ggml_tensor * llm_graph_context::build_attn(
|
||||||
|
|
||||||
if (wo) {
|
if (wo) {
|
||||||
cur = build_lora_mm(wo, cur);
|
cur = build_lora_mm(wo, cur);
|
||||||
|
if (arch == LLM_ARCH_GLM4) {
|
||||||
|
// GLM4 seems to have numerical issues with half-precision accumulators
|
||||||
|
ggml_mul_mat_set_prec(cur, GGML_PREC_F32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wo_b) {
|
if (wo_b) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue