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