brevitas icon indicating copy to clipboard operation
brevitas copied to clipboard

Brevitas: neural network quantization in PyTorch

Results 214 brevitas issues
Sort by recently updated
recently updated
newest added

Add support for quantized (Bi-)RNN/GRU/LSTM, implemented leveraging TorchScript.

For example, by running the following code we get nan for weights' grad: ``` net = nn.Sequential(qnn.QuantIdentity( bit_width=1 , return_quant_tensor=True) , qnn.QuantLinear(10, 10, bias=False, weight_bit_width=1)) a = torch.rand((1,10), requires_grad=True) net(a).sum().backward()...

following issue #363, I have tried to do what you suggested, but I am a bit confused as to how to do it. My confusion stems from the fact that...

Hello, I would like to use any of the quantizers that inherit from `WeightQuantProxyFromInjector`, but I would like to change the quantization formula, namely the `impl` in ['impl`'](https://github.com/Xilinx/brevitas/blob/master/src/brevitas/proxy/parameter_quant.py#L143) (or alternatively...

Hello, I have a use-case where I need to create two objects from the same class and pass them to one quantizer. In the standard dependencies tool that you use,...

This is the continuation of #351, but since the topic has changed a lot I decided to make this a new issue. ### Current state I am at the state...

Example: ``` from brevitas import nn as qnn m1 = qnn.QuantIdentity() m2 = qnn.QuantReLU(act_impl=m1.act_impl) ``` m2 should be relu + m1.act_impl but instead it's just m1.act_impl. Workaround to get the...

bug

Dear author, I would like to confirm one thing with you. Does the quantization layer of Brevitas use the value after inverse quantization when calculating the convolution? (Floating point numbers),Shouldn't...

Dear author, I meet a question when I try to use DPUv1Manager.export and DPUv2Manager.export to export onnx file. The export file is shown as follow. `from torch import nn import...

Papers: - Same, Same But Different - Recovering Neural Network Quantization Error Through Weight Factorization https://arxiv.org/abs/1902.01917 - Up or Down? Adaptive Rounding for Post-Training Quantization http://proceedings.mlr.press/v119/nagel20a/nagel20a.pdf - Post training 4-bit...