From 42833bc7a82f804e11ad5ba5ff89e378a6fc66d2 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 7 Oct 2023 11:30:36 +0300 Subject: [PATCH] ggml : silu(-inf) should never happen --- ggml.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ggml.c b/ggml.c index fb75cf188..bcdfbb4bd 100644 --- a/ggml.c +++ b/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 inline static float ggml_silu_f32(float x) { - if (x == -INFINITY) return 0.0f; - return x/(1.0f + expf(-x)); }