Downloads · 30 days
8
8% of all-time downloads
cs4248-nlp/ft-teacher-all-mpnet-base-v2-taco-20260326-110507
ft-teacher-all-mpnet-base-v2-taco-20260326-110507 is a machine learning model from cs4248-nlp. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for sentence-transformers. The card lists the license as mit.
Code-search embedding model trained with the CS4248 two-phase KD pipeline.
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
101
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors876 MB · 100%
From the Hugging Face model README
Code-search embedding model trained with the CS4248 two-phase KD pipeline.
| Field | Value |
|---|---|
| Role | ft-teacher |
| Phase | Phase 1 |
| Method | ft-teacher |
| Dataset | unknown |
| Teacher | unknown |
| Student base | unknown |
| Phase 1 epochs | unknown |
| Phase 1 patience | unknown |
| Phase 2 epochs | unknown |
| Phase 2 patience | unknown |
| Batch size | unknown |
| Eval batch size | unknown |
| Learning rate | unknown |
| Seed | unknown |
| Run timestamp | 20260326_110507 |
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("cs4248-nlp/ft-teacher-all-mpnet-base-v2-taco-20260326-110507")
model = AutoModel.from_pretrained("cs4248-nlp/ft-teacher-all-mpnet-base-v2-taco-20260326-110507")
Mean-pool the last hidden state to get a fixed-size embedding:
import torch
def mean_pool(model_output, attention_mask):
token_embeddings = model_output.last_hidden_state
mask = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
return (token_embeddings * mask).sum(1) / mask.sum(1).clamp(min=1e-9)
inputs = tokenizer("your query here", return_tensors="pt", truncation=True, max_length=160)
with torch.no_grad():
outputs = model(**inputs)
embedding = mean_pool(outputs, inputs['attention_mask'])