Instructions to use aneforge/clip-vit-base-patch32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ANEForge
How to use aneforge/clip-vit-base-patch32 with ANEForge:
# Run this model on the Apple Neural Engine, without CoreML. import aneforge as af clip = af.load_clip("aneforge/clip-vit-base-patch32") labels = clip.classify(image, ["a photo of a cat", "a photo of a dog"]) # image: a PIL.Image; zero-shot (label, prob) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from aneforge/clip-vit-base-patch32: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/aneforge/clip-vit-base-patch32/resolve/main/README.md
- Command line
-
hf download hf://aneforge/clip-vit-base-patch32/README.md
-
curl -L -o README.md https://huggingface.co/aneforge/clip-vit-base-patch32/resolve/main/README.md
1.08 kB
| library_name: aneforge | |
| base_model: openai/clip-vit-base-patch32 | |
| pipeline_tag: zero-shot-image-classification | |
| tags: | |
| - aneforge | |
| - apple-neural-engine | |
| - clip | |
| # CLIP ViT-B/32 (ANEForge) | |
| An unmodified duplicate of [`openai/clip-vit-base-patch32`](https://huggingface.co/openai/clip-vit-base-patch32), 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. See the original repo for license terms. | |
| ## Use with ANEForge | |
| ```python | |
| # pip install "aneforge[models]" | |
| import aneforge as af | |
| clip = af.load_clip("aneforge/clip-vit-base-patch32") | |
| print(clip.classify(image, ["a photo of a cat", "a photo of a dog"])) # image: a PIL.Image; zero-shot (label, prob) | |
| ``` | |
| 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). | |