Ir para o conteúdo
ModelListadosExterno
Baixar

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.

TipoOtherVersãoRevision e266886Bnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
327 MB
Versão
vRevision e266886
Atualizado
24 de out. de 2026
Downloads
17
Fonte
Hugging Face

Descrição da fonte

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

Fontes

1 fonte
Hugging FacePrimárioVersão e26688627e7c083e795f2249135b8cf4ec9d986a
huggingface.co/BiliSakura/last-vit-clip-vitb16/tree/e26688627e7c083e795f2249135b8cf4ec9d986a

Verificado 18 de ago.

Artefatos de modelo

1 artefato

model.safetensors

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

Download file

Trechos de fonte

2 trechos

--- 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