Open bdalal opened 3 years ago
Steps to reproduce the behavior (always include the command you ran):
pip
I've been trying to add the Ibert quantization modules to distilbert and ran into this issue. https://github.com/kssteven418/I-BERT/blob/45cb6da621a8c63e9329c14390b84a6a566bdf49/fairseq/quantization/utils/quant_modules.py#L658 is a float value and is returned as is. I believe that this should be converted to a tensor on the appropriate device before returning something like scaling_factor = torch.tensor([1 / 2 ** self.output_bit], device=exp_int.device).
scaling_factor = torch.tensor([1 / 2 ** self.output_bit], device=exp_int.device)
Please let me know your thoughts on this. Thanks!
🐛 Bug
To Reproduce
Steps to reproduce the behavior (always include the command you ran):
Code sample
Expected behavior
Environment
pip
, source):Additional context
I've been trying to add the Ibert quantization modules to distilbert and ran into this issue. https://github.com/kssteven418/I-BERT/blob/45cb6da621a8c63e9329c14390b84a6a566bdf49/fairseq/quantization/utils/quant_modules.py#L658 is a float value and is returned as is. I believe that this should be converted to a tensor on the appropriate device before returning something like
scaling_factor = torch.tensor([1 / 2 ** self.output_bit], device=exp_int.device)
.Please let me know your thoughts on this. Thanks!