`no_split_modules` now captures values recursively (#3032)
* `no_split_modules` now captures values recursively
As of transformers v5.1.0 (specifically [this commit](https://github.com/huggingface/transformers/commit/36ec3bfa33ebf6c3b38a1d6808292aeea4aae84d))
the `model._no_split_modules` attribute captures the values of the model's children and returns a set of values
instead of a list. In case of transformers >=v5.1.0 we can therefore just return the attribute and save
iterating over the module. This is also reflected in the test.
This consolidates the global `is_transformers_...` variables to be in one file rather than various ones. Local version checks are not consolidated as it is unclear where local imports make sense and to keep the changes down.