-
Notifications
You must be signed in to change notification settings - Fork 155
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
VAE caching & bucketing #50
base: main
Are you sure you want to change the base?
Conversation
support dockerfile
Signed-off-by: lawrence-cj <[email protected]>
2. fix the precision bug in model forward; Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
Signed-off-by: lawrence-cj <[email protected]>
@Muinez looks like you forgot save model by epoch and on train ending |
i think if we added 8-bit Adam support it could train with 24gb vram |
I'm not exactly sure which language model encoder you're referring to, but in my case, the size was around 300 * 2304 * 2, which is roughly 1.3MB, just as you mentioned. As for the 20MB size you experienced, it might have been because you needed to .clone() the tensor before saving |
Why not merge it? |
@Muinez |
The text encoder itself doesn't consume much during training, but the embeddings take up a significant amount of disk space. For instance, embeddings for 1 million images can occupy over 1 terabyte. Are you sure this feature is really necessary? |
Alright. Compared to this terrifying hard drive occupation, I think I have to give up this idea. But text caching is still valuable for some solutions that require extremely long contexts. My team may consider trying other solutions in the future. Anyway, thank you for your response. |
@Muinez
After consulting relevant information, I found that it seems that configuration needs to be done inside the script. Can you please fix it? |
Implemented caching for VAE embeddings and local bucketing support.
I decided not to implement caching for text embeddings because they consume an excessive amount of disk space, and the text model is not as resource-intensive as the VAE. Additionally, I removed a significant amount of code from the training script. I hope this won't cause issues, as the primary goal is to make it easier for users to at least run training locally without complications.