Enable device map
Author: darshana1406
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes https://github.com/huggingface/transformers/issues/30858


- Added    ` _no_split_modules = ["VideoLlavaVisionAttention"]` to `src/transformers/models/video_llava/modeling_video_llava.py`
- Works on a 4 GPU NVIDIA GeForce RTX 2080 Ti setup.


## Who can review?

@zucchini-nlp @amyeroberts 

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier

Library:

- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100

Integrations:

- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada

Documentation: @stevhliu and @MKhalusova

HF projects:

- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Maintained examples (not research project or legacy):

- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1

 -->


Comments:
Thanks for adding this feature @darshana1406! 

Could you run the following tests in a multi-gpu environment and share the terminal output? 

```
pytest tests/models/video_llava/test_modeling_ video_llava.py -vv -k "offload or parallelism"
```

Awesome, thanks a lot for adding device map support!

@amyeroberts Here is the terminal output.

```
(videocon) darshana.s@gnode084:~/transformers$ python -m pytest tests/models/video_llava/test_modeling_video_llava.py -vv -k "offload or parallelism"
============================================================= test session starts =============================================================
platform linux -- Python 3.10.14, pytest-8.2.0, pluggy-1.5.0 -- /home2/darshana.s/miniconda3/envs/videocon/bin/python
cachedir: .pytest_cache
rootdir: /home2/darshana.s/transformers
configfile: pyproject.toml
plugins: anyio-4.3.0
collected 125 items / 121 deselected / 4 selected                                                                                             

tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_cpu_offload <- tests/test_modeling_common.py PASSED [ 25%]
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_bin <- tests/test_modeling_common.py PASSED [ 50%]
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_safetensors <- tests/test_modeling_common.py PASSED [ 75%]
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_model_parallelism <- tests/test_modeling_common.py PASSED [100%]

============================================================== warnings summary ===============================================================
../miniconda3/envs/videocon/lib/python3.10/site-packages/_pytest/config/__init__.py:1448
  /home2/darshana.s/miniconda3/envs/videocon/lib/python3.10/site-packages/_pytest/config/__init__.py:1448: PytestConfigWarning: Unknown config option: doctest_glob
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_cpu_offload
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_cpu_offload
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_bin
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_bin
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_safetensors
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_model_parallelism
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_model_parallelism
  /home2/darshana.s/miniconda3/envs/videocon/lib/python3.10/site-packages/accelerate/utils/modeling.py:1142: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
    logger.warn(

tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_cpu_offload
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_bin
tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationModelTest::test_disk_offload_safetensors
  /home2/darshana.s/miniconda3/envs/videocon/lib/python3.10/site-packages/accelerate/utils/modeling.py:1363: UserWarning: Current model requires 262176 bytes of buffer for offloaded layers, which seems does not fit any GPU's remaining memory. If you are experiencing a OOM later, please consider using offload_buffers=True.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== 4 passed, 121 deselected, 11 warnings in 25.69s ===============================================
```

Thank you for guiding me! @zucchini-nlp @amyeroberts