Model reference · open weights
aimv2-large-patch14-224 is an open-weight embedding model from apple. aimv2-large-patch14-224 (FP32) weighs 1.2 GB; the smallest configuration that runs it is RTX 3060 12 GB.
What it is
| Released by | apple |
|---|---|
| Type | Embedding models |
| Task | Image embed |
| Parameters (lead) | 309M |
| Runs with | transformers |
| Released | 2024-10-29 |
| Popularity | 1k downloads / month |
| Weights | 1.2 GB (aimv2-large-patch14-224 (FP32), file size) |
| Licence | Its own licence terms |
What it runs on
Weights 1.2 GB (file size) · overhead about 1.1 GB.
| Card | Runs | Counted memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Estimates, not measurements: the weights are the build's file size. No cache grows with use; a batch of inputs needs working memory of its own. Counted memory is 92 % of what CUDA reports for the card.
From the model card
[AIMv2 Paper] [BibTeX]
We introduce the AIMv2 family of vision models pre-trained with a multimodal autoregressive objective. AIMv2 pre-training is simple and straightforward to train and scale effectively. Some AIMv2 highlights include:
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModel
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained(
"apple/aimv2-large-patch14-224",
revision="ac764a25c832c7dc5e11871daa588e98e3cdbfb7",
)
model = AutoModel.from_pretrained(
"apple/aimv2-large-patch14-224",
revision="ac764a25c832c7dc5e11871daa588e98e3cdbfb7",
trust_remote_code=True,
)
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
import requests
from PIL import Image
from transformers import AutoImageProcessor, FlaxAutoModel
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained(
"apple/aimv2-large-patch14-224",
)
model = FlaxAutoModel.from_pretrained(
"apple/aimv2-large-patch14-224",
trust_remote_code=True,
)
inputs = processor(images=image, return_tensors="jax")
outputs = model(**inputs)
If you find our work useful, please consider citing us as:
@misc{fini2024multimodalautoregressivepretraininglarge,
author = {Fini, Enrico and Shukor, Mustafa and Li, Xiujun and Dufter, Philipp and Klein, Michal and Haldimann, David and Aitharaju, Sai and da Costa, Victor Guilherme Turrisi and Béthune, Louis and Gan, Zhe and Toshev, Alexander T and Eichner, Marcin and Nabi, Moin and Yang, Yinfei and Susskind, Joshua M. and El-Nouby, Alaaeldin},
url = {https://arxiv.org/abs/2411.14402},
eprint = {2411.14402},
eprintclass = {cs.CV},
eprinttype = {arXiv},
title = {Multimodal Autoregressive Pre-training of Large Vision Encoders},
year = {2024},
}
Quoted from the model card on Hugging Face — the full card is behind the Hugging Face link above.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | imagenet-1k | Accuracy | 86.600 |
| Classification | inaturalist-18 | Accuracy | 76 |
| Classification | cifar10 | Accuracy | 99.100 |
| Classification | cifar100 | Accuracy | 92.200 |
| Classification | food101 | Accuracy | 95.700 |
| Classification | dtd | Accuracy | 87.900 |
| Classification | oxford-pets | Accuracy | 96.300 |
| Classification | stanford-cars | Accuracy | 96.300 |
| Classification | camelyon17 | Accuracy | 93.700 |
| Classification | patch-camelyon | Accuracy | 89.300 |
| Classification | rxrx1 | Accuracy | 5.600 |
| Classification | eurosat | Accuracy | 98.400 |
| Classification | fmow | Accuracy | 60.700 |
| Classification | domainnet-infographic | Accuracy | 69 |