Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b9f4d675
Commit
b9f4d675
authored
Aug 03, 2023
by
Michael Yang
Browse files
configurable rope frequency parameters
parent
e3fb1fd3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
api/types.go
api/types.go
+25
-21
llama/llama.go
llama/llama.go
+2
-0
No files found.
api/types.go
View file @
b9f4d675
...
@@ -160,6 +160,8 @@ type Options struct {
...
@@ -160,6 +160,8 @@ type Options struct {
UseMMap
bool
`json:"use_mmap,omitempty"`
UseMMap
bool
`json:"use_mmap,omitempty"`
UseMLock
bool
`json:"use_mlock,omitempty"`
UseMLock
bool
`json:"use_mlock,omitempty"`
EmbeddingOnly
bool
`json:"embedding_only,omitempty"`
EmbeddingOnly
bool
`json:"embedding_only,omitempty"`
RopeFrequencyBase
float32
`json:"rope_frequency_base,omitempty"`
RopeFrequencyScale
float32
`json:"rope_frequency_scale,omitempty"`
// Predict options
// Predict options
RepeatLastN
int
`json:"repeat_last_n,omitempty"`
RepeatLastN
int
`json:"repeat_last_n,omitempty"`
...
@@ -269,6 +271,8 @@ func DefaultOptions() Options {
...
@@ -269,6 +271,8 @@ func DefaultOptions() Options {
F16KV
:
true
,
F16KV
:
true
,
UseMMap
:
true
,
UseMMap
:
true
,
UseMLock
:
false
,
UseMLock
:
false
,
RopeFrequencyBase
:
10000.0
,
RopeFrequencyScale
:
1.0
,
RepeatLastN
:
64
,
RepeatLastN
:
64
,
RepeatPenalty
:
1.1
,
RepeatPenalty
:
1.1
,
...
...
llama/llama.go
View file @
b9f4d675
...
@@ -142,6 +142,8 @@ func New(model string, opts api.Options) (*LLM, error) {
...
@@ -142,6 +142,8 @@ func New(model string, opts api.Options) (*LLM, error) {
params
.
use_mmap
=
C
.
bool
(
llm
.
UseMMap
)
params
.
use_mmap
=
C
.
bool
(
llm
.
UseMMap
)
params
.
use_mlock
=
C
.
bool
(
llm
.
UseMLock
)
params
.
use_mlock
=
C
.
bool
(
llm
.
UseMLock
)
params
.
embedding
=
C
.
bool
(
llm
.
EmbeddingOnly
)
params
.
embedding
=
C
.
bool
(
llm
.
EmbeddingOnly
)
params
.
rope_freq_base
=
C
.
float
(
llm
.
RopeFrequencyBase
)
params
.
rope_freq_scale
=
C
.
float
(
llm
.
RopeFrequencyScale
)
llm
.
params
=
&
params
llm
.
params
=
&
params
cModel
:=
C
.
CString
(
model
)
cModel
:=
C
.
CString
(
model
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment