char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aclyvulkan : incremental shader builds (#16341)e29acf74f

char/aliceai-t5-moe
327 B13 linesraw
1#version 450
2
3#include "glu_head.glsl"
4
5const float GELU_COEF_A    = 0.044715f;
6const float SQRT_2_OVER_PI = 0.79788456080286535587989211986876f;
7
8float 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"