MrBeforeMyTime

joined 11 months ago
[–] MrBeforeMyTime@alien.top 1 points 9 months ago

Well, you don't have to have it ever write "normal" text. You can just have an object with a "text" property that the model is instructed to use only when it is not calling a function. Otherwise, it can provide different function calling json.

A grammar means it's forced to output a structure, in this case, json. You can write instructions to output different json based on different scenarios and use code to check which key is present in the json. If the object has the key "text" its a text response. If it doesn't its a function response.

That's basically how the function call api works anyway, just less consistent than grammar.

[–] MrBeforeMyTime@alien.top 1 points 9 months ago (2 children)

Why not just use grammar sampling with Llama cpp?

[–] MrBeforeMyTime@alien.top 1 points 10 months ago

The bitter lesson strikes again.