Maxtimer97 commited on
Commit
f884592
·
verified ·
1 Parent(s): e7ab9a6

Remove possibility to use cache

Browse files
Files changed (1) hide show
  1. modeling_hymba.py +10 -9
modeling_hymba.py CHANGED
@@ -1737,15 +1737,16 @@ class HymbaBlock(nn.Module):
1737
  ## Mamba head
1738
 
1739
  # Prepare Mamba (early to keep Hymba code order but could probably be put later)
1740
- use_precomputed_states = (
1741
- cache_params is not None
1742
- and cache_params.has_previous_state
1743
- and seq_len == 1
1744
- and cache_params.conv_states[self.layer_idx].shape[0]
1745
- == cache_params.ssm_states[self.layer_idx].shape[0]
1746
- == batch_size
1747
- and use_cache
1748
- )
 
1749
 
1750
 
1751
  index = 0
 
1737
  ## Mamba head
1738
 
1739
  # Prepare Mamba (early to keep Hymba code order but could probably be put later)
1740
+ use_precomputed_states = False
1741
+ # (
1742
+ # cache_params is not None
1743
+ # and cache_params.has_previous_state
1744
+ # and seq_len == 1
1745
+ # and cache_params.conv_states[self.layer_idx].shape[0]
1746
+ # == cache_params.ssm_states[self.layer_idx].shape[0]
1747
+ # == batch_size
1748
+ # and use_cache
1749
+ # )
1750
 
1751
 
1752
  index = 0