inseq
inseq copied to clipboard
Interpretability for sequence generation models π π
## Description This PR addresses the possibility of skipping special tokens during attribution using the `skip_special_tokens=True` argument. Example usage (regular attribution): ```python import inseq model = inseq.load_model("mymusise/CPM-Generate-distill", "integrated_gradients") out =...
## π Bug Report When the model's (Llama2-7b-chat-hf) output contains emoji, PECORE will show an error of: Traceback (most recent call last): File "/gpfs/home5/jqi2/research/ALCE/compare_pecora.py", line 212, in main() File "/gpfs/home5/jqi2/research/ALCE/compare_pecora.py",...
## Description Added support for saving attributions in a lower tensor precision. Upon saving, tensors are transformed to hugginface safetensors. Then they are optionally quantized to float16, int8 or uint8...
## Description Implements the rollout aggregation function originally described by [Abnar and Zuidema (2020)](https://aclanthology.org/2020.acl-main.385/), and later applied for encoder-decoder attribution by [Ferrando et al. (2022)](https://aclanthology.org/2022.emnlp-main.599/). ### Notes This implementation was...
Convert tensor's dtype to "float" before moving to CPU, which avoids errors when using "bf16" ## Description add .float() before .cpu() to support half precision data type ## Checklist -...
## Description The [ALTI+ method](https://arxiv.org/abs/2205.11631v2) is an extension of [ALTI](https://arxiv.org/abs/2203.04212) for encoder-decoder (and by extension, decoder-only) models. Authors: @gegallego @javiferran **Implementation notes:** - The current implementation extracts input features for...
## π Feature Request The following is a non-exhaustive list of perturbation-based feature attribution methods that could be added to the library: Method name Source In Captum Code implementation Status...
## π Feature Request The following is a non-exhaustive list of gradient-based feature attribution methods that could be added to the library: Method name Source In Captum Code implementation Status...
## π Feature Request The following is a non-exhaustive list of step functions that could be added to the library: Method name Source Code implementation Β Status EigenScore Chen et al....
## π Feature Request The following is a non-exhaustive list of attention-based feature attribution methods that could be added to the library: Method name Source Code implementation Β Status Last-Layer Attention...