mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-21 02:55:01 +00:00
fix: set default rope freq base to 10000 during model load
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
e70b91aaef
commit
00ccb8d4f1
1 changed files with 13 additions and 2 deletions
|
@ -17,9 +17,20 @@ type LLM struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (llm *LLM) Load(opts *pb.ModelOptions) error {
|
func (llm *LLM) Load(opts *pb.ModelOptions) error {
|
||||||
|
|
||||||
|
ropeFreqBase := float32(10000)
|
||||||
|
ropeFreqScale := float32(1)
|
||||||
|
|
||||||
|
if opts.RopeFreqBase != 0 {
|
||||||
|
ropeFreqBase = opts.RopeFreqBase
|
||||||
|
}
|
||||||
|
if opts.RopeFreqScale != 0 {
|
||||||
|
ropeFreqScale = opts.RopeFreqScale
|
||||||
|
}
|
||||||
|
|
||||||
llamaOpts := []llama.ModelOption{
|
llamaOpts := []llama.ModelOption{
|
||||||
llama.WithRopeFreqBase(opts.RopeFreqBase),
|
llama.WithRopeFreqBase(ropeFreqBase),
|
||||||
llama.WithRopeFreqScale(opts.RopeFreqScale),
|
llama.WithRopeFreqScale(ropeFreqScale),
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.ContextSize != 0 {
|
if opts.ContextSize != 0 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue