Skip to content

Release v0.3.0

Choose a tag to compare

@johannaSommer johannaSommer released this 10 Nov 09:50
· 45 commits to main since this release
02f9779

🚀 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:

from pruna import SmashConfig

config = SmashConfig(["torch_compile", "deepcache"])

or as a dictionary with detailed per-algorithm parameters:

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: v0.2.11...v0.3.0