MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / gelu

Function gelu

src/infer.cpp:636–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636inline float gelu(float x) {
637 return 0.5f * x * (1.0f + tanhf(0.797885f * (x + 0.044715f * x * x * x)));
638}
639
640inline float silu(float x) {
641 return x / (1.0f + expf(-x));

Callers 2

_block_cpuMethod · 0.85
ffn_cpuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected