You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current press code couples forward hook and score method, making it harder to implement custom workflows.
By decoupling pruning and scoring functionality, it is possible to add new pruning methods by subclassing BasePruner rather than using a wrapper function (e.g. PerLayerCompressionPruner).
The text was updated successfully, but these errors were encountered:
a utils.py module centralizing functions that are repeatedly use across different presses (e.g.compute_queries)
a distinction between SequenceScorer and ChannelScorer if more presses like ThinkPress appear (see Add ThinKPress #20)
a refactored of the README to move away from centralizing everything around the compression_ratio parameter. For some methods, the compression depends on the prompts, hence the compression ratio is not an input to the press but an output
Feature
Separate press class into two separate classes
.score
method.forward_hook
methodThe press class then works with dependency injection, e.g.,
ExpectedAttentionPress
can be expressed asMotivation
Current press code couples forward hook and score method, making it harder to implement custom workflows.
By decoupling pruning and scoring functionality, it is possible to add new pruning methods by subclassing
BasePruner
rather than using a wrapper function (e.g.PerLayerCompressionPruner
).The text was updated successfully, but these errors were encountered: