program-constrained-language-model-sampling | program constraints on pre-trained language models
kandi X-RAY | program-constrained-language-model-sampling Summary
kandi X-RAY | program-constrained-language-model-sampling Summary
program-constrained-language-model-sampling is a Jupyter Notebook library. program-constrained-language-model-sampling has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
The aim of this project is to investigate the use of program constraints on pre-trained language models to improve their ability to generate structured text as output. Language models can accurately predict the next token in a sequence. Unfortunately generated text is not necessarily structured in a way that can be utilised by other programs. For example, a language model that extracts json objects from unstructured text may fail to produce a valid json object by adding additional trailing commas or introducing comments. We propose a simple method to constrain the tokens that can be sampled by a language model by using an external program to decide which tokens in the vocabulary are valid at a given point in the sequence. We then force the language model to only sample over these valid tokens.
The aim of this project is to investigate the use of program constraints on pre-trained language models to improve their ability to generate structured text as output. Language models can accurately predict the next token in a sequence. Unfortunately generated text is not necessarily structured in a way that can be utilised by other programs. For example, a language model that extracts json objects from unstructured text may fail to produce a valid json object by adding additional trailing commas or introducing comments. We propose a simple method to constrain the tokens that can be sampled by a language model by using an external program to decide which tokens in the vocabulary are valid at a given point in the sequence. We then force the language model to only sample over these valid tokens.
Support
Quality
Security
License
Reuse
Support
program-constrained-language-model-sampling has a low active ecosystem.
It has 2 star(s) with 0 fork(s). There are 1 watchers for this library.
It had no major release in the last 6 months.
program-constrained-language-model-sampling has no issues reported. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of program-constrained-language-model-sampling is current.
Quality
program-constrained-language-model-sampling has no bugs reported.
Security
program-constrained-language-model-sampling has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
License
program-constrained-language-model-sampling is licensed under the MIT License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
program-constrained-language-model-sampling releases are not available. You will need to build from source code and install.
Top functions reviewed by kandi - BETA
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of program-constrained-language-model-sampling
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of program-constrained-language-model-sampling
program-constrained-language-model-sampling Key Features
No Key Features are available at this moment for program-constrained-language-model-sampling.
program-constrained-language-model-sampling Examples and Code Snippets
No Code Snippets are available at this moment for program-constrained-language-model-sampling.
Community Discussions
No Community Discussions are available at this moment for program-constrained-language-model-sampling.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install program-constrained-language-model-sampling
You can download it from GitHub.
Support
[x] llama via llama.cpp[ ] rwkv via rwkv.cpp
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page