stanfordnlp/sst2
Viewer • Updated • 70k • 39.9k • 162
How to use unterlantas/bert-sst2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="unterlantas/bert-sst2") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("unterlantas/bert-sst2")
model = AutoModelForSequenceClassification.from_pretrained("unterlantas/bert-sst2", device_map="auto")Base model
google-bert/bert-base-uncased