Skip to content

Commit 0408a4f

Browse files
authored
replace M_SQRT2 with std::sqrt(2)
1 parent c0d755c commit 0408a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7127,7 +7127,7 @@ struct llm_build_grok : public llm_graph_context {
71277127
LLM_FFN_GELU, LLM_FFN_PAR, il);
71287128
cb(ffn_out, "ffn_out", il);
71297129

7130-
cur = ggml_scale(ctx0, ggml_add(ctx0, ffn_out, moe_out), M_SQRT2 / 2);
7130+
cur = ggml_scale(ctx0, ggml_add(ctx0, ffn_out, moe_out), std::sqrt(2) / 2);
71317131
cb(cur, "ffn_out", il);
71327132
} else {
71337133
cur = moe_out;

0 commit comments

Comments
 (0)