Instructions to use aneforge/vit-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ANEForge
How to use aneforge/vit-base-patch16-224 with ANEForge:
# 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) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from aneforge/vit-base-patch16-224: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/aneforge/vit-base-patch16-224/resolve/main/README.md
- Command line
-
hf download hf://aneforge/vit-base-patch16-224/README.md
-
curl -L -o README.md https://huggingface.co/aneforge/vit-base-patch16-224/resolve/main/README.md
1.02 kB
| library_name: aneforge | |
| license: apache-2.0 | |
| base_model: google/vit-base-patch16-224 | |
| pipeline_tag: image-classification | |
| tags: | |
| - aneforge | |
| - apple-neural-engine | |
| # ViT-Base (patch16-224) (ANEForge) | |
| An unmodified duplicate of [`google/vit-base-patch16-224`](https://huggingface.co/google/vit-base-patch16-224), tagged for use with | |
| [**ANEForge**](https://github.com/sbryngelson/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 | |
| ```python | |
| # 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](https://aneforge.readthedocs.io) and the | |
| [paper](https://arxiv.org/abs/2606.17090). | |