← Back to context

Comment by gcr

13 hours ago

This is misinformation. Ollama’s supported structured outputs that conform to a given JSON-schema for months. Here’s a post about this from last year: https://ollama.com/blog/structured-outputs

This is absolutely possible to do at the model level via logit shaping. Llama-cpp’s functionality for this is called GBNF. It’s tightly integrated into the token sampling infrastructure, and is what ollama builds upon for their json schema functionality.

> It’s tightly integrated into the token sampling infrastructure, and is what ollama builds upon for their json schema functionality.

Do you mean the functionality of generating ebnf grammar and from a json schema use it for sampling is part of ggml, and all they have to do is use it?

I assumed that this was part of llama.cpp, and another feature they have to re-implement and maintain.