cdpierse / transformers-interpret

Model explainability that works seamlessly with 🤗 transformers. Explain your transformers model in just 2 lines of code.
Apache License 2.0
1.29k stars 97 forks source link

How to use classification explainer for custom models? #145

Open Hossein-1991 opened 6 months ago

Hossein-1991 commented 6 months ago

I've just been introduced to your package (it is so helpful). I have a question regarding the classification explainer. I've fine-tuned a distilbert model on a specific dataset with my own designed classifier (several fc layers) on top of that (so, my model is not in the pretrained bert models): soal

when I try to use the package to interpret outcomes, it gives this error: 'Distilbert' object has no attribute 'config'. How should I fix that? Thanks