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.
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.1.tar.gz
(16.5 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.1-py3-none-any.whl
(57.1 kB
view details)
File details
Details for the file solow-0.1.1.tar.gz.
File metadata
- Download URL: solow-0.1.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dda3207b7917e483a0e6db8c87f161b057c215fced07df87c996f5f2b101a8f
|
|
| MD5 |
9ef7680904352a73e894b73db4ce6e8b
|
|
| BLAKE2b-256 |
293d789cfa303c0a8098721c791220b1e5bbc4e68a198d922a9e4a89fbc34a2c
|
File details
Details for the file solow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: solow-0.1.1-py3-none-any.whl
- Upload date:
- Size: 57.1 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 |
bdd1f240d2592ed168decc5a626de398f7e4b64341993097c6557c758d828b21
|
|
| MD5 |
f21d769e92112b5e51761a1f8aa9d0b8
|
|
| BLAKE2b-256 |
022599d404bbf7f313e4d33e0cf0532bb2ba105dbf1827bd0182ff410cadcc4f
|