MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_rope_custom_inplace

Function ggml_rope_custom_inplace

subprojects/llama.cpp/ggml/src/ggml.c:4236–4253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4234}
4235
4236struct ggml_tensor * ggml_rope_custom_inplace(
4237 struct ggml_context * ctx,
4238 struct ggml_tensor * a,
4239 struct ggml_tensor * b,
4240 int n_dims,
4241 int mode,
4242 int n_ctx_orig,
4243 float freq_base,
4244 float freq_scale,
4245 float ext_factor,
4246 float attn_factor,
4247 float beta_fast,
4248 float beta_slow) {
4249 return ggml_rope_impl(
4250 ctx, a, b, NULL, n_dims, NULL, mode, n_ctx_orig, freq_base, freq_scale,
4251 ext_factor, attn_factor, beta_fast, beta_slow, true
4252 );
4253}
4254
4255// Apparently solving `n_rot = 2pi * x * base^((2 * max_pos_emb) / n_dims)` for x, we get
4256// `corr_dim(n_rot) = n_dims * log(max_pos_emb / (n_rot * 2pi)) / (2 * log(base))`

Callers

nothing calls this directly

Calls 1

ggml_rope_implFunction · 0.85

Tested by

no test coverage detected