MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / quantize_fp4

Function quantize_fp4

bitsandbytes/functional.py:862–870  ·  view source on GitHub ↗
(
    A: torch.Tensor,
    absmax: Optional[torch.Tensor] = None,
    out: Optional[torch.Tensor] = None,
    blocksize=None,
    compress_statistics=False,
    quant_storage=torch.uint8,
)

Source from the content-addressed store, hash-verified

860
861
862def quantize_fp4(
863 A: torch.Tensor,
864 absmax: Optional[torch.Tensor] = None,
865 out: Optional[torch.Tensor] = None,
866 blocksize=None,
867 compress_statistics=False,
868 quant_storage=torch.uint8,
869):
870 return quantize_4bit(A, absmax, out, blocksize, compress_statistics, "fp4", quant_storage)
871
872
873def quantize_nf4(

Callers

nothing calls this directly

Calls 1

quantize_4bitFunction · 0.70

Tested by

no test coverage detected