Skip to content

Commit 00ccb8d

Browse files
committed
fix: set default rope freq base to 10000 during model load
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent e70b91a commit 00ccb8d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pkg/grpc/llm/llama/llama.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ type LLM struct {
1717
}
1818

1919
func (llm *LLM) Load(opts *pb.ModelOptions) error {
20+
21+
ropeFreqBase := float32(10000)
22+
ropeFreqScale := float32(1)
23+
24+
if opts.RopeFreqBase != 0 {
25+
ropeFreqBase = opts.RopeFreqBase
26+
}
27+
if opts.RopeFreqScale != 0 {
28+
ropeFreqScale = opts.RopeFreqScale
29+
}
30+
2031
llamaOpts := []llama.ModelOption{
21-
llama.WithRopeFreqBase(opts.RopeFreqBase),
22-
llama.WithRopeFreqScale(opts.RopeFreqScale),
32+
llama.WithRopeFreqBase(ropeFreqBase),
33+
llama.WithRopeFreqScale(ropeFreqScale),
2334
}
2435

2536
if opts.ContextSize != 0 {

0 commit comments

Comments
 (0)