FX helper functions and quick fixes
# What does this PR do?

This PR adds small helper functions and fixes small issues regarding `torch.fx` symbolic tracing for models from the library.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.<|||||>Should this be merged @michaelbenayoun?<|||||>No, this is not up to date anymore.
Closing this!