-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added transformers_config for passing arguments to the transformer #268
Conversation
@KennethEnevoldsen Thanks for this, and sorry for the delay reviewing it. I think it'll be a really nice feature, it's just a question of getting these details about the backwards compat right. |
Thanks, @honnibal, and completely understandable. It is potentially a feature that could be integrated nicely with displacy for displaying the attention given to each word. Not entirely sure though seems like the judge is still out on how interpretability these attention weights are. |
It looks like a binary file ".DS_Store" got committed by accident... |
@KennethEnevoldsen : Apologies again for the late follow-up! I just did one final round of review and think we should be able to wrap this up soon :-) |
No problem will follow up on this during the weekend |
Thanks again for your contribution and patience! I think this looks good - just made an internal note about the documentation & moving v1 to legacy, we'll take care of that in a separate PR. |
Added transformers_config to allow the user to pass arguments to the transformers forward pass. Most notably the output_attentions.
for convenience, I used this example to test the code:
which gives you:
Sidenote: it took me quite a while to find the default config str. It might be ideal to make this into a standalone file and load it in?