Make the chat template work in llama.cpp and add a response template

#34
by Rocketknight1 HF Staff - opened

Replaces two Jinja features llama.cpp doesn't support (x.0 indexing and the unique filter), which made every conversation with tool calls fail there; output in Transformers and vLLM is unchanged. Also adds a response template, so Transformers' parse_response turns the model's output back into a message (reasoning, content and tool calls), matching vLLM's own GLM parser.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment