decoding
Composable inference algorithms with LLMs and programmable logic.
Check out the README
and TUTORIAL
on GitHub for more information.
Core modules:
decoding.models
: Interface for working with Language Models (LMs), and leveraging them to generate text or score sequences.decoding.scorers
: Interface for constructing custom scoring functions that can be used to rank and steer generation.decoding.generators
: Interface for implementing custom generation algorithms that can be used to sample controlled text from LMs.
Supporting modules:
decoding.pmf
: Data structures for probability mass functions and other collections of measures as well as algorithms for calculating information-theoretic quantities.decoding.samplers
: Methods for sampling from distributions.decoding.estimators
: Decision rules for deriving point estimates from distributions. Supports a flexible Minimum Bayes Risk (MBR) interface that accepts arbitrary user-defined utility functions.decoding.metrics
: Metrics that may be useful for constructing scoring functions.decoding.utils
: Miscellaneous helper functions for the library.
1""" 2Composable inference algorithms with LLMs and programmable logic. 3 4Check out the [`README`](https://github.com/benlipkin/decoding/blob/main/README.md) 5and [`TUTORIAL`](https://github.com/benlipkin/decoding/blob/main/TUTORIAL.md) 6on [GitHub](https://github.com/benlipkin/decoding/) for more information. 7 8Core modules: 9- `decoding.models`: Interface for working with Language Models (LMs), and 10 leveraging them to generate text or score sequences. 11- `decoding.scorers`: Interface for constructing custom scoring functions 12 that can be used to rank and steer generation. 13- `decoding.generators`: Interface for implementing custom generation algorithms 14 that can be used to sample controlled text from LMs. 15 16Supporting modules: 17- `decoding.pmf`: Data structures for probability mass functions and other collections 18 of measures as well as algorithms for calculating information-theoretic quantities. 19- `decoding.samplers`: Methods for sampling from distributions. 20- `decoding.estimators`: Decision rules for deriving point estimates from distributions. 21 Supports a flexible Minimum Bayes Risk (MBR) interface that accepts arbitrary 22 user-defined utility functions. 23- `decoding.metrics`: Metrics that may be useful for constructing scoring functions. 24- `decoding.utils`: Miscellaneous helper functions for the library. 25""" 26 27from decoding import ( 28 estimators, 29 generators, 30 metrics, 31 models, 32 pmf, 33 samplers, 34 scorers, 35 utils, 36) 37 38__all__ = [ 39 "estimators", 40 "generators", 41 "metrics", 42 "models", 43 "pmf", 44 "samplers", 45 "scorers", 46 "utils", 47]