-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Added VectorQuantizer base class #8011
Conversation
jenkins |
52def63
to
1d457b5
Compare
jenkins |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
@@ -402,7 +432,7 @@ def decode(self, indices: torch.Tensor, input_len: Optional[torch.Tensor] = None | |||
return dequantized | |||
|
|||
|
|||
class GroupFiniteScalarQuantizer(NeuralModule): | |||
class GroupFiniteScalarQuantizer(VectorQuantizerBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the quantizers have the same interface then would it make sense to have just 1 grouped quantizer implementation/interface? I guess there would need to be a small amount of logic to specify how the underlying codebooks are created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I had the same idea initially.
However, for now, I decided to leave them as separate implementations and only require them to conform with VectorQuantizerBase
. The main reason is flexibility.
Unless there's a strong reason to do it right away, I'd suggest integrating this PR in the current form and revisit the group class in the future.
1d457b5
to
7a06dfc
Compare
Signed-off-by: Ante Jukić <ajukic@nvidia.com>
7a06dfc
to
08cbd76
Compare
jenkins |
Signed-off-by: Ante Jukić <ajukic@nvidia.com> Signed-off-by: Pratyush Muthukumar <pmuthukumar@nvidia.com>
Signed-off-by: Ante Jukić <ajukic@nvidia.com> Signed-off-by: Pratyush Muthukumar <pmuthukumar@nvidia.com>
This reverts commit a02fa8d.
Signed-off-by: Ante Jukić <ajukic@nvidia.com> Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: Ante Jukić <ajukic@nvidia.com> Signed-off-by: Sasha Meister <ameister@nvidia.com>
Signed-off-by: Ante Jukić <ajukic@nvidia.com> Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Ante Jukić <ajukic@nvidia.com>
What does this PR do ?
This PR adds an abstract base class for vector quantizers.
Collection: TTS
Changelog
VectorQuantizerBase
Usage
n/a
Jenkins CI
To run Jenkins, a NeMo User with write access must comment
jenkins
on the PR.Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information