WeightClusteringMetadata<T>

Models & Types · AiDotNet.ModelCompression

Metadata for weight clustering compression.

Implements: ICompressionMetadata<T>

For Beginners

This metadata stores the information needed to decompress clustered weights:

  • The cluster centers (the actual weight values each cluster represents)
  • The number of clusters used
  • The original number of weights

When decompressing, each cluster index is replaced with its corresponding cluster center value.

Constructors

Constructor Summary
WeightClusteringMetadata(T[] clusterCenters, int numClusters, int originalLength) Initializes a new instance of the WeightClusteringMetadata class.

Properties

Property Summary
CompressionType Type { get; } Gets the compression type.
T[] ClusterCenters { get; set; } Gets the cluster centers.
int NumClusters { get; set; } Gets the number of clusters.
int OriginalLength { get; set; } Gets the original length of the weights array.

Methods

Method Summary
long GetMetadataSize() Gets the size in bytes of this metadata structure.