add util for ram efficient loading of model when using fsdp
# What does this PR do?
1. Fixes an issue explained in https://github.com/pytorch/pytorch/issues/105840 when using FSDP for training very large models. Should be merged after https://github.com/huggingface/accelerate/pull/1777

Currently, when using FSDP, the model is loaded for each of the N processes completely on CPU leading to huge CPU RAM usage. When training models like Flacon-40B with FSDP on a dgx node with 8 GPUs, it would lead to CPU RAM getting out of memory because each process is loading 160GB (40B x 4Bytes (FP32)) in CPU RAM for a total of 160*8=1280GB requirement which results in script getting killed due to out of CPU RAM.

To combat this, we load the model only on rank 0 and have it on meta device when rank!=0. Then use no-op param_init_fn along with sync_module_states=True for FSDP to properly init the weights on other ranks and broadcast the params from rank 0 to other ranks. 

Usage:

1. FSDP config with `sync_module_states` set to True as shown below (config.yaml):

```yaml
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: FSDP
downcast_bf16: 'no'
fsdp_config:
  fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
  fsdp_backward_prefetch_policy: BACKWARD_PRE
  fsdp_forward_prefetch: true
  fsdp_offload_params: false
  fsdp_sharding_strategy: 1
  fsdp_state_dict_type: FULL_STATE_DICT
  fsdp_sync_module_states: true
  fsdp_transformer_layer_cls_to_wrap: BertLayer
  fsdp_use_orig_params: true
machine_rank: 0
main_training_function: main
mixed_precision: 'no'
num_machines: 1
num_processes: 2
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false
```

2.  Code snippet changes:
```diff
+ from transformers import load_pretrained_model_only_on_rank0

- model = AutoModelForSequenceClassification.from_pretrained(args.model_name_or_path, return_dict=True)
+ model = load_pretrained_model_only_on_rank0(
                AutoModelForSequenceClassification, AutoConfig, args.model_name_or_path
            )
```

3. Pass the model to Trainer if using that. The example code repo leveraging this is here: https://github.com/pacman100/ram_efficient_fsdp.

Without the util:
```
accelerator.process_index=1 CPU Memory before entering the train : 921
accelerator.process_index=1 CPU Memory consumed at the end of the loading (end-begin): 426
accelerator.process_index=1 CPU Peak Memory consumed during the loading (max-begin): 844
accelerator.process_index=1 CPU Total Peak Memory consumed during the loading (max): 1765

accelerator.process_index=0 CPU Memory before entering the train : 919
accelerator.process_index=0 CPU Memory consumed at the end of the loading (end-begin): 427
accelerator.process_index=0 CPU Peak Memory consumed during the loading (max-begin): 844
accelerator.process_index=0 CPU Total Peak Memory consumed during the loading (max): 1763
```

With `load_model_from_pretrained_only_on_rank0`:
```
accelerator.process_index=1 CPU Memory before entering the train : 920
accelerator.process_index=1 CPU Memory consumed at the end of the loading (end-begin): 6
accelerator.process_index=1 CPU Peak Memory consumed during the loading (max-begin): 5
accelerator.process_index=1 CPU Total Peak Memory consumed during the loading (max): 925

accelerator.process_index=0 CPU Memory before entering the train : 918
accelerator.process_index=0 CPU Memory consumed at the end of the loading (end-begin): 427
accelerator.process_index=0 CPU Peak Memory consumed during the loading (max-begin): 844
accelerator.process_index=0 CPU Total Peak Memory consumed during the loading (max): 1762
```

**So you can see that during loading Rank 1 doesn't take any more CPU RAM. And the performance between both setups matches.**

To Do:

- [ ] Add docs in the FSDP section

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_25107). All of your documentation changes will be reflected on that endpoint.