-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[experiment] one shot decoding instead of framewise in Cog VAE #9554
base: main
Are you sure you want to change the base?
Conversation
Closed since doesn't need to be merged. We can still discuss and re-open if we find something wrong with what I've done and actually see a memory improvement. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
How about inference speed? I think one-shot decoding especially when compiled should lead to a reasonable amount of speedup (given we can completely avoid recompilation). Can we verify that? I think that should be the main goal. Additionally, the memory measurement seems to be contradictory with what’s been reported in
Is it because we are doing decoding one-shot? What am I missing out on? |
I will keep this open for a bit as I want to give it a try. Hope that is okay. |
Yes, we need to materialize a tensor that is 12-13 times as larger (or maybe 6 times as large in the intermediate layers (not sure exactly)) than before because we're not doing framewise-batched decoding.
I thought it was to see if quantization + one-shot decoding could use similar amount of memory as bf16 precision frame-wise decoding, but I see what you mean. I'll give compilation a test |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
What does this PR do?
Small experiment to see if we can perform decoding at once instead of batching frame-wise, while applying quantization to see if the overall memory required remains approximately the same.
Here are the results:
So it seems like this doesn't work but good to have it verified, unless I've done something wrong. This is due to needing to materialize the bfloat16 tensors for intermediate computations, which is done whether or not we use quantization.
code
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@sayakpaul