epfl-dlab / transformers-CFG

🤗 A specialized library for integrating context-free grammars (CFG) in EBNF with the Hugging Face Transformers
http://saibo-creator.xyz:7860/
MIT License
89 stars 16 forks source link

Repetition brackets symbols #92

Closed Viagounet closed 1 week ago

Viagounet commented 2 months ago

Hello!

First of all, thanks for working on this library, super handy. I was wondering if you were thinking about implementing the repetition bracket symbols (e.g [a-z]{5,10})?

It is supported in Llama.cpp but doesn't seem to be working with transformers-CFG right now, which makes it hard to easily switch from one framework to the other for some of my use-cases.

Thank you!

Saibo-creator commented 2 months ago

Hello @Viagounet , thanks for raising this issue ! Compatibility with llama-cpp is indeed a priority. We will push on our side for this feature.

@nathanrchn Let's have a discussion on in our next meeting. This looks like the most important feature requested and we have also this #30 #21

Saibo-creator commented 1 month ago

@Viagounet Thanks to the effort of @nathanrchn , this feature is now available, see #96