Files
gemma4-research/scripts/native-bakeoff/runs/matt-26b/ollama-native/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

47 lines
2.7 KiB
JSON

{
"arm": "ollama-native",
"model": "gemma4:26b",
"num_ctx": 8192,
"num_predict": 2048,
"started_at": 1776600752.7453067,
"turns": [
{
"step": 1,
"elapsed_s": 0.89,
"prompt_eval_count": 1306,
"eval_count": 26,
"content_len": 109,
"tool_call_count": 1,
"stop_reason": "stop",
"history_chars_before_append": 2656,
"raw_completion_head": "<|channel>thought\n<channel|><|tool_call>call:memory_read{query:<|\"|>home automation<|\"|>,user:<|\"|>seth<|\"|>}",
"raw_completion_tail": "",
"prompt_tail": "yz: hey mort what's the deal with the proxmox cluster nodes again<turn|>\n<|turn>model\nFour nodes: pve173 (tank ZFS host, PowerEdge R820), pve112 (workhorse), pve241 (caddy + game servers), and pve197 (GPU inference). Corosync on 10.10.10.0/24.<turn|>\n<|turn>user\n[2026-04-18 14:20] @seth:sethpc.xyz: What do I have stored about home automation? If anything, summarize it briefly.<turn|>\n<|turn>model\n",
"prompt_head": "<bos><|turn>system\nYou are Mort, a direct and witty AI assistant on Seth's Matrix server. Powered by Gemma 4. Current time: Saturday, April 18 2026 02:30 PM EDT.\n\nWhen a tool can answer the question, "
},
{
"step": 2,
"elapsed_s": 1.81,
"prompt_eval_count": 1424,
"eval_count": 65,
"content_len": 233,
"tool_call_count": 0,
"stop_reason": "stop",
"history_chars_before_append": 2928,
"raw_completion_head": "<|channel>thought\n<channel|>You've got the standard setup: Home Assistant running on VM 706 (on `pve173`), utilizing Zigbee2MQTT and an MQTT broker on CT 149. It's currently handling your LG TV, lighting, and Frigate NVR integration.",
"raw_completion_tail": "",
"prompt_tail": "<|\"|>home automation<|\"|>,user:<|\"|>seth<|\"|>}<tool_call|><|tool_response>response:memory_read{value:<|\"|>memories matching 'home automation':\n- home_automation: Seth uses Home Assistant on VM 706 (pve173) with Zigbee2MQTT and MQTT broker on CT 149. Integrates with LG TV, lights, and Frigate NVR.\n- preferences: dark theme with orange accents (#D35400), Sethflix/Sethian brand.<|\"|>}<tool_response|>",
"prompt_head": "<bos><|turn>system\nYou are Mort, a direct and witty AI assistant on Seth's Matrix server. Powered by Gemma 4. Current time: Saturday, April 18 2026 02:30 PM EDT.\n\nWhen a tool can answer the question, "
}
],
"final": {
"halt_reason": "no_tool_calls",
"steps_used": 2,
"tool_calls_total": 1,
"wall_clock_s": 2.7,
"final_message_count": 16,
"final_history_chars": 3161
},
"task": "memory",
"task_prompt": "What do I have stored about home automation? If anything, summarize it briefly."
}