b70-optimization-lab

Gemma 4 26B A4B Q8 Handoff

Last updated: 2026-07-03

This is the bookmark for the Gemma 4 26B A4B Q8 work on Intel Arc Pro B70. Read this before resuming optimization, deploying a Gemma 26B endpoint, or switching away and coming back later.

Current Status

Gemma 26B is no longer an unstructured active search. It is captured as a usable one-B70 llama.cpp service profile plus a research frontier.

Best strict short-decode result:

Latest same-recipe documentation-pass rerun:

Variance is real. The 2026-07-02 analysis concluded that 120 versus 125 is mostly output path/content/MTP acceptance variance, not recipe drift. See:

Production Serving

The persistent backend launcher is:

cd /home/steve/llm-optimizations
GPU_INDEX=0 PORT=19350 GEMMA4_26B_PROFILE=record \
  scripts/serve-gemma4-26b-q8-production.sh

It serves an OpenAI-compatible llama-server backend on:

http://127.0.0.1:19350/v1
model id: gemma4-26b-a4b-q8

Profiles:

Tracked service artifacts:

Temporary quad deployment on 2026-07-07:

Smoke status on 2026-07-03:

32K service-profile smoke on 2026-07-03:

The systemd unit is localhost-only on port 19350. It does not rewire the public :8000 frontdoor. If Gemma 26B should become the public LAN model, point the frontdoor at http://127.0.0.1:19350 after the backend smoke passes.

Smoke a running backend:

cd /home/steve/llm-optimizations
scripts/gemma4-26b-prod-health.py \
  --base-url http://127.0.0.1:19350 \
  --model gemma4-26b-a4b-q8 \
  --output-json data/gemma4-26b-prod-health-$(date -u +%Y%m%dT%H%M%SZ).json

Use the fuller canary when validating after a source/runtime change:

python3 scripts/gemma4-text-canary.py \
  --base-url http://127.0.0.1:19350 \
  --model gemma4-26b-a4b-q8 \
  --repeats 32 \
  --out data/gemma4-26b-prod-canary-$(date -u +%Y%m%dT%H%M%SZ).json

Reproduction And Validation

Strict record reproduction:

cd /home/steve/llm-optimizations
GPU_INDEX=0 PORT=19350 \
  LABEL=gemma4-q8-gpu0-125repro-$(date -u +%Y%m%dT%H%M%SZ) \
  bash repro/gemma4-26b-a4b-q8-b70-125tps-20260701/run.sh

Production/service smoke is not a LocalMaxxing claim. Promote a result only through the fixed realistic final gate:

For close changes near the current record, single runs are not enough. Use paired same-window A/B plus no-spec calibration from reliability-protocol.md.

What Is Left To Improve

Short-decode has diminishing returns from config sweeps. The obvious flag neighborhoods are mostly exhausted. Expect little reliable gain from another round of p_min, n_max, unroll, draft-quant, rowpack, or generic SYCL flag roulette.

Most plausible remaining short-decode upside:

  1. Exact verifier LM-head cost reduction that is not row-by-row serial.
  2. A mathematically safe candidate-vs-max verifier certificate that avoids full-vocab work where possible.
  3. A head-only or bonus-token verifier path that preserves exact target verification and does not break the bonus pipeline.
  4. MoE selected-down/router kernel reductions beyond the tested VDR2/top8/ rowpack/direct variants.

Prompt-processing and long-context still have more practical service value. The best remaining area is Gemma global FlashAttention for DKQ=576, DV=512 and GQA8/global layer shapes. Existing service wins are small but real; keep short-decode record validation separate from long-context service validation.

Estimated remaining “meat on the bones”:

Do Not Reopen Without New Evidence

Resume Checklist

When returning to Gemma after another model:

  1. Read this file, then README.md, reproduce.md, research-plan.md, and validity-gates.md.
  2. Run git status --short --branch and confirm there is one active workspace: /home/steve/llm-optimizations.
  3. Smoke the production backend with scripts/serve-gemma4-26b-q8-production.sh and scripts/gemma4-26b-prod-health.py.
  4. If optimizing short decode, first reproduce the record wrapper or a compact strict gate. Do not compare against historical highs without same-window controls.
  5. If optimizing prompt/long-context, use the long-context service gate and then rerun the short-decode guard to prove no regression.
  6. Preserve every meaningful patch and result in patches/, experiments/, data/, and notes/ before moving on.