SuperAnnotate HTTP service for Generated Text Detection
See the code
This repository contains the HTTP service for the Generated Text Detector.
To integrate the detector with your project on the SuperAnnotate platform, please follow the instructions provided in our Tutorial
The Generated Text Detection model is built on a fine-tuned RoBERTa Large architecture. It has been extensively trained on a diverse dataset that includes internal generation and subset of RAID train dataset, enabling it to accurately classify text as either generated (synthetic) or human-written.
This model is optimized for robust detection, offering two configurations based on specific needs:
For more details and access to the model weights, please refer to the links above on the Hugging Face Model Hub.
You can deploy the service wherever it is convenient; one of the basic options is on a created EC2 instance. Learn about instance creation and setup here.
Hardware requirements will depend on your on your deployment type. Recommended ec2 instances for deployment type 2:
NOTES:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodespip install -r generated_text_detector/requirements.txtexport PYTHONPATH="."export DETECTOR_CONFIG_PATH="etc/configs/detector_config.json"uvicorn --host 0.0.0.0 --port 8080 --ssl-keyfile=./key.pem --ssl-certfile=./cert.pem generated_text_detector.fastapi_app:appsudo docker build -t generated_text_detector:GPU -f Dockerfile_GPU .sudo docker run --gpus all -e DETECTOR_CONFIG_PATH="etc/configs/detector_config.json" -p 8080:8080 -d generated_text_detector:GPUsudo docker build -t generated_text_detector:CPU -f Dockerfile_CPU .sudo docker run -e DETECTOR_CONFIG_PATH="etc/configs/detector_config.json" -p 8080:8080 -d generated_text_detector:CPUThis solution has been validated using the RAID benchmark, which includes a diverse dataset covering:
The performance of Binoculars is compared to other detectors on the RAID leaderboard.

This is a snapshot of the leaderboard for October 2024
There are 2 inference modes available on CPU and GPU. In the table below you can see the time performance of the service deployed in the appropriate mode
| Method | RPS |
|---|---|
| GPU | 10 |
| CPU | 0.9 |
*In this test, request texts average 500 tokens
The following endpoints are available in the Generated Text Detection service:
GET /healthcheck:
{"healthy": True}200: Successful ResponsePOST /detect:
text{"text": "some text"}generated_score: float values from 0 to 1author: one of the following string values:
{"generated_score": 0, "author": "Human"}200: Successful ResponsePython
100.0%
SuperAnnotate HTTP service for Generated Text Detection
See the code
This repository contains the HTTP service for the Generated Text Detector.
To integrate the detector with your project on the SuperAnnotate platform, please follow the instructions provided in our Tutorial
The Generated Text Detection model is built on a fine-tuned RoBERTa Large architecture. It has been extensively trained on a diverse dataset that includes internal generation and subset of RAID train dataset, enabling it to accurately classify text as either generated (synthetic) or human-written.
This model is optimized for robust detection, offering two configurations based on specific needs:
For more details and access to the model weights, please refer to the links above on the Hugging Face Model Hub.
You can deploy the service wherever it is convenient; one of the basic options is on a created EC2 instance. Learn about instance creation and setup here.
Hardware requirements will depend on your on your deployment type. Recommended ec2 instances for deployment type 2:
NOTES:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodespip install -r generated_text_detector/requirements.txtexport PYTHONPATH="."export DETECTOR_CONFIG_PATH="etc/configs/detector_config.json"uvicorn --host 0.0.0.0 --port 8080 --ssl-keyfile=./key.pem --ssl-certfile=./cert.pem generated_text_detector.fastapi_app:appsudo docker build -t generated_text_detector:GPU -f Dockerfile_GPU .sudo docker run --gpus all -e DETECTOR_CONFIG_PATH="etc/configs/detector_config.json" -p 8080:8080 -d generated_text_detector:GPUsudo docker build -t generated_text_detector:CPU -f Dockerfile_CPU .sudo docker run -e DETECTOR_CONFIG_PATH="etc/configs/detector_config.json" -p 8080:8080 -d generated_text_detector:CPUThis solution has been validated using the RAID benchmark, which includes a diverse dataset covering:
The performance of Binoculars is compared to other detectors on the RAID leaderboard.

This is a snapshot of the leaderboard for October 2024
There are 2 inference modes available on CPU and GPU. In the table below you can see the time performance of the service deployed in the appropriate mode
| Method | RPS |
|---|---|
| GPU | 10 |
| CPU | 0.9 |
*In this test, request texts average 500 tokens
The following endpoints are available in the Generated Text Detection service:
GET /healthcheck:
{"healthy": True}200: Successful ResponsePOST /detect:
text{"text": "some text"}generated_score: float values from 0 to 1author: one of the following string values:
{"generated_score": 0, "author": "Human"}200: Successful ResponsePython
100.0%