Skip to content

Commit

Permalink
hotfix: Fix number of KV heads (#2202)
Browse files Browse the repository at this point in the history
Fix number of KV heads
  • Loading branch information
danieldk authored and ErikKaum committed Jul 26, 2024
1 parent 361aae7 commit b2431ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/text_generation_server/models/flash_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,8 @@ def __init__(
# 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:
Expand Down

0 comments on commit b2431ca

Please sign in to comment.