stanfordnlp/sst2
Viewer • Updated • 70k • 28.7k • 161
How to use Facececersek/bedrock-sentiment-tiny with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Facececersek/bedrock-sentiment-tiny") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Facececersek/bedrock-sentiment-tiny")
model = AutoModelForSequenceClassification.from_pretrained("Facececersek/bedrock-sentiment-tiny")Tiny binary sentiment classifier (positive / negative) fine-tuned from
prajjwal1/bert-tiny on a 3 000-example
subset of SST-2.
from transformers import pipeline
clf = pipeline("text-classification", model="Facececersek/bedrock-sentiment-tiny")
print(clf("this mod is sooo good"))
print(clf("it wouldn't import, it's broken"))
google/bert_uncased_L-2_H-128_A-2Trained as a fast demonstration on a CPU-only VM. For production-quality
sentiment, fine-tune on the full SST-2 or a larger base model (e.g.
distilbert-base-uncased).
Base model
prajjwal1/bert-tiny