Zero-Shot Machine-Generated Text Detection
Project description
lm-detect
Zero-Shot Machine-Generated Text Detection
lm-detect provides tooling for automatically detecting AI-written text.
Installation
pip install lm-detect
Usage
>>> from transformers import AutoTokenizer, AutoModel
>>> tokenizer = AutoTokenizer.from_pretrained("gpt2")
>>> model = AutoModel.from_pretrained("gpt2")
>>> from lm_detect import Perplexity
>>> ppl = Perplexity(model, tokenizer)
>>> ppl("Lorem ipsum dolor sit amet")
6.536835670471191
Authors
lm-detect is written by André Storhaug andr3.storhaug@gmail.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lm-detect-0.0.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file lm-detect-0.0.1.tar.gz
.
File metadata
- Download URL: lm-detect-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ede30b90b591b6bb37d310677c86b154c17c0e5719bd9d71cb03fcd0d90e01 |
|
MD5 | d64b908e438ad3a4d0d20804f3f9371c |
|
BLAKE2b-256 | 79de61af64eaf3b537e2ec712188bf2b93a465d77f3c006e0b83c564094c306d |
File details
Details for the file lm_detect-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: lm_detect-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e15113bfba900a35001bf81fbdb86783958661ce7f00f33132f3329801b1be2 |
|
MD5 | 2d6802b5878f11f62dd2029c789939dd |
|
BLAKE2b-256 | 84c555284b6c869577d3876d268392dd38290f8d85f82f42b141e223821ac934 |