Instructions to use TransWiC/bert-large-CLS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TransWiC/bert-large-CLS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TransWiC/bert-large-CLS")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("TransWiC/bert-large-CLS") model = AutoModelForSequenceClassification.from_pretrained("TransWiC/bert-large-CLS", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,340 Bytes
9a7f7d0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | Default classification report:
precision recall f1-score support
F 0.8509 0.8560 0.8534 500
T 0.8551 0.8500 0.8526 500
accuracy 0.8530 1000
macro avg 0.8530 0.8530 0.8530 1000
weighted avg 0.8530 0.8530 0.8530 1000
ADJ
Accuracy = 0.8680555555555556
Weighted Recall = 0.8680555555555556
Weighted Precision = 0.8682286634460546
Weighted F1 = 0.8681002024889489
Macro Recall = 0.8680340557275542
Macro Precision = 0.867536231884058
Macro F1 = 0.8677430270218012
ADV
Accuracy = 0.7333333333333333
Weighted Recall = 0.7333333333333333
Weighted Precision = 0.7333333333333333
Weighted F1 = 0.7333333333333333
Macro Recall = 0.7222222222222222
Macro Precision = 0.7222222222222222
Macro F1 = 0.7222222222222222
NOUN
Accuracy = 0.8541666666666666
Weighted Recall = 0.8541666666666666
Weighted Precision = 0.8544012331495099
Weighted F1 = 0.8541337014671534
Macro Recall = 0.8541143554056962
Macro Precision = 0.8544347426470589
Macro F1 = 0.8541242828387209
VERB
Accuracy = 0.8557046979865772
Weighted Recall = 0.8557046979865772
Weighted Precision = 0.8561056998556997
Weighted F1 = 0.8556640646999853
Macro Recall = 0.8557046979865772
Macro Precision = 0.8561056998556998
Macro F1 = 0.8556640646999853
|