How to use from the
Use from the
ANEForge library
# Run this model on the Apple Neural Engine, without CoreML.
import aneforge as af

vit = af.load_vit("aneforge/vit-base-patch16-224")
labels = vit.classify(image)                  # image: a PIL.Image; returns top-k (label, logit)

ViT-Base (patch16-224) (ANEForge)

An unmodified duplicate of google/vit-base-patch16-224, tagged for use with ANEForge so the weights load and run directly on the Apple Neural Engine (no CoreML). Weights are byte-identical to the source; see the original repo for the model details. Licensed apache-2.0 from the source.

Use with ANEForge

# pip install "aneforge[models]"
import aneforge as af

vit = af.load_vit("aneforge/vit-base-patch16-224")
print(vit.classify(image))          # top-k (label, logit)

ANEForge compiles the model's graph into a single ANE program and streams the weights from this repo via huggingface_hub. See the docs and the paper.

Downloads last month
9
Safetensors
Model size
86.6M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for aneforge/vit-base-patch16-224

Finetuned
(2105)
this model

Paper for aneforge/vit-base-patch16-224