How does set Grammar works in AutoGGUFModel? #14576
-
Hello, In AutoGGUFModel, setGrammar asks for a bool; however, setGrammar(True) gives me a value type error, and it seems that setGrammar needs a string instead. Does this mean I can pass my BNF-like grammar directly to setGrammar? It is the same for setSystemPrompt(). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @Modaffinity Seems like there are type annotation errors with the setters (this does not affect functionality). This will be fixed in the future release. Thanks for asking! |
Beta Was this translation helpful? Give feedback.
Hi @Modaffinity
You are right: You can specify a BNF-like grammar with
setGrammar
as a string, which is then passed to the model backend.Seems like there are type annotation errors with the setters (this does not affect functionality). This will be fixed in the future release. Thanks for asking!