Image Feature Extraction
Transformers
JAX
Safetensors
MLX
PyTorch
aimv2_vision_model
vision
custom_code
Instructions to use apple/aimv2-large-patch14-336-distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apple/aimv2-large-patch14-336-distilled with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="apple/aimv2-large-patch14-336-distilled", trust_remote_code=True)# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("apple/aimv2-large-patch14-336-distilled", trust_remote_code=True) model = AutoModel.from_pretrained("apple/aimv2-large-patch14-336-distilled", trust_remote_code=True) - MLX
How to use apple/aimv2-large-patch14-336-distilled with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir aimv2-large-patch14-336-distilled apple/aimv2-large-patch14-336-distilled
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
Add `_no_split_modules`
Browse files- modeling_aimv2.py +1 -0
modeling_aimv2.py
CHANGED
|
@@ -149,6 +149,7 @@ class AIMv2PretrainedModel(PreTrainedModel):
|
|
| 149 |
config_class = AIMv2Config
|
| 150 |
base_model_prefix = "aimv2"
|
| 151 |
main_input_name = "pixel_values"
|
|
|
|
| 152 |
_supports_sdpa = True
|
| 153 |
|
| 154 |
|
|
|
|
| 149 |
config_class = AIMv2Config
|
| 150 |
base_model_prefix = "aimv2"
|
| 151 |
main_input_name = "pixel_values"
|
| 152 |
+
_no_split_modules = ["AIMv2ViTPreprocessor", "AIMv2Block"]
|
| 153 |
_supports_sdpa = True
|
| 154 |
|
| 155 |
|