ernlavr/IDMGSP-danish
Viewer • Updated • 24k • 19
How to use ernlavr/xlm-roberta-base-IDMGSP-danish with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ernlavr/xlm-roberta-base-IDMGSP-danish") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ernlavr/xlm-roberta-base-IDMGSP-danish")
model = AutoModelForSequenceClassification.from_pretrained("ernlavr/xlm-roberta-base-IDMGSP-danish", device_map="auto")This model is a fine-tuned version of xlm-roberta-base on the ernlavr/IDMGSP-danish dataset. It achieves the following results on the evaluation set:
Binary classification, label 0 - text is not AI generated; label 1 - text is AI generated
ernlavr/IDMGSP-danish dataset.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.3631 | 1.0 | 496 | 0.9902 | {'accuracy': 0.5959059893858984} | {'f1': 0.7104310032596887} |
| 0.3208 | 2.0 | 992 | 1.0736 | {'accuracy': 0.7261814505938843} | {'f1': 0.780245411215901} |
| 0.2191 | 3.0 | 1488 | 0.3496 | {'accuracy': 0.8664392216325499} | {'f1': 0.8717077315208156} |
| 0.1548 | 4.0 | 1984 | 0.5604 | {'accuracy': 0.8155168056608542} | {'f1': 0.8378858538751943} |
| 0.1127 | 5.0 | 2480 | 0.4164 | {'accuracy': 0.8641647712913824} | {'f1': 0.871056735036584} |
| 0.1372 | 6.0 | 2976 | 0.5515 | {'accuracy': 0.8822340156684357} | {'f1': 0.8833833833833834} |
| 0.0279 | 7.0 | 3472 | 0.7203 | {'accuracy': 0.8458428102097548} | {'f1': 0.8573766658873042} |
| 0.0456 | 8.0 | 3968 | 0.8584 | {'accuracy': 0.8498862774829417} | {'f1': 0.8604651162790697} |
| 0.0095 | 9.0 | 4464 | 0.9214 | {'accuracy': 0.8512762193580996} | {'f1': 0.861415283174379} |
| 0.0076 | 10.0 | 4960 | 1.0276 | {'accuracy': 0.8530452362901187} | {'f1': 0.8630636995172495} |
Base model
FacebookAI/xlm-roberta-base