| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-11-10 | 2.3 kB | |
| Release v0.3.0 source code.tar.gz | 2025-11-10 | 4.6 MB | |
| Release v0.3.0 source code.zip | 2025-11-10 | 4.7 MB | |
| Totals: 3 Items | 9.3 MB | 1 | |
🚀 Pruna 0.3.0 — Structural Refactor and Interface Upgrade
Today, the pruna package is getting a long-awaited upgrade! To support a growing variety of algorithms in the long term, we have refactored the internal structure that defines how algorithms are organized and applied.
Why the Refactor
In previous versions, certain algorithm groups — such as cachers or quantizers — were tightly coupled to the package’s structure. This rigid grouping made it difficult to introduce new types of algorithms, or to combine them in flexible ways.
Starting with Pruna 0.3.0, we’ve reworked this system so that such classifications are no longer hard constraints. Instead, they now serve as supplementary metadata, enabling a more modular, composable, and future-proof design. This refactor lays the groundwork for integrating new optimization techniques and custom pipelines without structural limitations.
New Interface
This release also introduces a more flexible configuration interface. You can now define your SmashConfig either as a simple list of algorithm names:
:::python
from pruna import SmashConfig
config = SmashConfig(["torch_compile", "deepcache"])
or as a dictionary with detailed per-algorithm parameters:
:::python
from pruna import SmashConfig
config = SmashConfig({
"hqq":
{
"weight_bits": 4,
"compute_dtype": "torch.bfloat16"
},
"torch_compile":
{
"fullgraph": True,
"mode": "max-autotune"
}
})
Algorithm Ordering and Compatibility
Another major change is how algorithm application order is determined. Previously, the execution sequence was dictated by the hierarchy of algorithm classes and a global ordering. In 0.3.0, this has been replaced by a more atomic and declarative system: each algorithm now specifies its own compatibility rules and ordering constraints.
This makes the algorithm pipeline more self-organizing, robust to new extensions, and capable of resolving valid combinations dynamically.
Full Changelog: https://github.com/PrunaAI/pruna/compare/v0.2.11...v0.3.0