ModelCompressionReport<T>
Models & Types · AiDotNet.ModelCompression
The model-compression audit produced by a configured compression strategy: the true size-versus-accuracy trade-off of the actual decompressed model, a sensitivity-aware Pareto frontier, and weight reconstruction error — everything needed to choose a compression level rather than trust a single headline ratio.
How It Works
Most toolkits report a compression ratio in isolation. This audit compresses the trained weights, decompresses them, rebuilds the model from the decompressed weights, and re-evaluates it on the prepared data, so the reported accuracy retention is the model’s real predictive fit — not a weight-error proxy. The frontier sweeps magnitude-ranked partial compression (compress the least important weights first) to trace how accuracy falls as size shrinks, and the knee marks the most compression that still clears the retention tolerance.
Constructors
| Constructor | Summary |
|---|---|
ModelCompressionReport() |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<CompressionFrontierPoint<T>> Frontier { get; set; } |
The compression-versus-accuracy operating points, from lightest to full compression — the Pareto frontier a user reads to choose a level. |
bool SweepAvailable { get; set; } |
Whether more than one frontier point was produced (a real sweep, not a single operating point). |
double AccuracyRetained { get; set; } |
The share of the original model’s fit retained at full compression, 0..1 (real re-evaluation). |
double BaselineLoss { get; set; } |
The prediction loss (RMSE on the prepared data) of the original, uncompressed model. |
double CompressedLoss { get; set; } |
The prediction loss (RMSE on the prepared data) of the fully compressed, rebuilt model. |
double CompressionRatio { get; set; } |
Original bytes divided by compressed bytes at full compression (higher means smaller). |
double KneeAccuracyRetained { get; set; } |
The accuracy retained at the knee point. |
double KneeCompressionRatio { get; set; } |
The compression ratio achieved at the knee point. |
double KneeFraction { get; set; } |
The compressed fraction at the knee: the most compression that still meets the retention tolerance. |
double ReconstructionError { get; set; } |
Root-mean-square error between the original and decompressed weights at full compression. |
double RetentionTolerance { get; set; } |
The retention tolerance the knee was selected against (a point qualifies when it clears this). |
long CompressedSizeBytes { get; set; } |
The compressed size in bytes at full compression (every weight through the strategy). |
long OriginalSizeBytes { get; set; } |
The uncompressed size of the parameters in bytes. |
long ParameterCount { get; set; } |
The number of trainable parameters that were compressed. |
string StrategyName { get; set; } |
The configured compression strategy’s type name. |