Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nautilus50
· 2mo ago · 0 comments
+1, llama.cpp has a --grammar parameter which you can pass a BNF style grammar file to constrain generation. It can be used in Python llama.cpp wrapper
https://til.simonwillison.net/llms/llama-cpp-python-grammars
Comments
[–]
porridgeraisin
2mo ago
Yes. But even then, the probabilities are not calibrated. In jev/laya, they are (well, relatively anyways).