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
bc1a818f
Unverified
Commit
bc1a818f
authored
Oct 17, 2025
by
Daniel Hiltgen
Committed by
GitHub
Oct 17, 2025
Browse files
contiguous input per layer (#12686)
Co-authored-by:
Michael Yang
<
git@mxy.ng
>
parent
ba2253dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
model/models/gemma3n/model_text.go
model/models/gemma3n/model_text.go
+1
-1
No files found.
model/models/gemma3n/model_text.go
View file @
bc1a818f
...
...
@@ -65,7 +65,7 @@ func (m *TextModel) Forward(ctx ml.Context, batch input.Batch, cache kvcache.Cac
cache
.
(
*
kvcache
.
WrapperCache
)
.
SetLayerType
(
layerType
)
// inputPerLayer = inputsPerLayer[:, i, :]
inputPerLayer
:=
inputsPerLayer
.
View
(
ctx
,
i
*
inputsPerLayer
.
Stride
(
1
),
inputsPerLayer
.
Dim
(
0
),
inputsPerLayer
.
Stride
(
2
),
inputsPerLayer
.
Dim
(
2
))
inputPerLayer
:=
inputsPerLayer
.
View
(
ctx
,
i
*
inputsPerLayer
.
Stride
(
1
),
inputsPerLayer
.
Dim
(
0
),
inputsPerLayer
.
Stride
(
2
),
inputsPerLayer
.
Dim
(
2
))
.
Contiguous
(
ctx
)
hiddenStates
=
layer
.
Forward
(
ctx
,
hiddenStates
,
inputPerLayer
,
positions
,
one
,
cache
,
i
>=
firstSharedKeyValue
,
ropeBase
,
float64
(
m
.
activationSparsityScale
[
i
]),
&
m
.
TextOptions
)
}
...
...
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