inference/research
verifiedhigh · 0.95updated 2026-10-04

bitsandbytes functional.py quantize_4bit (blocksize default and valid values)

repo

Fields

id
sources/qzgw-bnb-functional
Publisher
bitsandbytes
Kind
repo
Accessed
2026-10-04
notes
Authoritative for the NF4/FP4 block size. Docstring verbatim: 'blocksize (int, optional): The size of the blocks. Defaults to 64. Valid values are 32, 64, 128, 256, 512, 1024, 2048, and 4096.' So 64 is a DEFAULT and a choice, not a format constant - the same NF4 checkpoint can be written at any of those sizes. bitsandbytes/nn/modules.py confirms Params4bit.__init__ does `if blocksize is None: blocksize = 64`. Accessed 2026-10-04.

Notes

Authoritative for the NF4/FP4 block size. Docstring verbatim: 'blocksize (int, optional): The size of the blocks. Defaults to 64. Valid values are 32, 64, 128, 256, 512, 1024, 2048, and 4096.' So 64 is a DEFAULT and a choice, not a format constant - the same NF4 checkpoint can be written at any of those sizes. bitsandbytes/nn/modules.py confirms Params4bit.__init__ does `if blocksize is None: blocksize = 64`. Accessed 2026-10-04.

Cross-references

This record references no other records.