Instructions to use OpenGVLab/InternViT-6B-224px with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternViT-6B-224px with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="OpenGVLab/InternViT-6B-224px", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenGVLab/InternViT-6B-224px", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_intern_vit.py
Browse files- modeling_intern_vit.py +1 -0
modeling_intern_vit.py
CHANGED
|
@@ -279,6 +279,7 @@ class InternVisionEncoder(nn.Module):
|
|
| 279 |
class InternVisionModel(PreTrainedModel):
|
| 280 |
main_input_name = 'pixel_values'
|
| 281 |
config_class = InternVisionConfig
|
|
|
|
| 282 |
|
| 283 |
def __init__(self, config: InternVisionConfig):
|
| 284 |
super().__init__(config)
|
|
|
|
| 279 |
class InternVisionModel(PreTrainedModel):
|
| 280 |
main_input_name = 'pixel_values'
|
| 281 |
config_class = InternVisionConfig
|
| 282 |
+
_no_split_modules = ['InternAttention']
|
| 283 |
|
| 284 |
def __init__(self, config: InternVisionConfig):
|
| 285 |
super().__init__(config)
|