Hacker News new | ask | show | jobs
by Scaevolus 1065 days ago
Llama.cpp recently added grammar based sampling, which constraints token selection to follow a rigid format like you describe.

https://github.com/ggerganov/llama.cpp/pull/1773