Text Classification
Transformers
Safetensors
English
German
xlm-roberta
mental-health
knowledge-graph
text-embeddings-inference
Instructions to use Niklas1102/mentalkg-xlmr-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Niklas1102/mentalkg-xlmr-edge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Niklas1102/mentalkg-xlmr-edge")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Niklas1102/mentalkg-xlmr-edge") model = AutoModelForSequenceClassification.from_pretrained("Niklas1102/mentalkg-xlmr-edge", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,338 Bytes
7b50d48 | 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 45 46 47 48 49 | {
"task": "edge_prediction",
"base_model": "xlm-roberta-base",
"problem_type": "binary_classification",
"num_labels": 1,
"input_format": "<s> {entry text} </s></s> [N1] {label} ({type}, {polarity}, {time}) [/N1] </s> [N2] {label} ({type}, {polarity}, {time}) [/N2] </s>",
"threshold": 0.39000000000000007,
"test": {
"accuracy": 0.7652652266903023,
"precision": 0.8042968922682463,
"recall": 0.7011310429873407,
"f1": 0.7491790284226022,
"roc_auc": 0.8122612809236298,
"n_pos_pred": 45242,
"n_pos_true": 51899,
"n_total": 103798
},
"test_per_language": {
"de": {
"accuracy": 0.7658305800473109,
"precision": 0.8069089277703005,
"recall": 0.7009353078721746,
"f1": 0.7501981230448383,
"roc_auc": 0.8119984081616016,
"n_pos_pred": 22290,
"n_pos_true": 25660,
"n_total": 51151
},
"en": {
"accuracy": 0.7647159382300985,
"precision": 0.8017601951899617,
"recall": 0.7013224589351729,
"f1": 0.7481856437153138,
"roc_auc": 0.812477490892189,
"n_pos_pred": 22952,
"n_pos_true": 26239,
"n_total": 52647
}
},
"training": {
"loss": "bce_with_logits",
"negatives": "hard",
"lr": 2e-05,
"epochs": 5,
"seed": 42,
"max_len": 256,
"train_entry_frac": 1.0
}
} |