We don’t use the type constructors these days… Do you want sparse_coo_tensor 10?
If you save indices for each dimension, it’s not that surprising that you would have some overhead.
If you want full control, a good first step would be to save the values and indices yourself, given that you want a matrix that is “full” in dims 0 and 1 and only sparse in the third dimension, you’d need a more sophisticated sparse format than PyTorch currently offers.
Saving the indices as uint8 and the values as bfloat16, I get 964k.
As far as I know, PyTorch doesn’t support bitsets, so you’d need to do that yourself.
Best regards
Thomas