v0.4.0
Summary
- faster
Formatter
compilation - Refactors to make internal implementation and public API cleaner
- Native support for basic json schema(all
type
keyword constraints and recursion) - Basic support for substring extraction
What's changed
- Removed
grammar_generators
package completely.JsonExtractor
class is moved toformats.json
package.
FormatterBuilder.schema()
is removed.- Added
FormatterBuilder.json()
which is simpler to use thanFormatterBuilder.schema()
. RegexExtractor
is moved fromextractor
toformats.regex
kbnf_representation
is renamed tokbnf_reference
andnonterminal
is renamed tokbnf_definition
for clarity inExtractor
.NonterminalExtractor
is added to better illustrate the differences in interfaces&implementation betweenLiteralExtractor
and other extractors.LiteralExtractor
is private now,- Bug fix: JsonExtractor will no longer produce
None
when parsing json where some keys/values contain{
or}
. - Make
Formatron
compatible with the newestvllm==0.6.0
andexllamav2==0.2.1
. - Faster constrained decoding with
exllamav2
integration thanks to @turboderp 's optimizations in hisexllamav2
library. - Faster
kbnf.Vocabulary
creation by @turboderp in #10 - Update docs, benchmarks and comments accordingly.
Full Changelog: v0.3.4...v0.4.0