Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use cache? #175

Open
liang23333 opened this issue Jan 14, 2025 · 1 comment
Open

How to use cache? #175

liang23333 opened this issue Jan 14, 2025 · 1 comment

Comments

@liang23333
Copy link

How to use HSTU's cache? From the code, it seems that the cache is associated with delta_x_offsets, but I'm not sure what delta_x_offsets is supposed to look like.

@liang23333
Copy link
Author

from hstu.py, the code
flattened_offsets = delta_x_offsets[1] + torch.arange(start=0, end=B * n, step=n, device=delta_x_offsets[1].device, dtype=delta_x_offsets[1].dtype),

This means that each row in the batch has only one element that needs to be updated? In other words, as long as each user has a new item-id, it will be sent to HSTU for an update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant