Downloads · 30 days
122
36% of all-time downloads
inference4j/distilbert-base-uncased-finetuned-sst-2-english
distilbert-base-uncased-finetuned-sst-2-english is a text classification model from inference4j. Use it when you need a label for a piece of text. It is set up for onnx. The card lists the license as apache-2.0.
ONNX export of distilbert-base-uncased-finetuned-sst-2-english, a DistilBERT model fine-tuned on the Stanford Sentiment Treebank (SST-2) for binary sentiment classification (POSITIVE/NEGATIVE).
Downloads · 30 days
122
36% of all-time downloads
All-time downloads
341
Public
Repo size
268 MB
Likes
1
Public
Click a slice to open those files.
.onnx268 MB · 100%
From the Hugging Face model README
ONNX export of distilbert-base-uncased-finetuned-sst-2-english, a DistilBERT model fine-tuned on the Stanford Sentiment Treebank (SST-2) for binary sentiment classification (POSITIVE/NEGATIVE).
Mirrored for use with inference4j, an inference-only AI library for Java.
try (DistilBertClassifier model = DistilBertClassifier.fromPretrained("models/distilbert-sst2")) {
List<TextClassification> results = model.classify("This movie was fantastic!");
System.out.println(results.get(0).label()); // "POSITIVE"
System.out.printf("Score: %.4f%n", results.get(0).score());
}
| Property | Value |
|---|---|
| Architecture | DistilBERT (6 layers, 768 hidden) |
| Task | Binary sentiment classification (POSITIVE / NEGATIVE) |
| Training data | SST-2 (Stanford Sentiment Treebank) |
| Max sequence length | 512 |
| Original framework | PyTorch (HuggingFace Transformers) |
| ONNX export | By Xenova (Transformers.js) |
This model is licensed under the Apache License 2.0. Original model by HuggingFace, ONNX export by Xenova.