https://github.com/BurhanUlTayyab/DetectGPT
Pytorch implementation of DetectGPT (https://arxiv.org/pdf/2301.11305v1.pdf)
https://github.com/BurhanUlTayyab/DetectGPT
Last synced: 14 days ago
JSON representation
Pytorch implementation of DetectGPT (https://arxiv.org/pdf/2301.11305v1.pdf)
- Host: GitHub
- URL: https://github.com/BurhanUlTayyab/DetectGPT
- Owner: BurhanUlTayyab
- License: mit
- Created: 2023-02-03T09:28:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T18:17:44.000Z (11 months ago)
- Last Synced: 2024-08-03T01:25:01.698Z (9 months ago)
- Language: Python
- Homepage: https://gptzero.sg
- Size: 36.1 KB
- Stars: 169
- Watchers: 4
- Forks: 43
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-llm-and-aigc - BurhanUlTayyab/DetectGPT - source Pytorch implementation of [DetectGPT](https://arxiv.org/pdf/2301.11305.pdf). DetectGPT is an amazing method to determine whether a piece of text is written by large language models (like ChatGPT, GPT3, GPT2, BLOOM etc). However, we couldn't find any open-source implementation of it. Therefore this is the implementation of the paper. "DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature". (**[arXiv 2023](https://arxiv.org/abs/2301.11305v1)**). (Applications / 提示语(魔法))
- awesome-llm-and-aigc - BurhanUlTayyab/DetectGPT - source Pytorch implementation of [DetectGPT](https://arxiv.org/pdf/2301.11305.pdf). DetectGPT is an amazing method to determine whether a piece of text is written by large language models (like ChatGPT, GPT3, GPT2, BLOOM etc). However, we couldn't find any open-source implementation of it. Therefore this is the implementation of the paper. "DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature". (**[arXiv 2023](https://arxiv.org/abs/2301.11305v1)**). (Applications / 提示语(魔法))
README
# DetectGPT
An open-source Pytorch implementation of [DetectGPT](https://arxiv.org/pdf/2301.11305.pdf)[](https://x.com/BurhanUlT)
## Introduction
DetectGPT is an amazing method to determine whether a piece of text is written by large language models (like ChatGPT, GPT3, GPT2, BLOOM etc). However, we couldn't find any open-source implementation of it. Therefore this is the implementation of the paper.## installation
pip install -r requirements.txt## Usage
***Here v1.1 refers to DetectGPT, v1.0 is GPTZero***### Using Python function
```python3 infer.py```
#### example
```
from model import GPT2PPL
model = GPT2PPL()
sentence = "your text here"
model(sentence, "number of words per chunk", "v1.1")
```
### Using Python input
```python3 local_infer.py```
#### example
```
Please enter your sentence: (Press Enter twice to start processing)
Hello World.
My name is mike.
(empty line)
```## Acknowledgements
1. Mitchell, Eric, et al. "DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature." arXiv preprint arXiv:2301.11305 (2023).