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
text-generation-inference
Commits
cce475a9
Unverified
Commit
cce475a9
authored
Jul 08, 2024
by
Daniël de Kok
Committed by
GitHub
Jul 08, 2024
Browse files
hotfix: Fix number of KV heads (#2202)
Fix number of KV heads
parent
521d0d99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/text_generation_server/models/flash_causal_lm.py
server/text_generation_server/models/flash_causal_lm.py
+2
-2
No files found.
server/text_generation_server/models/flash_causal_lm.py
View file @
cce475a9
...
...
@@ -906,8 +906,8 @@ class FlashCausalLM(Model):
# Validation is done in the model itself
if
num_kv_heads
is
None
:
# Order is important here.
for
attr
in
[
"num_key_value_heads"
,
"num_
key_value
_heads"
,
"n_head"
]:
num_kv_heads
=
getattr
(
config
,
"num_attention_heads"
,
None
)
for
attr
in
[
"num_key_value_heads"
,
"num_
attention
_heads"
,
"n_head"
]:
num_kv_heads
=
getattr
(
config
,
attr
,
None
)
if
num_kv_heads
is
not
None
:
break
if
num_kv_heads
is
None
:
...
...
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