noamgat / lm-format-enforcer

Enforce the output format (JSON Schema, Regex etc) of a language model
MIT License
994 stars 45 forks source link

Feature/escaping performance #93

Closed noamgat closed 2 months ago

noamgat commented 2 months ago

A performance improvement that allows the shortcut/caching mechanisms to be active in more situations. After the discussion in https://github.com/noamgat/lm-format-enforcer/pull/91 we found a more holistic way to solve this issue, and may positively affect other regions. Unit tests run faster.