Skip to content

Commit

Permalink
turn on a new finding that dramatically improves vector quantization
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 11, 2024
1 parent 42da76b commit 2a32a33
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,14 @@ $ accelerate launch train.py
url = {https://api.semanticscholar.org/CorpusID:265018962}
}
```

```bibtex
@article{Fifty2024Restructuring,
title = {Restructuring Vector Quantization with the Rotation Trick},
author = {Christopher Fifty, Ronald G. Junkins, Dennis Duan, Aniketh Iyengar, Jerry W. Liu, Ehsan Amid, Sebastian Thrun, Christopher Ré},
journal = {ArXiv},
year = {2024},
volume = {abs/2410.06424},
url = {https://api.semanticscholar.org/CorpusID:273229218}
}
```
2 changes: 2 additions & 0 deletions audiolm_pytorch/soundstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ def __init__(
rq_quantize_dropout_multiple_of = 1,
rq_groups = 1,
rq_stochastic_sample_codes = False,
rq_rotation_trick = True,
rq_kwargs: dict = {},
use_lookup_free_quantizer = False, # proposed in https://arxiv.org/abs/2310.05737, adapted for residual quantization
use_finite_scalar_quantizer = False, # proposed in https://arxiv.org/abs/2309.15505, adapted for residual quantization
Expand Down Expand Up @@ -600,6 +601,7 @@ def __init__(
quantize_dropout = True,
quantize_dropout_cutoff_index = quantize_dropout_cutoff_index,
stochastic_sample_codes = rq_stochastic_sample_codes,
rotation_trick = rq_rotation_trick,
**rq_kwargs
)

Expand Down
2 changes: 1 addition & 1 deletion audiolm_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.7'
__version__ = '2.1.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'torchaudio',
'transformers',
'tqdm',
'vector-quantize-pytorch>=1.12.5'
'vector-quantize-pytorch>=1.18.1'
],
classifiers=[
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit 2a32a33

Please sign in to comment.