stanfordnlp/imdb
Viewer • Updated • 100k • 174k • 943
How to use JahLingus20/imdb-distilbert-sentiment with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="JahLingus20/imdb-distilbert-sentiment") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("JahLingus20/imdb-distilbert-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("JahLingus20/imdb-distilbert-sentiment", device_map="auto")Classificatore di sentiment (positivo/negativo) per recensioni di film in inglese.
Sottoinsieme di IMDB: 2000 recensioni di training e 500 di test, seed 42 (snapshot imdb_v1).
Fine-tuning di distilbert-base-uncased: learning rate 5e-5, 3 epoche, batch size 16, fp16, GPU T4 (Colab). L'addestramento è stato interrotto e ripreso dall'ultimo checkpoint con --resume.
Sul test set di 500 recensioni: accuratezza 0.884, loss 0.4256.
Base model
distilbert/distilbert-base-uncased