subclass_zoo icon indicating copy to clipboard operation
subclass_zoo copied to clipboard

[WIP] quantized tensor

Open ashari4 opened this issue 2 years ago • 1 comments

under discussion at https://discuss.pytorch.org/t/training-with-custom-quantized-datatype/152132

ashari4 avatar Jun 05 '22 22:06 ashari4

Hi!

This looks really interesting. I think there is some small changes that you can make to simplify this and avoid saving the data twice. I added a commit in this branch: https://github.com/albanD/subclass_zoo/tree/quantized_tensor_alban (feel free to steal that and add it to your branch if you want it).

Also the autograd handling is still not super clear to me but I think the idea should be that the wrapper tensor should have the high precision dtype (and so the autograd engine will be happy with it) but the raw_data can be whatever dtype you want it to be (low precision or high precision depending on what you need).

albanD avatar Jun 06 '22 19:06 albanD