There's some quantization example here It showed that there is bnb.functional.quantize_fp4(x) But I didn't find it in documentations.
bnb.functional.quantize_fp4(x)