epfl-dlab / epfl-dlab/transformers-CFG
Add support for canonical encoding
Open
enhancement
- Dominant language
- Python
- Stars
- 139
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Currently we allow all encodings that satiisfy the constraints, but actually the tokenizer has a canonical encoding, which i generally the shortest and with priority.
For example,
"aaaa" can be tokenized as ["aa", "aa"] or ["aaa", "a"] or ["a", "aaa"] or more.
Currently our constraints allow all of them but actually only one is canonical.
One flag can be added to enfore strict mode
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.