inference4j/distilbert-base-uncased-finetuned-sst-2-english
119
DistilBERT SST-2 — ONNX
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.
Original Source
- Repository: Xenova (originally distilbert-base by HuggingFace)
- License: apache-2.0
Usage with inference4j
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());
}Model Details
License
This model is licensed under the Apache License 2.0. Original model by HuggingFace, ONNX export by Xenova.
