Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1#version 4502 3#extension GL_EXT_shader_16bit_storage : require4 5layout (push_constant) uniform parameter6{7 uint nb1;8 uint dim;9 uint max_period;10} p;11 12#include "types.glsl"13 14#extension GL_EXT_control_flow_attributes : enable15#define BLOCK_SIZE 25616 17layout(local_size_x = BLOCK_SIZE, local_size_y = 1, local_size_z = 1) in;18 19layout (binding = 0) readonly buffer X {A_TYPE data_a[];};20layout (binding = 1) writeonly buffer D {D_TYPE data_d[];};21 22void main() {23 const uint i = gl_WorkGroupID.y;24 const uint j = gl_GlobalInvocationID.x;25 const uint d_offset = i * p.nb1;26 27 const uint half_dim = p.dim / 2;28 29 if (p.dim % 2 != 0 && j == half_dim) {30 data_d[d_offset + 2 * half_dim] = 0.f;31 }32 33 if (j >= half_dim) {34 return;35 }36 37 const float timestep = float(data_a[i]);38 const float freq = float(exp(-log(p.max_period) * j / half_dim));39 const float arg = timestep * freq;40 data_d[d_offset + j] = D_TYPE(cos(arg));41 data_d[d_offset + j + half_dim] = D_TYPE(sin(arg));42}43 