Multimodal Autoregressive Pre-training of Large Vision Encoders
Paper โข 2411.14402 โข Published โข 48
How to use timm/aimv2_large_patch14_448.apple_pt with timm:
import timm
model = timm.create_model("hf-hub:timm/aimv2_large_patch14_448.apple_pt", pretrained=True)How to use timm/aimv2_large_patch14_448.apple_pt with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-feature-extraction", model="timm/aimv2_large_patch14_448.apple_pt") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModel
processor = AutoImageProcessor.from_pretrained("timm/aimv2_large_patch14_448.apple_pt")
model = AutoModel.from_pretrained("timm/aimv2_large_patch14_448.apple_pt", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModel
processor = AutoImageProcessor.from_pretrained("timm/aimv2_large_patch14_448.apple_pt")
model = AutoModel.from_pretrained("timm/aimv2_large_patch14_448.apple_pt", device_map="auto")timm compatible AIM-v2 (https://huggingface.co/papers/2411.14402) image encoder weights from https://huggingface.co/apple/aimv2-large-patch14-448
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="timm/aimv2_large_patch14_448.apple_pt")