Downloads · 30 days
443
35% of all-time downloads
dmedhi/PawanEmbd-68M
PawanEmbd-68M is a sentence similarity model from dmedhi. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
A 68M parameter embedding model distilled from Granite-278M
Downloads · 30 days
443
35% of all-time downloads
All-time downloads
1.3K
Public
Parameters
67.8M
293 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors271 MB · 92%
From the Hugging Face model README
A 68M parameter embedding model distilled from Granite-278M
This model was trained using knowledge distillation from the IBM Granite-278M teacher model on the All-NLI dataset (SNLI + MultiNLI).
from transformers import AutoModel, AutoTokenizer
import torch
import torch.nn.functional as F
# Load model and tokenizer
model = AutoModel.from_pretrained("dmedhi/PawanEmbd-68M")
tokenizer = AutoTokenizer.from_pretrained("dmedhi/PawanEmbd-68M")
# Encode sentences
sentences = ["This is an example sentence", "Each sentence is converted to a vector"]
encoded = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
# Get embeddings
with torch.no_grad():
outputs = model(**encoded)
embeddings = outputs.pooler_output # Already normalized
# Compute similarity
similarity = F.cosine_similarity(embeddings[0:1], embeddings[1:2])
print(f"Similarity: {similarity.item():.4f}")
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim
# Load your model (should work now!)
model = SentenceTransformer("dmedhi/PawanEmbd-68M")
# Test encoding
sentences = ["This is an example sentence", "Each sentence is converted to a vector"]
embeddings = model.encode(sentences)
print(f"✅ Embeddings shape: {embeddings.shape}")
# Compute similarity
similarity = cos_sim(embeddings[0], embeddings[1])
print(f"✅ Similarity: {similarity.item():.4f}")
| Metric | Teacher (Granite-278M) | Student (PawanEmbd-68M) |
|---|---|---|
| Parameters | 278M | 68M (4.1x smaller) |
| Model Size | ~1.1 GB | ~258.7 MB |
| Inference Speed (CPU) | 269.57 ms | 11.57 (23.3x faster) |
| Inference Speed (GPU) | 17.94.57 ms | 2.75 (6.5x faster) |
| Cosine Similarity | 1.000 | 0.943 |
This model is suitable for:
✅ Semantic Search: Find similar documents or passages
✅ Clustering: Group similar texts together
✅ Duplicate Detection: Identify near-duplicate content
✅ Recommendation Systems: Find similar items
✅ Question Answering: Retrieve relevant passages
✅ Sentence Similarity: Measure semantic similarity between texts
The model was trained using PyTorch with knowledge distillation. Training code available at: TODO
@misc{pawanembdmodel2025,
author = {Dipankar Medhi},
title = {PawanEmbd: A Lightweight Embedding Model via Knowledge Distillation},
year = {2025},
publisher = {Hugging Face},
howpublished = { \url{https://huggingface.co/dmedhi/PawanEmbd-68M} }
}
Apache 2.0
For questions or feedback, please open an issue on Github.