Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-vulkan/vulkan-shaders/geglu.comp # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-vulkan / vulkan-shaders / geglu.comp` 13 lines ยท 327 bytes Raw Blame History 1 #version 450 2 3 #include "glu_head.glsl" 4 5 const float GELU_COEF_A = 0.`044715f`; 6 const float SQRT_2_OVER_PI = 0.`79788456080286535587989211986876f`; 7 8 float op(float a, float b) { 9 const float val = SQRT_2_OVER_PI*a*(1.0f + GELU_COEF_A*a*a); 10 return 0.5f*a*(2.0f - 2.0f / (exp(2 * val) + 1)) * b; 11 } 12 13 #include "glu_main.glsl"