Skip to content

OptiPFair v0.1.5 - Layer Importance Analysis

Latest

Choose a tag to compare

@peremartra peremartra released this 24 Sep 21:34
· 12 commits to main since this release

New Features

Layer Importance Analysis

  • Added analyze_layer_importance() function for analyzing transformer layer importance using cosine similarity
  • Multi-architecture support: automatic detection of layer paths for LLaMA, Qwen, Mistral, GPT-2, and other architectures
  • Integration with depth pruning workflows to inform layer removal decisions
  • Progress tracking and robust error handling

Improvements

  • Enhanced documentation with layer analysis examples
  • Updated API reference with new functionality

Usage Example

from optipfair import analyze_layer_importance
importance_scores = analyze_layer_importance(model, dataloader)