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
da0e3452
"git@developer.sourcefind.cn:OpenDAS/autoawq_kernels.git" did not exist on "3a85bf4c52ed7fec183f4b192d43559ac393abcc"
Unverified
Commit
da0e3452
authored
Mar 18, 2025
by
Jeffrey Morgan
Committed by
GitHub
Mar 18, 2025
Browse files
ml: use input context for extracting outputs (#9875)
parent
df94175a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
model/models/gemma2/model.go
model/models/gemma2/model.go
+1
-1
model/models/gemma3/model.go
model/models/gemma3/model.go
+1
-1
model/models/llama/model.go
model/models/llama/model.go
+1
-1
model/models/mllama/model.go
model/models/mllama/model.go
+1
-1
No files found.
model/models/gemma2/model.go
View file @
da0e3452
...
...
@@ -179,7 +179,7 @@ func (m *Model) Forward(ctx ml.Context, opts input.Options) (ml.Tensor, error) {
return
nil
,
err
}
outputs
,
err
:=
ctx
.
Out
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
outputs
,
err
:=
ctx
.
In
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
if
err
!=
nil
{
return
nil
,
err
}
...
...
model/models/gemma3/model.go
View file @
da0e3452
...
...
@@ -150,7 +150,7 @@ func (m *Model) Forward(ctx ml.Context, opts input.Options) (ml.Tensor, error) {
return
nil
,
err
}
outputs
,
err
:=
ctx
.
Out
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
outputs
,
err
:=
ctx
.
In
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
if
err
!=
nil
{
return
nil
,
err
}
...
...
model/models/llama/model.go
View file @
da0e3452
...
...
@@ -150,7 +150,7 @@ func (m *Model) Forward(ctx ml.Context, opts input.Options) (ml.Tensor, error) {
return
nil
,
err
}
outputs
,
err
:=
ctx
.
Out
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
outputs
,
err
:=
ctx
.
In
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
if
err
!=
nil
{
return
nil
,
err
}
...
...
model/models/mllama/model.go
View file @
da0e3452
...
...
@@ -154,7 +154,7 @@ func (m *Model) Forward(ctx ml.Context, opts input.Options) (ml.Tensor, error) {
return
nil
,
err
}
outputs
,
err
:=
ctx
.
Out
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
outputs
,
err
:=
ctx
.
In
put
()
.
FromIntSlice
(
opts
.
Outputs
,
len
(
opts
.
Outputs
))
if
err
!=
nil
{
return
nil
,
err
}
...
...
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