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 hashes)
Built Distribution
Close
Hashes for lm_detect-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e15113bfba900a35001bf81fbdb86783958661ce7f00f33132f3329801b1be2 |
|
MD5 | 2d6802b5878f11f62dd2029c789939dd |
|
BLAKE2b-256 | 84c555284b6c869577d3876d268392dd38290f8d85f82f42b141e223821ac934 |