Exit early in load if no weights are in the sharded state dict
# What does this PR do?

As suggested by @stas00 in #18911, this PR checks whether there any parameters in the state dict to load in the current module and exits early if there are none. This might be useful when loading a huge model with a lot of shards.

@stas00 could you try and see if there is a gain with this or not?
_The documentation is not available anymore as the PR was closed or merged._