Skip to main content

Implementation of the MAUVE to evaluate text generation

Project description

MAUVE

MAUVE is a library built on PyTorch and HuggingFace Transformers to measure the gap between neural text and human text with the eponymous MAUVE measure, introduced in this paper (NeurIPS 2021 Ooutstanding Paper).

Documentation Link

New: MAUVE is available via HuggingFace Datasets!

Features:

  • MAUVE with quantization using k-means.
  • Adaptive selection of k-means hyperparameters.
  • Compute MAUVE using pre-computed GPT-2 features (i.e., terminal hidden state), or featurize raw text using HuggingFace transformers + PyTorch.
  • New: minibatching for efficient implementation.

Installation

For a direct install, run this command from your terminal:

pip install mauve-text

Citation

If you find this package useful, or you use it in your research, please cite:

@inproceedings{pillutla-etal:mauve:neurips2021,
  title={MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers},
  author={Pillutla, Krishna and Swayamdipta, Swabha and Zellers, Rowan and Thickstun, John and Welleck, Sean and Choi, Yejin and Harchaoui, Zaid},
  booktitle = {NeurIPS},
  year      = {2021}
}

Further, the Frontier Integral was introduced in this paper:

@inproceedings{liu-etal:divergence:neurips2021,
  title={{Divergence Frontiers for Generative Models: Sample Complexity, Quantization Effects, and Frontier Integrals}},
  author={Liu, Lang and Pillutla, Krishna and  Welleck, Sean and Oh, Sewoong and Choi, Yejin and Harchaoui, Zaid},
  booktitle = {NeurIPS},
  year      = {2021}
}

Acknowledgements

This work was supported by NSF DMS-2134012, NSF CCF-2019844, NSF DMS-2023166, the DARPA MCS program through NIWC Pacific (N66001-19-2-4031), the CIFAR "Learning in Machines & Brains" program, a Qualcomm Innovation Fellowship, and faculty research awards.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mauve-text-0.3.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mauve_text-0.3.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file mauve-text-0.3.0.tar.gz.

File metadata

  • Download URL: mauve-text-0.3.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

File hashes

Hashes for mauve-text-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ed54733d28d9b6b9e09ae6ebe74e9c06b39018c581d2a2ee5b898d8607ae4569
MD5 0d5406de21bf6d7511912e8f6bab4ccf
BLAKE2b-256 4a07f19ca26409232c908f4c5c83e76f520edc07cff7e9979c0b126b6eb8aebc

See more details on using hashes here.

File details

Details for the file mauve_text-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mauve_text-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

File hashes

Hashes for mauve_text-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d21a914e03b7f1498b3a1698467744651fe54fe4f680c4527a08c80cde2b003
MD5 1cee893c3e82d652f89491cb8032c058
BLAKE2b-256 1ac7c2313004e36177b3f189da0422ec7a5ef31dc21847bf53c463531d1351aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page