Skip to content
ModelListedExternal
Download

Vit Base Patch16 224 In21k

with ONNX weights to be compatible with Transformers.js.

KindOtherBase modelgoogle/vit-base-patch16-224-in21kVersionRevision 61fac55

Model source

Kind
Other
File size
47.4–328 MB
Base model
google/vit-base-patch16-224-in21k
Version
vRevision 61fac55
Updated
Sep 22, 2026
Downloads
429
Source
Hugging Face

Source description

https://huggingface.co/google/vit-base-patch16-224-in21k with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Perform image feature extraction.

import { pipeline } from '@huggingface/transformers';

const image_feature_extractor = await pipeline('image-feature-extraction', 'Xenova/vit-base-patch16-224-in21k');
const url = 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png';
const features = await image_feature_extractor(url);

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Sources

1 source
Hugging FacePrimaryVersion 61fac5535c0892bf3cb028651c04deb24012e9b6
huggingface.co/Xenova/vit-base-patch16-224-in21k/tree/61fac5535c0892bf3cb028651c04deb24012e9b6

Verified Sep 9

Model artifacts

7 artifacts

onnx/model_bnb4.onnx

onnx · 49.0 MB · SHA-256 1ac2e92cd215…fdbe · Hugging Face

Download

onnx/model_fp16.onnx

onnx · 164 MB · SHA-256 cade95108dc8…333c · Hugging Face

Download

onnx/model_q4.onnx

onnx · 54.1 MB · SHA-256 a5e5af98d086…049d · Hugging Face

Download

onnx/model_q4f16.onnx

onnx · 47.4 MB · SHA-256 bb3e05f66508…f489 · Hugging Face

Download

onnx/model_quantized.onnx

onnx · 83.4 MB · SHA-256 9a4e5e2da2ca…cde6 · Hugging Face

Download

onnx/model_uint8.onnx

onnx · 82.9 MB · SHA-256 42914befe9a0…1722 · Hugging Face

Download

onnx/model.onnx

onnx · 328 MB · SHA-256 2a3c78869fb1…d7fb · Hugging Face

Download

Source excerpts

2 excerpts

--- base_model: google/vit-base-patch16-224-in21k library_name: transformers.js --- https://huggingface.co/google/vit-base-patch16-224-in21k with ONNX weights to be compatible with Transformers.js. ## Usage (Transformers.js) If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using: ```bash npm i @huggingface/transformers ``` **Example:** Perform image feature extraction. ```js import { pipeline } from '@huggingface/transformers'; const image_feature_extractor = await pipeline('image-feature-extraction', 'Xenova/vit-base-patch16-224-in21k'); const url = 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png'; const features = await image_feature_extractor(url); ``` Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).

Source context: 429 downloads · 4 likes · Pipeline image-feature-extraction · Library transformers.js · Repo Xenova/vit-base-patch16-224-in21k