Skip to content

Baselines #244

Closed Answered by gsarti
JanAthmer asked this question in Q&A
Jan 10, 2024 · 1 comment
Discussion options

You must be logged in to vote

Hi @JanAthmer, thank you for your question!

Currently, there is no support to customize the baseline passed to the underlying Captum method, and the UNK token is used by default.

We have an open issue proposing the introduction of customizable baselines for methods such as occlusion and IG: #123. However, this is not currently among our priorities for the next release. If you want to test out the 0-vector baseline rapidly, I suggest cloning the repo, installing it locally and changing the following line to use 0s instead of unk_token_id:

baseline_ids_non_eos = batch["input_ids"].ne(self.eos_token_id).long() * self.tok…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gsarti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants