Only n_heads / process_group.size() are necessary.

This commit is contained in:
Nicolas Patry 2024-08-28 16:34:58 +02:00
parent 8d01848370
commit 8a4df6e181
No known key found for this signature in database
GPG Key ID: 64AF4752B2967863
1 changed files with 1 additions and 1 deletions

View File

@ -1001,7 +1001,7 @@ class FlashCausalLM(Model):
config.sliding_window = None
self.num_layers = config.num_hidden_layers
self.num_heads = config.num_attention_heads
self.num_heads = config.num_attention_heads // self.process_group.size()
# Validation is done in the model itself
if num_kv_heads is None:
num_kv_heads = getattr(config, "num_key_value_heads", None)