Update README.md
Browse files
README.md
CHANGED
|
@@ -1,55 +1,49 @@
|
|
| 1 |
-
# LLM_Detector_Preview_model
|
| 2 |
-
|
| 3 |
-
**Preview release of an LLM-generated text detector.**
|
| 4 |
-
|
| 5 |
-
## Model Description
|
| 6 |
-
This model is designed to classify text as Human, Mixed, or AI-generated. It is based on a sequence classification architecture and was trained on a mix of human and AI-generated texts. The model can be used for document, sentence, and token-level analysis.
|
| 7 |
-
|
| 8 |
-
- **Architecture:** ModernBERT (or compatible Transformer)
|
| 9 |
-
- **Labels:**
|
| 10 |
-
- 0: Human
|
| 11 |
-
- 1: Mixed
|
| 12 |
-
- 2: AI
|
| 13 |
-
|
| 14 |
-
## Intended Use
|
| 15 |
-
- **For research and curiosity only.**
|
| 16 |
-
- Not for academic, legal, medical, or high-stakes use.
|
| 17 |
-
- Results are easy to bypass and may be unreliable.
|
| 18 |
-
|
| 19 |
-
## Limitations & Warnings
|
| 20 |
-
- This model is **experimental** and not clinically accurate.
|
| 21 |
-
- It can produce false positives and false negatives.
|
| 22 |
-
- Simple paraphrasing or editing can fool the detector.
|
| 23 |
-
- Do not use for academic integrity, hiring, or legal decisions.
|
| 24 |
-
|
| 25 |
-
## How It Works
|
| 26 |
-
The model analyzes text and predicts the likelihood of it being human-written, mixed, or AI-generated. It uses statistical patterns learned from training data, but these patterns are not foolproof and can be circumvented.
|
| 27 |
-
|
| 28 |
-
## Example Usage
|
| 29 |
-
```python
|
| 30 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 31 |
-
import torch
|
| 32 |
-
|
| 33 |
-
tokenizer = AutoTokenizer.from_pretrained('Donnyed/LLM_Detector_Preview_model')
|
| 34 |
-
model = AutoModelForSequenceClassification.from_pretrained('Donnyed/LLM_Detector_Preview_model')
|
| 35 |
-
|
| 36 |
-
text = "Paste your text here."
|
| 37 |
-
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
|
| 38 |
-
with torch.no_grad():
|
| 39 |
-
outputs = model(**inputs)
|
| 40 |
-
probs = torch.softmax(outputs.logits, dim=1)
|
| 41 |
-
pred = torch.argmax(probs, dim=1).item()
|
| 42 |
-
print('Prediction:', pred)
|
| 43 |
-
print('Probabilities:', probs)
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
## Files Included
|
| 47 |
-
- `model.safetensors` — Model weights
|
| 48 |
-
- `config.json` — Model configuration
|
| 49 |
-
- `tokenizer.json`, `tokenizer_config.json`, `special_tokens_map.json` — Tokenizer files
|
| 50 |
-
|
| 51 |
-
## License
|
| 52 |
-
Specify your license here (e.g., Apache 2.0, MIT, etc.)
|
| 53 |
-
|
| 54 |
-
---
|
| 55 |
-
**Maintainer:** [your-username](https://huggingface.co/your-username)
|
|
|
|
| 1 |
+
# LLM_Detector_Preview_model
|
| 2 |
+
|
| 3 |
+
**Preview release of an LLM-generated text detector.**
|
| 4 |
+
|
| 5 |
+
## Model Description
|
| 6 |
+
This model is designed to classify text as Human, Mixed, or AI-generated. It is based on a sequence classification architecture and was trained on a mix of human and AI-generated texts. The model can be used for document, sentence, and token-level analysis.
|
| 7 |
+
|
| 8 |
+
- **Architecture:** ModernBERT (or compatible Transformer)
|
| 9 |
+
- **Labels:**
|
| 10 |
+
- 0: Human
|
| 11 |
+
- 1: Mixed
|
| 12 |
+
- 2: AI
|
| 13 |
+
|
| 14 |
+
## Intended Use
|
| 15 |
+
- **For research and curiosity only.**
|
| 16 |
+
- Not for academic, legal, medical, or high-stakes use.
|
| 17 |
+
- Results are easy to bypass and may be unreliable.
|
| 18 |
+
|
| 19 |
+
## Limitations & Warnings
|
| 20 |
+
- This model is **experimental** and not clinically accurate.
|
| 21 |
+
- It can produce false positives and false negatives.
|
| 22 |
+
- Simple paraphrasing or editing can fool the detector.
|
| 23 |
+
- Do not use for academic integrity, hiring, or legal decisions.
|
| 24 |
+
|
| 25 |
+
## How It Works
|
| 26 |
+
The model analyzes text and predicts the likelihood of it being human-written, mixed, or AI-generated. It uses statistical patterns learned from training data, but these patterns are not foolproof and can be circumvented.
|
| 27 |
+
|
| 28 |
+
## Example Usage
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 31 |
+
import torch
|
| 32 |
+
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained('Donnyed/LLM_Detector_Preview_model')
|
| 34 |
+
model = AutoModelForSequenceClassification.from_pretrained('Donnyed/LLM_Detector_Preview_model')
|
| 35 |
+
|
| 36 |
+
text = "Paste your text here."
|
| 37 |
+
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
|
| 38 |
+
with torch.no_grad():
|
| 39 |
+
outputs = model(**inputs)
|
| 40 |
+
probs = torch.softmax(outputs.logits, dim=1)
|
| 41 |
+
pred = torch.argmax(probs, dim=1).item()
|
| 42 |
+
print('Prediction:', pred)
|
| 43 |
+
print('Probabilities:', probs)
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Files Included
|
| 47 |
+
- `model.safetensors` — Model weights
|
| 48 |
+
- `config.json` — Model configuration
|
| 49 |
+
- `tokenizer.json`, `tokenizer_config.json`, `special_tokens_map.json` — Tokenizer files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|