Skip to content

jpeig/grammar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

output-template extension for text-generation-webui

Implementation of CBNF grammar for text-generation-webui.

This extension allows to force output generated by LLM to conform with expected format, making it possible to parse it.

This is done by creating state machine which, every time when new token is to be generated, decides which tokens are allowed to conform with defined CBNF grammar and ban (set probability to -inf) all other tokens.

To better explain the issue, here is an example of prompt and output generated without extension demonstrating the problem and here is same prompt and output generated with grammar

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%