Text Classification
Transformers
Safetensors
English
modernbert
GeorgeDrayson commited on
Commit
c5720b2
·
verified ·
1 Parent(s): c8d3ea1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -3
README.md CHANGED
@@ -1,3 +1,47 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - yaful/MAGE
5
+ - liamdugan/raid
6
+ language:
7
+ - en
8
+ base_model:
9
+ - answerdotai/ModernBERT-base
10
+ library_name: transformers
11
+ pipeline_tag: text-classification
12
+ ---
13
+
14
+ # Machine-generated text detection prevents language model collapse
15
+
16
+ This model is part of the research presented in the paper [Machine-generated text detection prevents language model collapse](https://arxiv.org/abs/2502.15654), which proposes an approach to prevent model collapse based on importance sampling from a machine-generated text detector. The official implementation and training scripts are available in the GitHub repository: [GeorgeDrayson/model_collapse](https://github.com/GeorgeDrayson/model_collapse)
17
+
18
+ ## Usage
19
+
20
+ To use the model for detecting machine-generated text:
21
+
22
+ ```python
23
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
24
+ import torch
25
+
26
+ tokenizer = AutoTokenizer.from_pretrained("GeorgeDrayson/modernbert-raid-mage")
27
+ model = AutoModelForSequenceClassification.from_pretrained("GeorgeDrayson/modernbert-raid-mage")
28
+
29
+ text = "Your input text here."
30
+ inputs = tokenizer(text, return_tensors="pt")
31
+ outputs = model(**inputs)
32
+ probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
33
+ print(f"Probability of machine-generated text: {probabilities[0][1].item():.4f}")
34
+ ```
35
+
36
+ ## Citation
37
+
38
+ If you use this model or find the research helpful, please cite:
39
+
40
+ ```bibtex
41
+ @article{drayson2025machine,
42
+ title={Machine-generated text detection prevents language model collapse},
43
+ author={Drayson, George and Yilmaz, Emine and Lampos, Vasileios},
44
+ journal={arXiv preprint arXiv:2502.15654},
45
+ year={2025}
46
+ }
47
+ ```