mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
switched to NTK aware scaling
This commit is contained in:
parent
e19483ca0f
commit
e17c8497cf
4 changed files with 26 additions and 25 deletions
|
@ -2223,10 +2223,10 @@ inline void ggml_cuda_op_rope(
|
|||
const int n_ctx = ((int32_t *) src1->data)[3];
|
||||
GGML_ASSERT(mode == 0);
|
||||
|
||||
const float theta_scale = powf(10000.0, -2.0f/n_dims);
|
||||
const float theta_scale = get_theta_scale(n_dims,n_past,n_ctx);
|
||||
const float p0 = ((mode & 1) == 0 ? n_past + i02 : i02);
|
||||
|
||||
const float p = n_ctx <= GGML_TRAINING_CTX ? p0 : p0 * GGML_TRAINING_CTX / n_ctx;
|
||||
const float p = p0;
|
||||
|
||||
// compute
|
||||
rope_f32_cuda(src0_ddf_i, dst_ddf_i, ne00, i01_diff, p, theta_scale, cudaStream_main);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue