Downloads · 30 days
13
14% of all-time downloads
sh7vashrestha/BertBaseUncased-SenetimentAnalysis
BertBaseUncased-SenetimentAnalysis is a text classification model from sh7vashrestha. Use it when you need a label for a piece of text. The card lists the license as mit.
This repository hosts the Teacher Model used in the KDLLM framework from:
Downloads · 30 days
13
14% of all-time downloads
All-time downloads
93
Public
Repo size
876 MB
Likes
0
Public
Click a slice to open those files.
.bin438 MB · 100%
From the Hugging Face model README
This repository hosts the Teacher Model used in the KDLLM framework from:
KDLLM: Knowledge Distillation for Compressed and Copyright-Safe Large Language Model Sharing
Shiva Shrestha et al.
Tsinghua Science and Technology, 2025
Manuscript ID: TST-2025-0253
The teacher model is based on bert-base-uncased, fine-tuned on IMDb sentiment classification dataset for binary classification (positive/negative). This model serves as the high-capacity reference for training compact student models using knowledge distillation.
bert-base-uncasedfrom transformers import BertForSequenceClassification, BertTokenizer
tokenizer = BertTokenizer.from_pretrained("sh7vashrestha/BertBaseUncased-SenetimentAnalysis")
model = BertForSequenceClassification.from_pretrained("sh7vashrestha/BertBaseUncased-SenetimentAnalysis")
inputs = tokenizer("The movie was absolutely wonderful!", return_tensors="pt")
outputs = model(**inputs)
prediction = outputs.logits.argmax(dim=1)
print(prediction)
label_mapping = {0: "negative", 1: "positive"}
prediction_label = label_mapping[prediction.item()]
print(prediction_label)