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
Download meta.json from Niklas1102/mentalkg-xlmr-edge: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/Niklas1102/mentalkg-xlmr-edge/resolve/main/meta.json
- Command line
-
hf download hf://Niklas1102/mentalkg-xlmr-edge/meta.json
-
curl -L -o meta.json https://huggingface.co/Niklas1102/mentalkg-xlmr-edge/resolve/main/meta.json
1.34 kB
| { | |
| "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 | |
| } | |
| } |