Files
gemma4-research/scripts/native-bakeoff/runs/smoke-B-memory.json
T
Mortdecai df5542f7d6 feat: native-bakeoff scaffold — Ollama JSON vs native-token tool-calling
Three-arm harness under scripts/native-bakeoff/:
- arm A: /api/chat with JSON tools (current default)
- arm B: /api/generate raw:true with canonical HF jinja template rendered directly
- arm C: google-deepmind/gemma JAX ToolSampler (env-gated, JAX required)

Interim finding from A+B sweep on matt-strix gemma4:26b Q4: Ollama's
bidirectional JSON↔native tool-call translator is faithful. The "long"
multi-tool task produces identical behavior (7 steps / 6 tools) on both
arms. Earlier arm-B parser bug that looked like a divergence was a
harness issue: preserving the model's <|channel>thought\n<channel|>
prefix as assistant content tripped the jinja template's
tool_response-following conditional, appending a spurious <turn|>\n
that corrupted the next step's prompt. Fixed by dropping the channel
prefix on the assistant message.

Arm C left as scaffolded-but-not-run — the JAX/bf16 reference path
would answer "does the GGUF runtime diverge from DeepMind's
implementation" but requires a separate env with the `gemma` PyPI
package. Parked pending SDXL eviction or vast-h100 session.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 05:45:12 -04:00

41 lines
1.3 KiB
JSON

{
"arm": "ollama-native",
"model": "gemma4:latest",
"num_ctx": 8192,
"num_predict": 2048,
"started_at": 1776572778.1317718,
"turns": [
{
"step": 1,
"elapsed_s": 0.7,
"prompt_eval_count": 1306,
"eval_count": 15,
"content_len": 61,
"tool_call_count": 1,
"stop_reason": "stop",
"history_chars_before_append": 2656,
"raw_completion_head": "<|tool_call>call:memory_read{query:<|\"|>home automation<|\"|>}"
},
{
"step": 2,
"elapsed_s": 1.69,
"prompt_eval_count": 1417,
"eval_count": 137,
"content_len": 457,
"tool_call_count": 0,
"stop_reason": "stop",
"history_chars_before_append": 2928,
"raw_completion_head": "I found a couple of things stored about home automation:\n\n1. **System Setup:** You're running **Home Assistant** on **VM 706** (hosted on `pve173`).\n2. **Integrations:** It uses **Zigbee2MQTT** and an **MQTT broker** located on **CT 149**"
}
],
"final": {
"halt_reason": "no_tool_calls",
"steps_used": 2,
"tool_calls_total": 1,
"wall_clock_s": 2.39,
"final_message_count": 16,
"final_history_chars": 3385
},
"task": "memory",
"task_prompt": "What do I have stored about home automation? If anything, summarize it briefly."
}