mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-18 23:32:06 +00:00
Fix mistral error
Signed-off-by: yuanwu <yuan.wu@intel.com>
This commit is contained in:
parent
9ed9497f7e
commit
a50b33a964
@ -111,7 +111,7 @@ class MistralAttention(torch.nn.Module):
|
||||
)
|
||||
self.num_heads = config.num_attention_heads
|
||||
self.hidden_size = config.hidden_size
|
||||
if hasattr(config, "head_dim"):
|
||||
if hasattr(config, "head_dim") and config.head_dim is not None:
|
||||
self.head_size = config.head_dim
|
||||
else:
|
||||
self.head_size = self.hidden_size // self.num_heads
|
||||
|
Loading…
Reference in New Issue
Block a user