Skip to content
ModelListedExternal
Download

Last Vit Clip Vitb16

Vision encoder from OpenCLIP ViT-B/16 with LAST-ViT pooling. Converted to HuggingFace Transformers format from the LAST-ViT openaib16 checkpoint.

KindOtherVersionRevision e266886Bgrade

Model source

Kind
Other
File size
327 MB
Version
vRevision e266886
Updated
Oct 24, 2026
Downloads
17
Source
Hugging Face

Source description

LAST-ViT CLIP ViT-B/16 (Text-Supervised)

Vision encoder from OpenCLIP ViT-B/16 with LAST-ViT pooling. Converted to HuggingFace Transformers format from the LAST-ViT openai_b_16 checkpoint.

This is the vision encoder only (no text encoder). Use for image embedding extraction or as a backbone for vision tasks.

Model Details

  • Architecture: ViT-B/16 (Vision Transformer Base, patch size 16×16)
  • Training scenario: Text-supervised (CLIP)
  • Hidden size: 768
  • Num layers: 12
  • Num attention heads: 12
  • Image size: 224×224

Usage

from transformers import ViTModel, ViTImageProcessor
from PIL import Image

model = ViTModel.from_pretrained("BiliSakura/last-vit-clip-vitb16")
processor = ViTImageProcessor.from_pretrained("BiliSakura/last-vit-clip-vitb16")

image = Image.open("your_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)

# Image embeddings (CLS token)
embeddings = outputs.last_hidden_state[:, 0, :]  # (batch, 768)

References

Sources

1 source
Hugging FacePrimaryVersion e26688627e7c083e795f2249135b8cf4ec9d986a
huggingface.co/BiliSakura/last-vit-clip-vitb16/tree/e26688627e7c083e795f2249135b8cf4ec9d986a

Verified Aug 18

Model artifacts

1 artifact

model.safetensors

safetensors · 327 MB · SHA-256 fbe3f2a1b34b…8a21 · Hugging Face

Download file

Source excerpts

2 excerpts

--- tags: - vision - vit - last-vit - clip - text-supervised license: mit library_name: transformers --- # LAST-ViT CLIP ViT-B/16 (Text-Supervised) Vision encoder from [OpenCLIP](https://github.com/mlfoundations/open_clip) ViT-B/16 with LAST-ViT pooling. Converted to HuggingFace Transformers format from the [LAST-ViT](https://github.com/ChengShiest/LAST-ViT) openai_b_16 checkpoint. This is the **vision encoder only** (no text encoder). Use for image embedding extraction or as a backbone for vision tasks. ## Model Details - **Architecture:** ViT-B/16 (Vision Transformer Base, patch size 16×16) - **Training scenario:** Text-supervised (CLIP) - **Hidden size:** 768 - **Num layers:** 12 - **Num attention heads:** 12 - **Image size:** 224×224 ## Usage ```python from transformers import ViTModel, ViTImageProcessor from PIL import Image model = ViTModel.from_pretrained("BiliSakura/last-vit-clip-vitb16") processor = ViTImageProcessor.from_pretrained("BiliSakura/last-vit-clip-vitb16") image = Image.open("your_image.jpg").convert("RGB") inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) # Image embeddings (CLS token) embeddings = outputs.last_hidden_state[:, 0, :] # (batch, 768) ``` ## References - **Repository:** [ChengShiest/LAST-ViT](https://github.com/ChengShiest/LAST-ViT) - **CLIP training:** [mlfoundations/open_clip](https://github.com/mlfoundations/open_clip) - **Original weights:** [openai_b_16.pt](https://github.com/ChengShiest/LAST-ViT/releases/download/weights/openai_b_16.pt)

Source context: 17 downloads · 0 likes · Pipeline image-feature-extraction · Library transformers · Repo BiliSakura/last-vit-clip-vitb16