Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
ngxsonΒ 
posted an update 3 days ago
Post
2006
I made this small tool that can be useful for debugging Ollama chat template: ngxson/ollama_template_test

CC @bartowski you may need this ;-)

@ngxson very well done!

I guess it's too late for me to make one for llama.cpp now that jinja template support is being implemented. convert_hf_to_gguf_update.py can do it, if I recall correctly, but there is no web based tool.

Β·

For llama.cpp, I'm not sure if it can be useful to do so. The problem is that source code of llama.cpp changes very often, and it's not parsing the template, but just simple if..else checks.

Ollama on the other hand has its own template engine and template language, which I haven't seen any implementation outside of Golang. Testing ollama templates was always a difficult thing for me when I work with ollama <> hugging face integration, so I made this tool to simplify my workflow.