SOLO
Project description
Paper | PyTorch >= 2.3 | torchao >= 0.7.0
Installation
pip install solow
or
pip install git+https://github.com/MTandHJ/SOLO.git
Usage
from solo.adamw import AdamWQ
optimizer = AdamWQ(
model.parameters(),
lr = 0.001,
weight_decay = 0.,
betas = (0.8, 0.999),
bits = (4, 2), # (4 bits for signed, 2 bits for unsigned)
quantile = 0.1,
block_sizes = (128, 128),
quantizers = ('de', 'qema'),
# A tensor whose size is less than `min_quantizable_tensor_size`
# will be excluded from quantization.
# For rigorous probing, this value is set to 0 in paper.
# Assigning a larger value (such as the default of 4096 in torchao)
# may yield more stable results.
min_quantizable_tensor_size = 0
)
quantizers:none: The orginal 32-bit state.bf16: The BF16 format.de: The dynamic exponent mapping without a stochastic rounding.de-sr: The dynamic exponent mapping with a stochastic rounding.linear: The linear mapping without a stochastic rounding.linear-sr: The linear mapping with a stochastic rounding.qema: The proposed logarithmic quantization.
Reference Code
- pytorch-optimizer: We implemented the low-bit Adafactor and AdaBelief optimiers based on this code.
Citation
@article{xu2025solo,
title={Pushing the Limits of Low-Bit Optimizers: A Focus on EMA Dynamics},
author={Xu, Cong and Liang, Wenbin and Yu, Mo and Liu, Anan and Zhang, Ke-Yue and Ma, Lizhuang and Wang, Jianyong and Wang, Jun and Zhang, Wei},
journal={arXiv preprint arXiv:2505.00347},
year={2025}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
solow-0.1.2.tar.gz
(16.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
solow-0.1.2-py3-none-any.whl
(57.3 kB
view details)
File details
Details for the file solow-0.1.2.tar.gz.
File metadata
- Download URL: solow-0.1.2.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b4966d9e42d0412e3d81df3d720bb2c545e33889264aabac3a610cd25467a24
|
|
| MD5 |
cbd672b1355d493541f7bd9ec4f01be7
|
|
| BLAKE2b-256 |
30c02e73c47cc311a451793b000cea281b3c6114407284c0b062c465ee8ddb0b
|
File details
Details for the file solow-0.1.2-py3-none-any.whl.
File metadata
- Download URL: solow-0.1.2-py3-none-any.whl
- Upload date:
- Size: 57.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bede6a51507e1fa8f0c1ad333c0e49041482735324edf3cbfcb901b7da69bbd
|
|
| MD5 |
1a76119531ad191c451b6ba321b91e8e
|
|
| BLAKE2b-256 |
9439e6e87bfe7d28561753868dd68b27a7b7cd66b95d2b94dff0179965120c3d
|