sealuzh/app_reviews
Viewer • Updated • 288k • 1.49k • 27
How to use Andyrasika/bert_clf_results with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Andyrasika/bert_clf_results") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Andyrasika/bert_clf_results")
model = AutoModelForSequenceClassification.from_pretrained("Andyrasika/bert_clf_results")This model is a fine-tuned version of distilbert-base-cased on an unknown dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 1.0767 | 1.0 | 5401 | 0.8447 | 0.7087 |
| 0.6523 | 2.0 | 10803 | 0.8287 | 0.7156 |
| 0.7209 | 3.0 | 16204 | 0.8852 | 0.7121 |
| 0.4274 | 4.0 | 21604 | 0.9611 | 0.7011 |
from transformers import AutoTokenizer
from transformers import AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Andyrasika/bert_clf_results")
inputs = tokenizer(prompt, return_tensors="pt")
model = AutoModelForSequenceClassification.from_pretrained("Andyrasika/bert_clf_results")
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
model.config.id2label[predicted_class_id]
Output
'LABEL_4'
Base model
distilbert/distilbert-base-cased