Jinja template error in LMStudio

#1
by ljupco - opened

Hey,
Thanks for the model.
Running the model on a Mac in LMStudio, but getting this error which I presume comes from the jinja template? How does your jinja template look like please?

Failed to generate AI response
Error rendering prompt with jinja template: "Error: Parser Error: Expected closing statement token. OpenSquareBracket !== CloseStatement.
at _0xc1039d (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:227215)
at /Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:227817
at _0x570f07 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:230141)
at _0xb7a340 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:231644)
at /Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:227923
at _0x570f07 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:230141)
at _0xb7a340 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:232285)
at /Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:227923
at _0x570f07 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:230141)
at _0xb7a340 (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/llmworker.js:114:231644)". This is usually an issue with the model's prompt template. If you are using a popular model, you can try to search the model under lmstudio-community, which will have fixed prompt templates. If you cannot find one, you are welcome to post this issue to our discord or issue tracker on GitHub. Alternatively, if you know how to write jinja templates, you can override the prompt template in My Models > model settings > Prompt Template.

Hey;

The beta version -LMS- has this fixed ; there are also fixes here:

Update the Jinja Template (go to this site, template-> copy the "Jinja template" and then paste.)

[ https://lmstudio.ai/neil/qwen3-thinking ]

And you can manually select : "Chatml" template too.

Hey - thanks! It works! Great stuff. :-) Ohhh, it's excellent -

30.18 tok/sec β€’ 1487 tokens β€’ 2.63s to first token β€’ Stop reason: EOS Token Found

Thank you! :-)

Sign up or log in to comment