Skip to main content

No project description provided

Project description

Docs Tests

GenLM Control

GenLM Control is a library for controlled generation with programmable constraints. It leverages sequential Monte Carlo (SMC) methods to efficiently generate text that satisfies constraints or preferences encoded by arbitrary potential functions.

See the docs for details and examples for usage.

⚠️ Warning: This library is currently in active development. Please report any bugs in the issue tracker.

Quick Start

Installation

Clone the repository:

git clone git@github.com:ChiSym/genlm-control.git
cd genlm-control

and install with pip:

pip install .

This installs the package without development dependencies. For development, install in editable mode with:

pip install -e ".[test,docs]"

which also installs the dependencies needed for testing (test) and documentation (docs).

Requirements

  • Python >= 3.11
  • The core dependencies listed in the pyproject.toml file of the repository.

Testing

When test dependencies are installed, the test suite can be run via:

pytest tests

Documentation

Documentation is generated using mkdocs and hosted on GitHub Pages. To build the documentation, run:

mkdocs build

To serve the documentation locally, run:

mkdocs serve

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

genlm_control-0.1.0.tar.gz (78.8 kB view details)

Uploaded Source

Built Distribution

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

genlm_control-0.1.0-py3-none-any.whl (56.5 kB view details)

Uploaded Python 3

File details

Details for the file genlm_control-0.1.0.tar.gz.

File metadata

  • Download URL: genlm_control-0.1.0.tar.gz
  • Upload date:
  • Size: 78.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for genlm_control-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8914096cf1c09f19f08722953fcafa511f052a95114906fa9d25be71d74115f
MD5 482e9a17a3d7a851d3a2ca496972256d
BLAKE2b-256 1e643e52ba880051aae2bde4f22e634f2bdfe435b9330145c0efd47031c4b218

See more details on using hashes here.

File details

Details for the file genlm_control-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: genlm_control-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 56.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for genlm_control-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 887f6ef1fa1ea975cf6ea9a6bd41930bad8154da148aa88b90af00cc2d1fed7a
MD5 8ece79801b069de78d3a0096596c477f
BLAKE2b-256 87a1f63643db8f6dcf1dfb5390c05326235d6503d05624e23a6e51f67626258c

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