@@ -14240,8 +14240,7 @@ static float rope_yarn_ramp(const float low, const float high, const int i0) {
14240
14240
// MIT licensed. Copyright (c) 2023 Jeffrey Quesnelle and Bowen Peng.
14241
14241
static void rope_yarn(
14242
14242
float theta_extrap, float freq_scale, float corr_dims[2], int64_t i0, float ext_factor, float mscale,
14243
- float * cos_theta, float * sin_theta
14244
- ) {
14243
+ float * cos_theta, float * sin_theta) {
14245
14244
// Get n-d rotational scaling corrected for extrapolation
14246
14245
float theta_interp = freq_scale * theta_extrap;
14247
14246
float theta = theta_interp;
@@ -14263,9 +14262,8 @@ static float ggml_rope_yarn_corr_dim(int n_dims, int n_orig_ctx, float n_rot, fl
14263
14262
}
14264
14263
14265
14264
static void ggml_rope_cache_init(
14266
- float theta_base, float freq_scale, float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale,
14267
- float * cache, float sin_sign, float theta_scale
14268
- ) {
14265
+ float theta_base, float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale,
14266
+ float * cache, float sin_sign, float theta_scale) {
14269
14267
// ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py
14270
14268
float theta = theta_base;
14271
14269
for (int64_t i0 = 0; i0 < ne0; i0 += 2) {
0 commit comments