Skip to content

Commit

Permalink
fix: jamba cache fails to use torch.nn.module (#32894)
Browse files Browse the repository at this point in the history
Co-authored-by: Gal Cohen <[email protected]>
  • Loading branch information
2 people authored and ArthurZucker committed Aug 22, 2024
1 parent ca56cd7 commit c1df7f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/jamba/modeling_jamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1df7f8

Please sign in to comment.