Text Classification
Transformers
ONNX
Safetensors
PyTorch
English
bert
multi-label-classification
multi-class-classification
emotion
go_emotions
emotion-classification
sentiment-analysis
tensorflow
Eval Results (legacy)
text-embeddings-inference
Instructions to use logasanjeev/bert-emotion-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use logasanjeev/bert-emotion-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="logasanjeev/bert-emotion-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("logasanjeev/bert-emotion-classifier") model = AutoModelForSequenceClassification.from_pretrained("logasanjeev/bert-emotion-classifier", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +30 -27
config.json
CHANGED
|
@@ -1,36 +1,21 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
|
|
|
| 7 |
"classifier_dropout": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"gradient_checkpointing": false,
|
| 9 |
"hidden_act": "gelu",
|
| 10 |
"hidden_dropout_prob": 0.1,
|
| 11 |
"hidden_size": 768,
|
| 12 |
-
"initializer_range": 0.02,
|
| 13 |
-
"intermediate_size": 3072,
|
| 14 |
-
"layer_norm_eps": 1e-12,
|
| 15 |
-
"max_position_embeddings": 512,
|
| 16 |
-
"model_type": "bert",
|
| 17 |
-
"num_attention_heads": 12,
|
| 18 |
-
"num_hidden_layers": 12,
|
| 19 |
-
"pad_token_id": 0,
|
| 20 |
-
"position_embedding_type": "absolute",
|
| 21 |
-
"transformers_version": "4.41.0",
|
| 22 |
-
"type_vocab_size": 2,
|
| 23 |
-
"use_cache": true,
|
| 24 |
-
"vocab_size": 30522,
|
| 25 |
-
"num_labels": 28,
|
| 26 |
-
"problem_type": "multi_label_classification",
|
| 27 |
-
"batch_size": 16,
|
| 28 |
-
"max_length": 128,
|
| 29 |
-
"epochs": 5,
|
| 30 |
-
"learning_rate": 2e-05,
|
| 31 |
-
"weight_decay": 0.01,
|
| 32 |
-
"focal_loss_alpha": 1,
|
| 33 |
-
"focal_loss_gamma": 2,
|
| 34 |
"id2label": {
|
| 35 |
"0": "admiration",
|
| 36 |
"1": "amusement",
|
|
@@ -61,6 +46,9 @@
|
|
| 61 |
"26": "surprise",
|
| 62 |
"27": "neutral"
|
| 63 |
},
|
|
|
|
|
|
|
|
|
|
| 64 |
"label2id": {
|
| 65 |
"admiration": 0,
|
| 66 |
"amusement": 1,
|
|
@@ -82,13 +70,28 @@
|
|
| 82 |
"joy": 17,
|
| 83 |
"love": 18,
|
| 84 |
"nervousness": 19,
|
|
|
|
| 85 |
"optimism": 20,
|
| 86 |
"pride": 21,
|
| 87 |
"realization": 22,
|
| 88 |
"relief": 23,
|
| 89 |
"remorse": 24,
|
| 90 |
"sadness": 25,
|
| 91 |
-
"surprise": 26
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
"architectures": [
|
| 4 |
"BertForSequenceClassification"
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"batch_size": 16,
|
| 8 |
+
"bos_token_id": null,
|
| 9 |
"classifier_dropout": null,
|
| 10 |
+
"dtype": "float32",
|
| 11 |
+
"eos_token_id": null,
|
| 12 |
+
"epochs": 5,
|
| 13 |
+
"focal_loss_alpha": 1,
|
| 14 |
+
"focal_loss_gamma": 2,
|
| 15 |
"gradient_checkpointing": false,
|
| 16 |
"hidden_act": "gelu",
|
| 17 |
"hidden_dropout_prob": 0.1,
|
| 18 |
"hidden_size": 768,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"id2label": {
|
| 20 |
"0": "admiration",
|
| 21 |
"1": "amusement",
|
|
|
|
| 46 |
"26": "surprise",
|
| 47 |
"27": "neutral"
|
| 48 |
},
|
| 49 |
+
"initializer_range": 0.02,
|
| 50 |
+
"intermediate_size": 3072,
|
| 51 |
+
"is_decoder": false,
|
| 52 |
"label2id": {
|
| 53 |
"admiration": 0,
|
| 54 |
"amusement": 1,
|
|
|
|
| 70 |
"joy": 17,
|
| 71 |
"love": 18,
|
| 72 |
"nervousness": 19,
|
| 73 |
+
"neutral": 27,
|
| 74 |
"optimism": 20,
|
| 75 |
"pride": 21,
|
| 76 |
"realization": 22,
|
| 77 |
"relief": 23,
|
| 78 |
"remorse": 24,
|
| 79 |
"sadness": 25,
|
| 80 |
+
"surprise": 26
|
| 81 |
+
},
|
| 82 |
+
"layer_norm_eps": 1e-12,
|
| 83 |
+
"learning_rate": 2e-05,
|
| 84 |
+
"max_position_embeddings": 512,
|
| 85 |
+
"model_type": "bert",
|
| 86 |
+
"num_attention_heads": 12,
|
| 87 |
+
"num_hidden_layers": 12,
|
| 88 |
+
"pad_token_id": 0,
|
| 89 |
+
"position_embedding_type": "absolute",
|
| 90 |
+
"problem_type": "multi_label_classification",
|
| 91 |
+
"tie_word_embeddings": true,
|
| 92 |
+
"transformers_version": "5.0.0",
|
| 93 |
+
"type_vocab_size": 2,
|
| 94 |
+
"use_cache": true,
|
| 95 |
+
"vocab_size": 30522,
|
| 96 |
+
"weight_decay": 0.01
|
| 97 |
+
}
|