program-constrained-language-model-sampling | program constraints on pre-trained language models

 by   abetlen Jupyter Notebook Version: Current License: MIT

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.
Support
    Quality
      Security
        License
          Reuse

            kandi-support 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.
              OutlinedDot
              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.

            kandi-Quality Quality

              program-constrained-language-model-sampling has no bugs reported.

            kandi-Security Security

              program-constrained-language-model-sampling has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License 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.

            kandi-Reuse 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
            Get all kandi verified functions for this library.

            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:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/abetlen/program-constrained-language-model-sampling.git

          • CLI

            gh repo clone abetlen/program-constrained-language-model-sampling

          • sshUrl

            git@github.com:abetlen/program-constrained-language-model-sampling.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link