Refactor VLM modules / Add InternVit submodule support
State: open | Pull request: yes

# What does this PR do ?

Refactor VLM modules / Add InternVit submodule support

**Collection**: [multimodal / vlm]

# Changelog 
- Add specific line by line info of high level changes in this PR.

# Usage
* You can potentially add a usage example below

```python
# Add a code snippet demonstrating how to use this 
```

# GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

# Before your PR is "Ready for review"
**Pre checks**:
- [ ] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [ ] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)


<!-- pylint-output-strict-mode-true -->

beep boop 🤖: 🚨 The following files must be fixed before merge!

---

Your code was analyzed with PyLint. The following annotations have been identified:

```
************* Module nemo.collections.vlm.vision.base
nemo/collections/vlm/vision/base.py:38:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/base.py:67:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/base.py:136:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/base.py:148:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/base.py:175:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/base.py:198:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.collections.vlm.vision.clip_vit
nemo/collections/vlm/vision/clip_vit.py:73:0: C0301: Line too long (128/119) (line-too-long)
nemo/collections/vlm/vision/clip_vit.py:74:0: C0301: Line too long (124/119) (line-too-long)
nemo/collections/vlm/vision/clip_vit.py:75:0: C0301: Line too long (131/119) (line-too-long)
nemo/collections/vlm/vision/clip_vit.py:76:0: C0301: Line too long (127/119) (line-too-long)
nemo/collections/vlm/vision/clip_vit.py:81:0: C0301: Line too long (120/119) (line-too-long)
nemo/collections/vlm/vision/clip_vit.py:12:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/clip_vit.py:17:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/clip_vit.py:23:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/clip_vit.py:45:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/clip_vit.py:63:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/clip_vit.py:98:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/clip_vit.py:5:0: W0611: Unused CLIPVisionModel imported from transformers (unused-import)
************* Module nemo.collections.vlm.vision.intern_vit
nemo/collections/vlm/vision/intern_vit.py:47:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:140:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/intern_vit.py:182:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:193:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:255:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/intern_vit.py:287:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:316:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:321:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:341:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:346:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/intern_vit.py:352:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/vision/intern_vit.py:375:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/intern_vit.py:409:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/vision/intern_vit.py:446:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.47/10
```

---

Mitigation guide:

* Add sensible and useful docstrings to functions and methods
* For trivial methods like getter/setters, consider adding `# pylint: disable=C0116` inside the function itself
* To disable multiple functions/methods at once, put a `# pylint: disable=C0116` before the first and a `# pylint: enable=C0116` after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

<!-- pylint-output-strict-mode-false -->

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.

---

Your code was analyzed with PyLint. The following annotations have been identified:

```
************* Module nemo.collections.vlm.neva.model.base
nemo/collections/vlm/neva/model/base.py:321:0: C0301: Line too long (139/119) (line-too-long)
nemo/collections/vlm/neva/model/base.py:324:0: C0301: Line too long (128/119) (line-too-long)
nemo/collections/vlm/neva/model/base.py:349:0: C0301: Line too long (123/119) (line-too-long)
nemo/collections/vlm/neva/model/base.py:101:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:147:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:164:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/base.py:195:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:229:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/base.py:736:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/base.py:753:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:757:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:789:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:792:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:795:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:799:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:805:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:812:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/base.py:35:0: W0611: Unused get_batch_on_this_context_parallel_rank imported from nemo.collections.llm.gpt.model.base (unused-import)
nemo/collections/vlm/neva/model/base.py:35:0: W0611: Unused get_packed_seq_params imported from nemo.collections.llm.gpt.model.base (unused-import)
************* Module nemo.collections.vlm.neva.model.llava
nemo/collections/vlm/neva/model/llava.py:110:0: C0301: Line too long (137/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:111:0: C0301: Line too long (122/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:112:0: C0301: Line too long (146/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:113:0: C0301: Line too long (144/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:151:0: C0301: Line too long (128/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:152:0: C0301: Line too long (161/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:153:0: C0301: Line too long (157/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:154:0: C0301: Line too long (150/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:155:0: C0301: Line too long (146/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:156:0: C0301: Line too long (158/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:157:0: C0301: Line too long (154/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:158:0: C0301: Line too long (135/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:159:0: C0301: Line too long (131/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:160:0: C0301: Line too long (135/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:161:0: C0301: Line too long (131/119) (line-too-long)
nemo/collections/vlm/neva/model/llava.py:42:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/llava.py:48:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/llava.py:61:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/llava.py:73:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/llava.py:85:0: C0115: Missing class docstring (missing-class-docstring)
nemo/collections/vlm/neva/model/llava.py:107:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/llava.py:182:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/llava.py:188:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/collections/vlm/neva/model/llava.py:228:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.08/10
```

---

Mitigation guide:

* Add sensible and useful docstrings to functions and methods
* For trivial methods like getter/setters, consider adding `# pylint: disable=C0116` inside the function itself
* To disable multiple functions/methods at once, put a `# pylint: disable=C0116` before the first and a `# pylint: enable=C0116` after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!