Sentence Similarity
sentence-transformers
Safetensors
Khmer
metaclip_2
trimmed
How to use from the
Use from the
sentence-transformers library
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768")

sentences = [
    "The weather is lovely today.",
    "It's so sunny outside!",
    "He drove to the stadium."
]
embeddings = model.encode(sentences)

similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

metaclip-2-worldwide-b16-384-khm-32768

This model is a 75.88% smaller version of facebook/metaclip-2-worldwide-b16-384 optimized for Khmer language via vocabulary size reduction using the trimming method.
This trimmed model should perform similarly to the original model with only 32,768 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

Metric Original Trimmed Reduction
Vocabulary size 901,629 tokens 32,768 tokens 96.37%
Model size 586,249,729 params 141,392,897 params 75.88%

image

Mining Dataset Statistics

Usage

Transformers (zero-shot image classification)

from transformers import pipeline

# load pipeline
image_classifier = pipeline(model="alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768", task="zero-shot-image-classification")

# load image and candidate labels
image = "http://images.cocodataset.org/val2017/000000039769.jpg"
candidate_labels = ["Potential label 1 in Khmer", "Potential label 2 in Khmer", "Potential label 3 in Khmer", "Potential label 4 in Khmer"]

# run inference
outputs = image_classifier(image, candidate_labels)
print(outputs)

Sentence-transformers (texts-images similarity)

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768")

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 = ["Text 1 in Khmer", "Text 2 in Khmer", "Text 3 in Khmer", "Text 4 in Khmer"]

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

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

Citations

Meta CLIP 2

@misc{chuang2025metaclip2worldwide,
      title={Meta CLIP 2: A Worldwide Scaling Recipe}, 
      author={Yung-Sung Chuang and Yang Li and Dong Wang and Ching-Feng Yeh and Kehan Lyu and Ramya Raghavendra and James Glass and Lifei Huang and Jason Weston and Luke Zettlemoyer and Xinlei Chen and Zhuang Liu and Saining Xie and Wen-tau Yih and Shang-Wen Li and Hu Xu},
      year={2025},
      eprint={2507.22062},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2507.22062}, 
}

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}, 
}
Downloads last month
10
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768

Quantized
(194)
this model

Dataset used to train alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768

Collection including alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768

Paper for alphaedge-ai/metaclip-2-worldwide-b16-384-khm-32768