fix: jamba cache fails to use torch.nn.module (#32894)

Co-authored-by: Gal Cohen <galc@ai21.com>
This commit is contained in:
Gal Cohen (galco) 2024-08-20 15:50:13 +03:00 committed by GitHub
parent 65f4bc99f9
commit 01c4fc455b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,6 +210,7 @@ class HybridMambaAttentionDynamicCache(DynamicCache):
"""
def __init__(self, config, batch_size, dtype=torch.float16, device=None):
super().__init__()
self.dtype = dtype
self.layers_block_type = config.layers_block_type
self.has_previous_state = False # only used by mamba