Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 25, 2025
1 parent bc9f6ff commit ac29c6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "titans-pytorch"
version = "0.1.36"
version = "0.1.37"
description = "Titans"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down
4 changes: 3 additions & 1 deletion titans_pytorch/neural_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,8 @@ def forward_inference(
prev_layer_updates = TensorDict(prev_layer_updates)
prev_layer_updates = prev_layer_updates.apply(lambda t: t[:, -1:])

values = None

if store_seq_cache_len == self.chunk_size:

next_updates, next_states, values = self.store_memories(
Expand Down Expand Up @@ -770,7 +772,7 @@ def forward(
if seq_len < self.retrieve_chunk_size:
out = self.init_empty_memory_embed(batch, seq_len)

next_store_state = (seq_len, seq, None, None)
next_store_state = NeuralMemCache(seq_len, seq, None, None)

out = (out, next_store_state)

Expand Down

0 comments on commit ac29c6f

Please sign in to comment.