Commit Graph

11 Commits

Author SHA1 Message Date
Clint Herron b712ae4047 Cleaning up forgotten symbols. Modifying simple test to use test harness. Added comments for more verbose descriptions of what each test is accomplishing. 2024-04-29 14:29:42 -04:00
Clint Herron 7fe2fb3fed Implementing suggestions from @ochafik -- grammars and test strings now print and flush before tests to aid in debugging segfaults and whatnot. 2024-04-29 14:17:59 -04:00
Clint Herron a273de3c5a Removing trailing whitespace. 2024-04-29 14:05:30 -04:00
Clint Herron e3218de5a5 Adding quotes around strings to explicitly show whitespace 2024-04-29 14:05:30 -04:00
Clint Herron b7f24dba00 Separating test calls to give more helpful stack traces on failure. Adding verbose messages to give visibility for what is being tested. 2024-04-29 14:05:30 -04:00
Clint Herron 7b04c215eb Fixing build when C++17 is not present. 2024-04-29 14:05:30 -04:00
Clint Herron 8f17815ca8 Add slightly more complex grammar with quantifiers to test references with quantifiers. 2024-04-29 14:05:30 -04:00
Clint Herron ab606c030f Add tests around quantifiers to ensure both matching and non-matching compliance. 2024-04-29 14:05:30 -04:00
Clint Herron 9cd07c2f9d Cleaning up integration tests to share code between tests and make it simpler to add new tests. 2024-04-29 14:05:30 -04:00
Olivier Chafik cbaadc9294
grammars: 1.5x faster inference w/ complex grammars (vector reserves / reuses) (#6609)
* grammars: reserve rejects & next candidates

* grammars: reuse new_stacks

* grammars: fix missing sig change in llama.h

* grammars: fix test (api changed)

* grammars: update gbnf-validator.cpp

* grammars: simpler syntax (no swap)
2024-04-11 19:47:34 +01:00
Clint Herron 57dd02c44b
Tests: Added integration tests for GBNF parser (#6472)
* Added integration tests for GBNF parser to validate correctness of parsing, as well as correctness of string matching. Intended for use to pin behavior while working on performance improvements.

* Fixing whitespace errors and cleaning error message alert to be clearer.

* Removing hacky include to llama.cpp from grammar integration test now that needed functions are available via internal API.

* Comment cleanup.

* Reorganizing tests for readability.

* Cleaning up debug message to make a bit more sense.
2024-04-06 10:31:33 -04:00