Skip to main content

A tool to elevate your language models with insightful diversity metrics.

Project description

LangDiversity

PyPI version Python version License

Elevate your language models with insightful diversity metrics.

Links

Paper: https://arxiv.org/abs/2308.11189

Video: https://www.youtube.com/watch?v=BekDOLm6qBI&t=10s&ab_channel=NeuroSymbolic

Check out LangDiversity Hello World if you're new.

Table of Contents

Introduction

LangDiversity is a package that provides tools to calculate diversity measures for a given set of data. Specifically, it can compute measures like Shannon's entropy and Gini impurity. It also offers utilities to select prompts based on their diversity scores when interacting with models like OpenAI's GPT-3.5 Turbo.

The primary goal of this project is to assist researchers and developers in analyzing the diversity of responses generated by language models, thereby aiding in the evaluation and fine-tuning of such models.

Installation

pip install langdiversity

Usage

Detailed documentation is available here.

Bibtex

If you used this software in your work please cite our paper

@misc{ngu2023diversity,
      title={Diversity Measures: Domain-Independent Proxies for Failure in Language Model Queries},
      author={Noel Ngu and Nathaniel Lee and Paulo Shakarian},
      year={2023},
      eprint={2308.11189},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

License

This repository is licensed under BSD-3-Clause

Contacts

For any inquiries or feedback, please contact:

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

langdiversity-1.1.6.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

langdiversity-1.1.6-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file langdiversity-1.1.6.tar.gz.

File metadata

  • Download URL: langdiversity-1.1.6.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for langdiversity-1.1.6.tar.gz
Algorithm Hash digest
SHA256 ab34fa5d08d960f4cd8c99bf663547ca07ab53bb1bf007b482259b0723f4dbb8
MD5 b848bdd94c80ce459600805a4b1f7748
BLAKE2b-256 3e804a7f6f8d7ea2bd89318cc92009cbe0aa9835e9311010418717d2d95b0e33

See more details on using hashes here.

File details

Details for the file langdiversity-1.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for langdiversity-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 be42373ffe8fe9909982f0d52492ff963eeeef6b863b66d240426f4f098c81fa
MD5 c71d3075bc5282f77e3644655961d83e
BLAKE2b-256 047ec92d2245162ba9e512b622e832f8224d9d04480421d2988500f73db4a283

See more details on using hashes here.

Supported by

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