Description
Add tokenizer_kwargs and model_kwargs to AttributionExplainer.explain() and propagate to the called functions.
These parameters should be dictionaries and not an undefined **kwargs.
Motivation
We initially added a default truncation=True, but @NLP-traveller has other parameter needs. Depending on the use case, one might want to modify the default parameters used during tokenization or model forwarding. For example, truncation=True, max_length=128...
Commit to Help
Description
Add
tokenizer_kwargsandmodel_kwargstoAttributionExplainer.explain()and propagate to the called functions.These parameters should be dictionaries and not an undefined
**kwargs.Motivation
We initially added a default
truncation=True, but @NLP-traveller has other parameter needs. Depending on the use case, one might want to modify the default parameters used during tokenization or model forwarding. For example,truncation=True,max_length=128...Commit to Help