Downloads · 30 days
9
10% of all-time downloads
sidmangalik/selfBERTa
selfBERTa is a text classification model from sidmangalik. Use it when you need a label for a piece of text. The card lists the license as mit.
Model trained from roberta-large on a dataset of human and LLM annotated self-beliefs for multi-label classification.
Downloads · 30 days
9
10% of all-time downloads
All-time downloads
88
Public
Repo size
1.4 GB
Likes
0
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
Model trained from roberta-large on a dataset of human and LLM annotated self-beliefs for multi-label classification.
Model training , hyper-parameters, and evaluation can be found in "Capturing Self-Beliefs in Natural Language" by Mangalik et al. 2024
A sample way to use this model for classification
from transformers import pipeline
huggingface_model = 'sidmangalik/selfBERTa'
model = RobertaForSequenceClassification.from_pretrained(huggingface_model)
tokenizer = RobertaTokenizerFast.from_pretrained(huggingface_model, max_length = 512, padding="max_length", truncation=True)
texts = ["I am the coolest person I know."]
inputs = tokenizer(texts, max_length=512, padding="max_length", truncation=True, return_tensors='pt')
outputs = model(**inputs)
logits = outputs.logits
soft_logits = torch.softmax(logits, dim=1).tolist()
predicted_classes = np.argmax(soft_logits, axis=1)