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
5dc9c8ff
Commit
5dc9c8ff
authored
Jul 06, 2023
by
Michael Yang
Browse files
more free
parent
7d500692
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
llama/llama.go
llama/llama.go
+11
-2
No files found.
llama/llama.go
View file @
5dc9c8ff
...
@@ -81,13 +81,22 @@ func (l *LLama) Eval(text string, opts ...PredictOption) error {
...
@@ -81,13 +81,22 @@ func (l *LLama) Eval(text string, opts ...PredictOption) error {
defer
C
.
free
(
unsafe
.
Pointer
(
cs
))
defer
C
.
free
(
unsafe
.
Pointer
(
cs
))
}
}
cLogitBias
:=
C
.
CString
(
po
.
LogitBias
)
defer
C
.
free
(
unsafe
.
Pointer
(
cLogitBias
))
cMainGPU
:=
C
.
CString
(
po
.
MainGPU
)
defer
C
.
free
(
unsafe
.
Pointer
(
cMainGPU
))
cTensorSplit
:=
C
.
CString
(
po
.
TensorSplit
)
defer
C
.
free
(
unsafe
.
Pointer
(
cTensorSplit
))
params
:=
C
.
llama_allocate_params
(
input
,
C
.
int
(
po
.
Seed
),
C
.
int
(
po
.
Threads
),
C
.
int
(
po
.
Tokens
),
C
.
int
(
po
.
TopK
),
params
:=
C
.
llama_allocate_params
(
input
,
C
.
int
(
po
.
Seed
),
C
.
int
(
po
.
Threads
),
C
.
int
(
po
.
Tokens
),
C
.
int
(
po
.
TopK
),
C
.
float
(
po
.
TopP
),
C
.
float
(
po
.
Temperature
),
C
.
float
(
po
.
Penalty
),
C
.
int
(
po
.
Repeat
),
C
.
float
(
po
.
TopP
),
C
.
float
(
po
.
Temperature
),
C
.
float
(
po
.
Penalty
),
C
.
int
(
po
.
Repeat
),
C
.
bool
(
po
.
IgnoreEOS
),
C
.
bool
(
po
.
F16KV
),
C
.
bool
(
po
.
IgnoreEOS
),
C
.
bool
(
po
.
F16KV
),
C
.
int
(
po
.
Batch
),
C
.
int
(
po
.
NKeep
),
pass
,
C
.
int
(
reverseCount
),
C
.
int
(
po
.
Batch
),
C
.
int
(
po
.
NKeep
),
pass
,
C
.
int
(
reverseCount
),
C
.
float
(
po
.
TailFreeSamplingZ
),
C
.
float
(
po
.
TypicalP
),
C
.
float
(
po
.
FrequencyPenalty
),
C
.
float
(
po
.
PresencePenalty
),
C
.
float
(
po
.
TailFreeSamplingZ
),
C
.
float
(
po
.
TypicalP
),
C
.
float
(
po
.
FrequencyPenalty
),
C
.
float
(
po
.
PresencePenalty
),
C
.
int
(
po
.
Mirostat
),
C
.
float
(
po
.
MirostatETA
),
C
.
float
(
po
.
MirostatTAU
),
C
.
bool
(
po
.
PenalizeNL
),
C
.
CString
(
po
.
LogitBias
)
,
C
.
int
(
po
.
Mirostat
),
C
.
float
(
po
.
MirostatETA
),
C
.
float
(
po
.
MirostatTAU
),
C
.
bool
(
po
.
PenalizeNL
),
c
LogitBias
,
C
.
bool
(
po
.
MLock
),
C
.
bool
(
po
.
MMap
),
C
.
CString
(
po
.
MainGPU
)
,
C
.
CString
(
po
.
TensorSplit
)
,
C
.
bool
(
po
.
MLock
),
C
.
bool
(
po
.
MMap
),
c
MainGPU
,
c
TensorSplit
,
)
)
defer
C
.
llama_free_params
(
params
)
defer
C
.
llama_free_params
(
params
)
...
...
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