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
QTensor
QTensor
class max.nn.common_layers.quant_tensor.QTensor
Bases: Module
Base class for quantized tensor wrappers.
QTensors are Module subclasses so that
parameter discovery finds the inner tensors. They are data wrappers, not
callable layers — pass them to a quantized kernel op
(such as quant_ops.matmul).
forward()
forward()
Raises, since a QTensor is a data wrapper rather than a layer.
-
Return type:
-
None
local_shards
Per-device shards of this tensor; subclasses implement it.
mesh
property mesh: DeviceMesh
Device mesh the tensor is placed on; subclasses implement it.
to()
to(target)
Returns a copy placed on target; subclasses implement it.
-
Parameters:
-
target (Device | DeviceMesh | DeviceMapping)
-
Return type: