projectmoon
001da3ca2f
This commit removes the use of dynamic dispatch for GBNF rule limits by making use of some overly complicated generic trait bounds plus associated types, along with two new types. Instead of wrapping GBNF limits in a box dynamic trait object that produces GBNF limits, there are two types: GbnfLimitedPrimitive and GbnfLimitedComplex. These types contain the actual (not very complicated) logic to convert their contained limit-values into the GBNF limits, which then get converted to actual limits in the GBNF grammar. This removes heap allocation and dynamic dispatch, as well as making creation of limit objects more ergonomic. |
||
---|---|---|
.. | ||
src | ||
Cargo.lock | ||
Cargo.toml | ||
build.rs | ||
koboldcpp.json |