Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
636
inline float gelu(float x) {
637
return 0.5f * x * (1.0f + tanhf(0.797885f * (x + 0.044715f * x * x * x)));
638
}
639
640
inline float silu(float x) {
641
return x / (1.0f + expf(-x));
Callers
2
_block_cpu
Method · 0.85
ffn_cpu
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected