Skip to content

Commit 2d4c779

Browse files
author
Judd
committed
fix llama3 rope scaling
this fixes issue #38
1 parent 9ee717b commit 2d4c779

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

models/llama.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,12 @@ namespace v3_1
480480
freq_factors.push_back((1 - smooth) / factor + smooth);
481481
}
482482
}
483+
484+
for (int i = 0; i < (int)freq_factors.size(); i++)
485+
{
486+
// factor is used as a divider in ggml
487+
freq_factors[i] = 1 / freq_factors[i];
488+
}
483489
}
484490

485491
class ConditionalGeneration : public v2::GenericConditionalGeneration<Llama31Block>

0 commit comments

Comments
 (0)