outlines icon indicating copy to clipboard operation
outlines copied to clipboard

Improve CFG Correctness

Open lapp0 opened this issue 1 year ago • 0 comments

Per https://github.com/dottxt-ai/outlines/pull/1067#issuecomment-2251396332

Here are some necessary performance and correctness improvements.

Ensure parser allows ambiguous terminals

The grammar ?start: /ab*/ /bc?/ with a generation of abbbb doesn't allow a next token of c, it requires bc.

Allow skipping rule

The grammar ?start: "a" ("b" | "c")* "d" with a generation of a doesn't allow a next token of d

Incorrectly Over-Constrained

lapp0 avatar Sep 14 '24 19:09 lapp0