Systematically explore weight compression configurations (quantization and palettization) for a PyTorch model using coreai-opt, presenting a comprehensive overview of accuracy-vs-size tradeoff options. Use this skill…
---
name: model-compression-exploration
description: Systematically explore weight compression configurations (quantization and palettization) for a PyTorch model using coreai-opt, presenting a comprehensive overview of accuracy-vs-size tradeoff options. Use this skill whenever the user wants to compress a model, explore quantization or palettization options, understand compression config tradeoffs, reduce model size, or compare different compression techniques. Also trigger when the user mentions coreai-opt compression, weight quantization exploration, or palettization exploration — even if they don't say "explore" explicitly.
---
# Model Compression Exploration
Systematically explore weight-only compression configurations for a PyTorch model using `coreai_opt`. The goal is to present the user with a clear overview of accuracy-vs-size tradeoff options across quantization and palettization, organized into three experiment groups.
## Supporting files
| File | Contents |
| --------------------------------------------------------------- | ------------------------------------------------------ |
| [`compression_patterns.md`](references/compression_patterns.md) | Empirical patterns: what works, what doesn't, and why |
| [`size_estimation.md`](references/size_estimation.md) | How to compute theoretical compressed model size |
| [`experiment_runner.md`](references/experiment_runner.md) | Memory-safe experiment loop, helpers, average bitwidth |
| [`output_report.md`](references/output_report.md) | How to format and organize the output produced |
## Bundled scripts
The deterministic helpers are unit-tested and importable. Prefer them over hand-rolled equivalents — they encode formulas and edge cases that have already been debugged.
| Script | Purpose |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| [`scripts/compression_metrics.py`](scripts/compression_metrics.py) | Theoretical size, average bitwidth, divisibility, parametrize walk |… install to load the full skill