mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 11:24:35 +00:00
ggml : silu(-inf) should never happen
This commit is contained in:
parent
bdbe11719d
commit
42833bc7a8
2
ggml.c
2
ggml.c
@ -3923,8 +3923,6 @@ inline static void ggml_vec_gelu_quick_f32(const int n, float * y, const float *
|
|||||||
|
|
||||||
// Sigmoid Linear Unit (SiLU) function
|
// Sigmoid Linear Unit (SiLU) function
|
||||||
inline static float ggml_silu_f32(float x) {
|
inline static float ggml_silu_f32(float x) {
|
||||||
if (x == -INFINITY) return 0.0f;
|
|
||||||
|
|
||||||
return x/(1.0f + expf(-x));
|
return x/(1.0f + expf(-x));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user