13/26
Part 3 of 4 · The mask, and the cache you returnLearn and do
Return the cache you built
Each call has to hand the grown cache back for the next step.
cache_k = torch.randn(2, 4, 3, 8)
k_new = torch.randn(2, 4, 1, 8)
k = torch.cat([cache_k, k_new], dim=2)
print(cache_k.shape)
print(k.shape)
After k = torch.cat([cache_k, k_new], dim=2), what is cache_k.shape?
Pick one to see what it prints.
Pick an answer above to see the rest