AICodexLab/answerdotai-ModernBERT-base-ai-detector
46.4k
answerdotai-ModernBERT-base-ai-detector
This model is a fine-tuned version of answerdotai/ModernBERT-base on the AI vs Human Text Classification dataset, DAIGT V2 Train Dataset.
It achieves the following results on the evaluation set:
- Validation Loss:
0.0036
๐ Model Description
This model is based on ModernBERT-base, a lightweight and efficient BERT-based model. It has been fine-tuned for AI-generated vs Human-written text classification, allowing it to distinguish between texts written by AI models (ChatGPT, DeepSeek, Claude, etc.) and human authors.
๐ฏ Intended Uses & Limitations
โ Intended Uses
- AI-generated content detection (e.g., ChatGPT, Claude, DeepSeek).
- Text classification for distinguishing human vs AI-generated content.
- Educational & Research applications for AI-content detection.
โ ๏ธ Limitations
- Not 100% accurate โ Some AI texts may resemble human writing and vice versa.
- Limited to trained dataset scope โ May struggle with out-of-domain text.
- Bias risks โ If the dataset contains bias, the model may inherit it.
๐ Training and Evaluation Data
- The model was fine-tuned on 35,894 training samples and 8,974 test samples.
- The dataset consists of AI-generated text samples (ChatGPT, Claude, DeepSeek, etc.) and human-written samples (Wikipedia, books, articles).
- Labels:
1โ AI-generated text0โ Human-written text
โ๏ธ Training Procedure
Training Hyperparameters
The following hyperparameters were used during training:
๐ Training Results
๐ Framework Versions
๐ค Model Usage
To load and use the model for text classification:
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model_name = "answerdotai/ModernBERT-base-ai-detector"
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Create text classification pipeline
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
# Run classification
text = "This text was written by an AI model like ChatGPT."
result = classifier(text)
print(result)