QPyTorch icon indicating copy to clipboard operation
QPyTorch copied to clipboard

Low Precision Arithmetic Simulation in PyTorch

Results 15 QPyTorch issues
Sort by recently updated
recently updated
newest added

https://github.com/Tiiiger/QPyTorch/blob/ed0d8b17680254799f2f3960e9e7f848b8bb9db4/qtorch/optim/optim_low.py#L81 In `OptimLP`, the gradient scaling factor is multiplied before quantization. However, grad scaling is meant to prevent possible underflow of low precision quantized gradient values. I think the current...

Building qtorch using pip fails due to the missing package: wheel - Add it to the requirements so that `pip install .` builds qtoch

Do we have any way to export to ONNX? Can we simply remove quant layers for exporting to ONNX?

https://github.com/Tiiiger/QPyTorch/blob/176bf2a4b02021b116991d9b2f4d920861725f26/qtorch/number.py#L23 Should this be `[-2^{wl-fl-1}+2^{-fl}, 2^{wl-fl-1}-2^{-fl}]`? This seems to be how symmetric fixed-point is used in the [WAGE paper](https://arxiv.org/pdf/1802.04680.pdf) (bottom of page 3). For the current formula, if `wl=8` and...

Hi, I have tried the following code a=torch.tensor([3.0]) out=float_quantize(a,8,23,"nearest") The output is printed as -3.0. This happens only when the rounding is nearest .I am not able to understand why...

The code file does not execute and freezes indefinitely. When I remove the below-mentioned line from the code, the project runs as expected: `from qtorch.quant import float_quantize, fixed_point_quantize, block_quantize `...

By trying to import the module, from qtorch.quant import Quantizer, quantizer an error occurs, UnicodeDecodeError: 'gbk' codec can't decode byte 0x92 in position 16034: illegal multibyte sequence May I know...

Hi there, I fix the bug where the package `re` is not imported when the pytorch is a dev version. L16: ` install_require for install_require in install_requires if "torch" !=...

I see that there is pull request adding Ninja to `requirements.txt` file #66 but it seems like it is also reasonable to keep in in the requirements for python package...

When I run model after applying float_quantize to weight or activation with multi-GPU, (huggingface opt-model with device_map='auto') quantization of layers allocated to second or later gpu works wrong. The output...