For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
BlockCount
BlockCount
class max.pipelines.kv_cache.BlockCount(free, total)
Bases: object
A point-in-time snapshot of a block pool’s occupancy.
Used for the device (G0) pools, whose blocks are the unit the manager
actually allocates in. The connector’s external tiers report
ByteCount instead.
free
free: int
free_pct
property free_pct: float
Returns the percentage of blocks not currently in use, in [0, 100].
0 when total is 0, rather than dividing by zero.
total
total: int
used
property used: int
Returns the number of blocks currently in use.
used_pct
property used_pct: float
Returns the percentage of blocks currently in use, in [0, 100].
0 when total is 0 (such as a tier with no configured
capacity), rather than dividing by zero.