Currently the user has to decide whether the model should output the hidden states when she/he creates the config of a model: config.output_hidden_states = True/False. It would be nice if the user can decide this when calling the models forward() / call() with a flag output_hidden_states. This should be done for all TF and PT models that can output hidden states.
A very similar recent change was done for the variable config.output_past -> see PR:https://github.com/huggingface/transformers/pull/3734
The user has more flexibility when the hidden states should be output or not.
If someone feels like contributing to the library, this would be a great first PR. I'm very happy to guide the contributor through the PR!
Hi, @patrickvonplaten I want to take up this issue. Can I move forward with it?
I think this could have side effects for libraries that use config.output_hidden_states, so I'm cc'ing @Timoeller and @brandenchan, because this parameter is used in FARM.
Hi, @patrickvonplaten I want to take up this issue. Can I move forward with it?
That would be great, feel free to open a PR and do a first model. The PR should be very similar to what was done in PR #3734
Hi, @patrickvonplaten as I am new here I might take some time to get acquainted with the codebase and come up with a PR. Is it okay?
Sorry @gaurav-singh1998, I saw this issue was still open so I made a PR for it.
Okay, no issues @drjosephliu I'll find some other good first issues to solve.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Okay, no issues @drjosephliu I'll find some other good first issues to solve.