Record Class MarlinWeightPacker.Packed
java.lang.Object
java.lang.Record
smile.llm.quant.MarlinWeightPacker.Packed
- Record Components:
qweight- packed INT32 storage (Marlin layout).scales- FP16 scales[numGroups, outFeatures].inFeatures- K.outFeatures- N.groupSize- group size.
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
MarlinWeightPacker
public static record MarlinWeightPacker.Packed(Tensor qweight, Tensor scales, int inFeatures, int outFeatures, int groupSize)
extends Record
implements AutoCloseable
Result of packing: Marlin qweight, scales, logical features.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegroupSizerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinFeaturesrecord component.intReturns the value of theoutFeaturesrecord component.qweight()Returns the value of theqweightrecord component.scales()Returns the value of thescalesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Packed
Creates an instance of aPackedrecord class.- Parameters:
qweight- the value for theqweightrecord componentscales- the value for thescalesrecord componentinFeatures- the value for theinFeaturesrecord componentoutFeatures- the value for theoutFeaturesrecord componentgroupSize- the value for thegroupSizerecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
qweight
-
scales
-
inFeatures
public int inFeatures()Returns the value of theinFeaturesrecord component.- Returns:
- the value of the
inFeaturesrecord component
-
outFeatures
public int outFeatures()Returns the value of theoutFeaturesrecord component.- Returns:
- the value of the
outFeaturesrecord component
-
groupSize
-