Instructions to use OpenGVLab/InternVL-14B-224px with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL-14B-224px with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="OpenGVLab/InternVL-14B-224px", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("OpenGVLab/InternVL-14B-224px", trust_remote_code=True) model = AutoModel.from_pretrained("OpenGVLab/InternVL-14B-224px", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update modeling_internvl.py
Browse files- modeling_internvl.py +1 -1
modeling_internvl.py
CHANGED
|
@@ -42,7 +42,7 @@ class InternVLPreTrainedModel(PreTrainedModel):
|
|
| 42 |
_keys_to_ignore_on_load_missing = [
|
| 43 |
r'position_ids',
|
| 44 |
]
|
| 45 |
-
_no_split_modules = ['InternAttention', 'LlamaDecoderLayer']
|
| 46 |
_skip_keys_device_placement = 'past_key_values'
|
| 47 |
_keep_in_fp32_modules = ['wo']
|
| 48 |
|
|
|
|
| 42 |
_keys_to_ignore_on_load_missing = [
|
| 43 |
r'position_ids',
|
| 44 |
]
|
| 45 |
+
_no_split_modules = ['InternAttention', 'LlamaDecoderLayer', 'LlamaForCausalLM']
|
| 46 |
_skip_keys_device_placement = 'past_key_values'
|
| 47 |
_keep_in_fp32_modules = ['wo']
|
| 48 |
|