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

Function quantize_nf4

bitsandbytes/functional.py:873–881  ·  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

871
872
873def quantize_nf4(
874 A: torch.Tensor,
875 absmax: Optional[torch.Tensor] = None,
876 out: Optional[torch.Tensor] = None,
877 blocksize=None,
878 compress_statistics=False,
879 quant_storage=torch.uint8,
880):
881 return quantize_4bit(A, absmax, out, blocksize, compress_statistics, "nf4", quant_storage)
882
883
884def quantize_4bit(

Callers

nothing calls this directly

Calls 1

quantize_4bitFunction · 0.70

Tested by

no test coverage detected