GeorgeDrayson commited on
Commit
8b99a1b
·
verified ·
1 Parent(s): 068ec3c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -1
README.md CHANGED
@@ -7,4 +7,41 @@ language:
7
  base_model:
8
  - answerdotai/ModernBERT-base
9
  pipeline_tag: text-classification
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  base_model:
8
  - answerdotai/ModernBERT-base
9
  pipeline_tag: text-classification
10
+ ---
11
+
12
+ # Machine-generated text detection prevents language model collapse
13
+
14
+ 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)
15
+
16
+ ## Usage
17
+
18
+ To use the model for detecting machine-generated text:
19
+
20
+
21
+ ```python
22
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
23
+ import torch
24
+
25
+ tokenizer = AutoTokenizer.from_pretrained("GeorgeDrayson/modernbert-mage")
26
+ model = AutoModelForSequenceClassification.from_pretrained("GeorgeDrayson/modernbert-mage")
27
+
28
+ text = "Your input text here."
29
+ inputs = tokenizer(text, return_tensors="pt")
30
+ outputs = model(**inputs)
31
+ probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
32
+ print(f"Probability of machine-generated text: {probabilities[0][1].item():.4f}")
33
+ ```
34
+
35
+ ## Citation
36
+
37
+ If you use this model or find the research helpful, please cite:
38
+
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
+ ```