Views
No views yet
| Metric | Original | Trimmed | Reduction |
|---|---|---|---|
| Vocabulary size | 119,547 tokens | 16,384 tokens | 72.59% |
| Model size (with visual encoder) | 222,976,512 params | 143,747,328 params | 35.53% |
| Model size (without visual encoder) | 135,127,296 params | 55,898,112 params | 58.63% |


1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer("aphaedge-ai/clip-ViT-B-32-multilingual-v1-ur-32768")
4clip = SentenceTransformer("sentence-transformers/clip-ViT-B-32")
5
6images = [
7 "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg",
8 "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg",
9 "https://huggingface.co/datasets/huggingface/cats-image/resolve/main/cats_image.jpeg"
10]
11texts = ["Potential label 1 in Urdu", "Potential label 2 in Urdu", "Potential label 3 in Urdu", "Potential label 4 in Urdu"]
12
13image_embeddings = clip.encode(images)
14text_embeddings = model.encode(texts)
15print(image_embeddings.shape, text_embeddings.shape)
16
17similarities = model.similarity(image_embeddings, text_embeddings)
18print(similarities)Hugging Face repo: https://huggingface.co/sentence-transformers/clip-ViT-B-32-multilingual-v1@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},
}