Repository navigation
docs(models): point consolidated-agent defaults at Gemma-4-E4B - #2279
kovtcharov wants to merge 1 commit into
Conversation
Docs still told users the Docker, Jira, Routing, Blender and Code agents default to Qwen3.5-35B-A3B-GGUF, and instructed them to download a 17 GB model before those agents would run. Under the model consolidation those agents fall back to Gemma-4-E4B-it-GGUF (~3 GB), so the setup steps, the --model defaults, the spec headers and the download-size guidance are all updated to match. The stale "over 17 GB / best on a Strix Halo" prerequisites in the Docker and Jira guides are corrected too, since leaving them next to a 3 GB model would misstate the hardware bar for those agents. Out of scope and left alone: Summarizer (Qwen3-4B-Instruct-2507), SD (SDXL-Turbo), the VLM (Qwen3-VL-4B-Instruct), eval baselines, docs/plans, tested-hardware statements, and examples that pin a model explicitly rather than state a default.
|
Closing — superseded. This docs-only change is being folded into the branch that carries the actual code consolidation (base agent default, per-profile context constants, hub agent manifests), so the docs land together with the behavior they describe rather than ahead of it. |
|
Verdict: Request changes — do not merge yet (which matches your own "Blocked" note on the PR). This swaps every doc reference for the Docker/Jira/Routing/Blender/Code agents from the 17 GB The safe path is the one you already outlined: land the 🔍 Technical details🔴 Docs would contradict runtime — every described default still resolves to 35BConfirmed against the checked-out PR head, not just the description:
The spec-doc changes are the sharpest problem: 🟡
|
… size (amd#2284) Switching agents used to evict and cold-reload the model. Agents that left `model_id` unset fell back to `Qwen3.5-35B-A3B-GGUF` while chat and email used `Gemma-4-E4B-it-GGUF`, so moving between them forced a full unload/reload — **7.9s measured** on a warm Lemonade. Every agent now shares one model id and one context window per device profile, so the resident model is reused: **three consecutive agent switches cost 0.00s each with the llama-server pid unchanged**. > [!IMPORTANT] > **Depends on amd#2283, and the eval gate is not green yet.** The eval workflow now lives in amd#2283 (this branch previously added the same path — that copy was dropped to avoid a hard conflict). **amd#2283 must merge first**, then dispatch `Agent Eval — Gemma-4-E4B consolidation` against this branch as the merge gate. CLAUDE.md requires that run for LLM-affecting changes. Partial results so far: `budget_query` **baseline 9.95 → 9.90** (flat). No full category has completed. ### What was checked empirically, not assumed `max_loaded_models` was going to be added to keep the LLM and embedder co-resident. Measuring `/api/v1/health` on Lemonade 10.10.0 showed it is unnecessary: ``` "max_models": {"llm": 1, "embedding": 1, "reranking": 1, ...} <- PER TYPE "pinned_models": {"llm": 0, "embedding": 0, ...} ``` Capacity is accounted per model *type*, so an LLM and an embedder are already co-resident at default config; setting the knob to 2 would license a second *LLM*, not the pair. Forcing an LLM swap confirmed it — the LLM pid turned over while the embedder held the same pid throughout. **So the knob was not added**, and the behaviour is pinned by tests instead. Related: Lemonade runs one `llama-server` subprocess per model on its own port (8001/8002 observed), so there is no single global "slot" to raise. ### Notes for review - **A flat `rag_quality` will not mean "no impact."** Most of its scenarios run the `doc` agent, which comes from `hub/agents/python/chat` and was *already* on Gemma. The scenarios that actually exercise this change are `csv_analysis` (the `data`/Analyst agent, previously Qwen 35B) and the `tool_selection` set. Regressions there are the accepted 35B→4B tradeoff. - **Context is per device profile, not one global number.** `GPU_CTX_SIZE` (65536) and `NPU_CTX_SIZE` (32768) — the NPU's FLM build cannot load above 32768, so collapsing them would either break NPU or cap GPU doc-Q&A at 32K and reopen amd#1030. Measured no latency cost from the larger window: median 1.4s @65536 vs 1.5s @32768 on an identical 1631-token prompt. - **The amd#1744 NPU backend-matching is preserved** — the NPU device config keeps `embed-gemma-300m-FLM` so chat and embeddings stay on the same backend. - **Out of scope, unchanged:** Summarizer's `Qwen3-4B-Instruct-2507-GGUF`, SD's `SDXL-Turbo`, voice models, `Qwen3-VL-4B`. The two legacy Qwen entries in the `MODELS` registry stay so existing pinned sessions keep resolving. ### Two findings from the first runner execution Worth carrying into amd#2283, since they are properties of the eval, not of one workflow file: 1. **The eval needs the `chat` and `analyst` hub agents installed.** Scenarios select their agent via `agent_type` — 15 request `doc`, one requests `data`. `doc`/`chat`/`file` come from the **chat** package's entry points, *not* from `docqa` (which registers as `docqa` and no scenario requests). Without them every scenario fails to resolve an agent and the run reports a catastrophic regression that never happened. A pre-flight assertion that `doc` and `data` are registered turns that into a 60-second loud failure. 2. **Windows PowerShell 5.1 chokes on non-ASCII in inline `run:` blocks** — em dashes produced `The string is missing the terminator`. Keep inline PowerShell ASCII-only. ### Follow-up (not in this PR) - amd#2279's branch held a further docs pass — measured download sizes (Gemma is **5.56 GB**: 4.64 GB weights + 0.92 GB vision projector; `nomic-embed` 0.48 GB), correcting stale `~3 GB`/`18.6 GB`/`25 GB` claims across the EMR guide, profile tables and hardware-advisor playbook. That PR is now closed, so **this work is stranded on a closed branch and should be re-landed.** - **`device.py`'s `_MIN_GPU_VRAM_GB = 24.0`** is deliberately untouched. Its rationale — "24 GB to fit Qwen3.5-35B (~17 GB)" — is now obsolete: Gemma-4-E4B measures 5.56 GB, and `LITE_MIN_MEMORY_GB = 5.0` is precedent for a lower bar. Lowering it changes the hardware support matrix, which is a product call rather than a side effect of a model swap. ## Test plan - [ ] Merge amd#2283 first, then dispatch its `Agent Eval — Gemma-4-E4B consolidation` workflow against this branch. **This is the merge gate.** - [ ] In that run, confirm the log shows `doc` and `data` registered before any scenario executes. - [ ] Review the per-category diff, focusing on `csv_analysis` and `tool_selection` for the expected 35B→4B regression; decide whether to refresh baselines with `--save-baseline` and re-dispatch with `enforce: true`. - [ ] `python -m pytest tests/unit/ -q` — 6786 passed post-rebase; 5 failures are pre-existing on a clean `main` (`test_file_write_guardrails`, 3x `test_init_command`, `test_memory_router`). - [ ] `python util/lint.py --all` — passes. - [ ] On a machine with Lemonade: `python -m pytest tests/integration/test_lemonade_model_residency.py -v` — 4 passed against live Lemonade 10.10.0.
Docs currently tell users the Docker, Jira, Routing, Blender and Code agents run on
Qwen3.5-35B-A3B-GGUF, and walk them through downloading a 17 GB model — on Jira, with a note that it's "best run on a Strix Halo (or similar high-memory) device" — before those agents will work. Under the model consolidation those agents fall back toGemma-4-E4B-it-GGUFat ~3 GB, which drops that prerequisite entirely. This updates the setup steps,--modeldefaults, spec headers and download-size guidance so a user following the guides installs the model the agent actually loads.The code change these docs describe has not landed.
src/gaia/agents/base/agent.py:516is stillmodel_id or "Qwen3.5-35B-A3B-GGUF", and 28 non-test files acrosssrc/andhub/still hardcode the 35B model. I could not find a PR or issue for the consolidation.Also worth a maintainer's eye: #1810 ("correct stale default-model comment (Gemma → Qwen3.5-35B-A3B)", merged 2026-06-22) deliberately moved this the other way, and
lemonade_client.py:116still carries# Do NOT change this to 35B — it would break CI tests and force large downloads in minimal setups. So the current Qwen default appears load-bearing and recently reaffirmed, not drift.Merging this before the code change would make the docs contradict both the runtime and #1810. Draft until the consolidation lands; it should probably go in as part of that PR rather than ahead of it.
Test plan
src//hub/default change first, then rebase thisgaia docker "containerize this app"— loads Gemma-4-E4B, no 35B download promptgaia jira "show my open issues"— sameAGENT_ROUTING_MODELunset → routing uses Gemma-4-E4BKnown-remaining (deliberately not in this PR)
docs/guides/docker.mdx:35,150still recommend--ctx-size 8192and call it "required". Against Gemma-4-E4B'smin_ctx_size=65536that reads as wrong, but fixing it means picking a value across ~10 sites (Code and Routing guides say32768) — wanted a decision before sweeping it.docs/sdk/sdks/agent-ui.mdx:1247,1388document the sessions-table default as the 35B model; source isSESSION_DEFAULT_MODEL = "Gemma-4-E4B-it-GGUF". Wrong today, independent of this change.docs/spec/rag-sdk.mdx:43mirrorsRAGConfig.model, still Qwen in source. Needs updating only if the consolidation also flips that default.