Skip to main content

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.

Metadata

Release files for lm-detect 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lm-detect 0.0.1
File Size Uploaded Provenance Actions
lm-detect-0.0.1.tar.gz 4.3 kB Without provenance Details for lm-detect-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lm-detect 0.0.1
File Interpreter ABI Platform Actions
lm_detect-0.0.1-py3-none-any.whl Python 3 none any Details for lm_detect-0.0.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / lm-detect-0.0.1.tar.gz

Download URL lm-detect-0.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
33ede30b90b591b6bb37d310677c86b154c17c0e5719bd9d71cb03fcd0d90e01
BLAKE2b-256 checksum
How to use checksums
79de61af64eaf3b537e2ec712188bf2b93a465d77f3c006e0b83c564094c306d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / lm_detect-0.0.1-py3-none-any.whl

Download URL lm_detect-0.0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e15113bfba900a35001bf81fbdb86783958661ce7f00f33132f3329801b1be2
BLAKE2b-256 checksum
How to use checksums
84c555284b6c869577d3876d268392dd38290f8d85f82f42b141e223821ac934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for lm-detect 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page