A RunPod serverless worker implementation of Fast-DetectGPT, an efficient zero-shot detector for machine-generated text based on the ICLR 2024 research paper. This worker analyzes text samples to determine the probability that they were generated by an AI model versus authored by humans.
0
stars
2
commits
Python
primary language
Sep 27, 2025
updated
A RunPod serverless worker implementation of Fast-DetectGPT, an efficient zero-shot detector for machine-generated text based on the ICLR 2024 research paper. This worker analyzes text samples to determine the probability that they were generated by an AI model versus authored by humans.
Fast-DetectGPT is based on the paper "Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvature" presented at ICLR 2024. The method achieves:
Fast-DetectGPT uses conditional probability curvature to efficiently detect machine-generated text:
The worker supports these pre-calibrated model pairs optimized for Fast-DetectGPT:
Note: The original Fast-DetectGPT research recommends gpt-j-6B and falcon-7b models for optimal performance.
{
"input": {
"prompt": "Text to analyze for AI detection",
"sampling_model_name": "falcon-7b",
"scoring_model_name": "falcon-7b-instruct",
"device": "cuda",
"cache_dir": "./cache"
}
}
Base Models:
The worker returns the analyzed text along with console output showing:
Example output:
Fast-DetectGPT criterion is 2.1234, suggesting that the text has a probability of 87% to be machine-generated.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# The script automatically reads test_input.json
python3 rp_handler.py
Update test_input.json with your text sample:
{
"input": {
"prompt": "Your text to analyze goes here. This could be a paragraph or longer text sample that you want to check for AI generation.",
"sampling_model_name": "falcon-7b",
"scoring_model_name": "falcon-7b-instruct"
}
}
# Build for RunPod deployment (linux/amd64 required)
docker build -t alxgirarddavila/worker-fast-detect-gpt:latest --platform linux/amd64 .
# Push to Docker Hub
docker push alxgirarddavila/worker-fast-detect-gpt:latest
Pre-built Image: A ready-to-use Docker image is available at alxgirarddavila/worker-fast-detect-gpt on Docker Hub.
alxgirarddavila/worker-fast-detect-gpt:latestThis implementation is based on the official Fast-DetectGPT repository and uses:
The algorithm analyzes subtle differences in word choice patterns between machine-generated and human text, utilizing pre-calibrated normal distribution parameters for interpretable probability scores.
2 commits
Python
97.8%
Dockerfile
2.2%
A RunPod serverless worker implementation of Fast-DetectGPT, an efficient zero-shot detector for machine-generated text based on the ICLR 2024 research paper. This worker analyzes text samples to determine the probability that they were generated by an AI model versus authored by humans.
0
stars
2
commits
Python
primary language
Sep 27, 2025
updated
A RunPod serverless worker implementation of Fast-DetectGPT, an efficient zero-shot detector for machine-generated text based on the ICLR 2024 research paper. This worker analyzes text samples to determine the probability that they were generated by an AI model versus authored by humans.
Fast-DetectGPT is based on the paper "Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvature" presented at ICLR 2024. The method achieves:
Fast-DetectGPT uses conditional probability curvature to efficiently detect machine-generated text:
The worker supports these pre-calibrated model pairs optimized for Fast-DetectGPT:
Note: The original Fast-DetectGPT research recommends gpt-j-6B and falcon-7b models for optimal performance.
{
"input": {
"prompt": "Text to analyze for AI detection",
"sampling_model_name": "falcon-7b",
"scoring_model_name": "falcon-7b-instruct",
"device": "cuda",
"cache_dir": "./cache"
}
}
Base Models:
The worker returns the analyzed text along with console output showing:
Example output:
Fast-DetectGPT criterion is 2.1234, suggesting that the text has a probability of 87% to be machine-generated.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# The script automatically reads test_input.json
python3 rp_handler.py
Update test_input.json with your text sample:
{
"input": {
"prompt": "Your text to analyze goes here. This could be a paragraph or longer text sample that you want to check for AI generation.",
"sampling_model_name": "falcon-7b",
"scoring_model_name": "falcon-7b-instruct"
}
}
# Build for RunPod deployment (linux/amd64 required)
docker build -t alxgirarddavila/worker-fast-detect-gpt:latest --platform linux/amd64 .
# Push to Docker Hub
docker push alxgirarddavila/worker-fast-detect-gpt:latest
Pre-built Image: A ready-to-use Docker image is available at alxgirarddavila/worker-fast-detect-gpt on Docker Hub.
alxgirarddavila/worker-fast-detect-gpt:latestThis implementation is based on the official Fast-DetectGPT repository and uses:
The algorithm analyzes subtle differences in word choice patterns between machine-generated and human text, utilizing pre-calibrated normal distribution parameters for interpretable probability scores.
2 commits
Python
97.8%
Dockerfile
2.2%