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
chenpangpang
transformers
Commits
7c71b61d
"git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "35ef3f2902a771bce04e814a970c4da9e4f61e56"
Unverified
Commit
7c71b61d
authored
Jun 19, 2024
by
Phillip Rust
Committed by
GitHub
Jun 19, 2024
Browse files
Fix autocast incompatibility in RecurrentGemma (#30832)
parent
b275a410
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/recurrent_gemma/modeling_recurrent_gemma.py
...ormers/models/recurrent_gemma/modeling_recurrent_gemma.py
+2
-2
No files found.
src/transformers/models/recurrent_gemma/modeling_recurrent_gemma.py
View file @
7c71b61d
...
...
@@ -254,8 +254,8 @@ class RecurrentGemmaSdpaAttention(nn.Module):
k_out
=
k_out
[:,
:,
indices
]
v_out
=
v_out
[:,
:,
indices
]
k_out
[:,
:,
cache_position
]
=
key_states
v_out
[:,
:,
cache_position
]
=
value_states
k_out
[:,
:,
cache_position
]
=
key_states
.
to
(
k_out
.
dtype
)
v_out
[:,
:,
cache_position
]
=
value_states
.
to
(
v_out
.
dtype
)
self
.
key_states
,
self
.
value_states
=
k_out
,
v_out
return
k_out
,
v_out
...
...
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