Chat template: sync with zai-org/GLM-5.3 (linear tool-result reordering)

#2
by vMaroon - opened

The chat template here matches zai-org/GLM-5.3 at aca966e4, one commit behind its main. With it, render time grows with the square of the parallel tool calls in one turn, so a large fan-out passes vLLM's 30 s render timeout. Upstream fixed this in https://huggingface.co/zai-org/GLM-5.3/discussions/31.

This replaces the file with upstream's current one (ba32f8c1). Nothing else changes.

Parallel tool calls main this PR
400 1.70 s 0.02 s
800 6.7 s 0.04 s
1,600 27.5 s 0.09 s

transformers 5.22.1 with jinja2 3.1.6, one M4 core. Output is byte-identical to main on 18,000 randomized conversations.

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

Sign up or log in to comment