Skip to content

Tempo9 v1.3.1

Latest

Choose a tag to compare

@kzjeef kzjeef released this 04 Nov 06:29

Tempo9 1.3.1

A bug-fix release. Prompts are now rendered from a model's chat template exactly as transformers' apply_chat_template renders them. Before this release, some templates produced a prompt a few bytes off: nothing failed, and the model just answered a little worse.

What was wrong

Chat templates are rendered by swift-jinja. We were on 2.4.2, with its defaults, and that differed from transformers in two ways:

  • Comment whitespace control was ignored. {#- and -#} did not strip the whitespace around a comment. Unsloth's Qwen3.6 template ends with such a comment, so every generation prompt ended with one extra newline (</think>\n\n\n instead of </think>\n\n). The visible symptom: Qwen3.6-35B-A3B answered "Say hi in five words." with an empty reply.
  • Block whitespace differed. trim_blocks and lstrip_blocks were off; transformers and llama.cpp both turn them on. Gemma 4 E2B and E4B prompts carried extra blank lines after <bos> and after every system turn. Tool declarations came out as properties:{ city:{ …, and Flint added a newline after <tools>.

Upstream had already fixed the lexer side (huggingface/swift-jinja#76, #93). 1.3.1 moves to swift-jinja 3.0.0 and renders with transformers' trim_blocks / lstrip_blocks.

How it was checked

Template parity. For each model below, its own chat template, as carried in the GGUF, was rendered by Tempo9 and by jinja2 configured as transformers configures it. The comparison is byte for byte, over six conversations: single turn with thinking on and off, system + user, multi-turn, tool definitions, and a past tool call with its result.

Model (GGUF) 1.3.0 1.3.1
Qwen3.6-35B-A3B (Unsloth) 6 of 6 differ identical
Gemma 4 E2B, E4B 6 of 6 differ identical
Flint 2 of 6 differ (tools) identical
Qwen3.5-9B, Qwen3.5-35B-A3B, Qwen3.8-27B identical identical

Agreement with llama.cpp. Qwen3.6-35B-A3B Q5K_IQ3XXS, the same GGUF on both engines, Apple M5 Pro 24 GB. Greedy decoding, 50 short chat prompts, up to 32 tokens each, compared against llama.cpp 0.7.0:

1.3.0 1.3.1
First word matches 42 / 50 48 / 50
Whole reply matches 14 / 50 37 / 50
Empty replies 1 0

The remaining differences are ordinary numerical ones between two engines.

If you measured Gemma 4 E2B/E4B or Qwen3.6 on an earlier release, those prompts carried the extra whitespace. It is worth re-running.

Engine

The engine is unchanged from 1.2.2 (cf3323242), so SwiftPM keeps downloading the 1.2.2 xcframework.

C/C++ SDK

Added on 2026-11-05: tempo9-c-sdk-1.3.1-macos-arm64.tar.gz runs Tempo9 inside a C or C++ program. It carries a newer engine than the CLI and Swift packages above (3.0.0-rc3, 90cb49460). Gemma 4 and Flint are not supported yet. See docs/c-sdk.md.

libtempo9_llm is Apache-2.0, with its source in CSDK/. The engine library is under ENGINE-LICENSE 0.2.