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

Add KL loss #11

Open
borisdayma opened this issue Jul 25, 2022 · 2 comments
Open

Add KL loss #11

borisdayma opened this issue Jul 25, 2022 · 2 comments

Comments

@borisdayma
Copy link
Collaborator

borisdayma commented Jul 25, 2022

KL loss can avoid using a codebook (with associated quantization loss).

@borisdayma
Copy link
Collaborator Author

borisdayma commented Jul 31, 2022

Advantage of using codebook:

  • can be used for AR models
  • smaller pre-encoding (only small sequence of int)

Advantage of KL loss:

  • no quantization loss from codebook
  • no hyper-parameter for codebook size
  • no issue with unused codes
  • if we have a small codebook embedding, pre-encoding may also be feasible

What do you think @patil-suraj

@patil-suraj
Copy link
Owner

We can add KL loss for sure. But then it depends how do we want to use this model. If we are going to do diffusion, then we can train the KL model. But for auto-regressive model like dalle-mini we will need the VQ part.

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

2 participants