Llama.cpp configuration #1793
Replies: 3 comments
|
so i actually dealt with this exact thing a while back when trying to plug llama.cpp into a similar setup, and yeah, that error is super annoying. the issue is likely how the system message is being handled in your custom endpoint. llama.cpp expects a very strict input format, and it sounds like the request payload you're sending might not be aligned with what it needs. first, double-check your example payload (not a code block, just writing it out): {
"messages": [
{ "role": "system", "content": "You're a helpful assistant." },
{ "role": "user", "content": "What's the weather today?" }
]
}also, the way you're triggering this in the app matters. if you're passing a template or trying to use jinja for system messages, it's easy to mess up ordering. the error you posted seems to hint at that. maybe simplify the template down, or even hardcode the system message while testing. are you testing with a small model like |
|
Thanks so much for your help. I am actually just learning about how inference engines work and how to configure them locally. I understand what you are saying but have no ides where to configure some of the options you mentioned like the chat template. Interestingly the model such as gemma4-E4B fits on my RTX 4060 Ti 16GB card and I can use it with Cline in VS Code with no problem. It just doesn't work in OpenInterpreter. I can use either llama-server directly or llama-swap which opens up local Open AI API endpoints and I get the same result. I also don't know how to tweak headers and timeouts. If there is a guide you can point me to learn more about how to configure and run local models, it would be greatly appreciated. |
|
@easygoer33 Based on the error and your follow-up, I don't think this is a problem with your RTX 4060 Ti or with The key part of the error is:
That message is coming from the Jinja chat template used to format prompts before they are sent to the model. Many modern GGUF models (including Gemma, Llama 3/4, Qwen, etc.) rely on a specific chat template, and Since you mentioned:
that strongly suggests the request generated by Open Interpreter isn't matching what the model's chat template expects, rather than a problem with your inference server. A few things I'd try:
From what I can tell, I couldn't find documentation showing that Open Interpreter exposes a setting to customize or override the Jinja chat template used by If you're interested in learning more about local inference, I'd recommend starting with the official
Those docs explain the purpose of options like A couple of questions that would help narrow this down:
Those details should make it possible to determine whether this is an Open Interpreter compatibility issue, a chat-template mismatch, or something specific to the model. If this solves your problem, feel free to mark it as the accepted answer so others can find it easily. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Can anyone explain how to configure the desktop app to use llama.cpp as the backend for local models? I used API under "Provider" with Custom endpoint and the request failed. Sorry if this is a silly question. ty
`Request failed
Unable to generate parser for this template. Automatic parser generation failed:
While executing CallExpression at line 85, column 32 in source:
...first %}↵ {{- raise_exception('System message must be at the beginnin...
^
Error: Jinja Exception: System message must be at the beginning.`
All reactions