metadata
license: mit
base_model: jhu-clsp/ettin-encoder-32m
datasets:
- stanfordnlp/imdb
language:
- en
pipeline_tag: text-classification
tags:
- ettin
- modernbert
- text-classification
ettin-encoder-32m-imdb-sentiment
jhu-clsp/ettin-encoder-32m (ModernBERT encoder, 8192 context) finetuned for IMDB sentiment (binary) on stanfordnlp/imdb.
Results (held-out test)
| metric | value |
|---|---|
| accuracy | 0.9263 |
| macro-F1 | 0.9263 |
| eval max_length | 512 |
Finetuned on a single RTX 3080 (bf16). See the project for the full training pipeline.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tok = AutoTokenizer.from_pretrained("vumichien/ettin-encoder-32m-imdb-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("vumichien/ettin-encoder-32m-imdb-sentiment")
inputs = tok("your text here", truncation=True, max_length=512, return_tensors="pt")
pred = model(**inputs).logits.argmax(-1).item()
print(model.config.id2label[pred])