compressed_tensors.transform.transform_scheme
Classes:
-
TransformScheme–Scheme used to parameterize a particular transform type and specify how and where it
TransformScheme
Bases: BaseModel
Scheme used to parameterize a particular transform type and specify how and where it should be applied to the model
Parameters:
-
type–string indicating the particular transform type that should be created and applied. This should be one of the registered transform types (see
Transforms.registered_names()) -
apply–list of TransformationArgs containing the information about the modules that should be targeted by the specified transform
-
randomize–True if uniquely randomized transform weights should be used, otherwise use identical transform weights where applicable
-
requires_grad–True if weights include gradients for training
-
head_dim–If set, the transform matrix will be block diagonal with each block being a square matrix of this size. The name head_dim was chosen because some rotations need to be block-diagonal with block size equal to the head_dim, but research has shown value in applying some rotations with smaller block size, irrespective of head_dim.
-
precision–Precision at which this transform should be applied during online rotations. Fused (offline) rotations are always performed in float64