CoolFace
Modelpublic

alphaedge-ai/clip-ViT-B-32-multilingual-v1-hu-16384

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes23downloads
Model Card

clip-ViT-B-32-multilingual-v1-hu-16384

This model is a smaller version of sentence-transformers/clip-ViT-B-32-multilingual-v1 optimized for Hungarian language via vocabulary size reduction using the trimming method. This trimmed model should perform similarly to the original model with only 16,384 tokens and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in the selected languages were removed from the vocabulary.

Model Statistics

MetricOriginalTrimmedReduction
Vocabulary size119,547 tokens16,384 tokens72.59%
Model size (with visual encoder)222,976,512 params143,747,328 params35.53%
Model size (without visual encoder)135,127,296 params55,898,112 params58.63%

Model size (with visual encoder) image

Model size (without visual encoder) image

Mining Dataset Statistics

Usage

Sentence-transformers
python
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("aphaedge-ai/clip-ViT-B-32-multilingual-v1-hu-32768")
clip = SentenceTransformer("sentence-transformers/clip-ViT-B-32")

images = [
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg",
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg",
    "https://huggingface.co/datasets/huggingface/cats-image/resolve/main/cats_image.jpeg"
]
texts = ["Potential label 1 in Hungarian", "Potential label 2 in Hungarian", "Potential label 3 in Hungarian", "Potential label 4 in Hungarian"]

image_embeddings = clip.encode(images)
text_embeddings = model.encode(texts)
print(image_embeddings.shape, text_embeddings.shape)

similarities = model.similarity(image_embeddings, text_embeddings)
print(similarities)

Citations

clip-vit-b-32-multilingual-v1
Hugging Face repo: https://huggingface.co/sentence-transformers/clip-ViT-B-32-multilingual-v1
Trimming blog post
@misc{hf_blogpost_trimming,
      title={Introduction to Trimming}, 
      author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
      year={2026},
      url={https://huggingface.co/blog/lbourdois/introduction-to-trimming}, 
}