Remove possibility to use cache
Browse files- 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 |
-
|
| 1742 |
-
|
| 1743 |
-
|
| 1744 |
-
|
| 1745 |
-
|
| 1746 |
-
|
| 1747 |
-
|
| 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
|