Gemma-4-MoE-Agent-26B
gemma-4-E2B-it post-trained to emit one machine-readable tool call per turn
against a fixed surface of ten simulated tools. It answers with an action
object, the runtime parses it, and the tool result is fed back as an
observation.
This is a research artifact for a single harness. It is not a general chat model and it should not be used where an unparsed reply would be acted on.
What is in the repository
The publish manifest is missing, so the file table is omitted.
Training
- base model:
google/gemma-4-E2B-it - method: bf16 LoRA on the named base: the routed experts are fused tensors that bitsandbytes cannot replace, so 45.68 GB of the 51.61 GB checkpoint stays in bfloat16 and nothing is quantised
- weights: bfloat16, unquantised (25.81B frozen, bfloat16 compute)
- adapter on:
(?:.*\.)?language_model\.layers\.\d+\.(self_attn\.(q|k|v|o)_proj|mlp\.(gate|up|down)_proj)$ - data: 11,213 supervised records
- sequence length: 1024, effective batch 16
- epochs 1.0, learning rate 8e-05, 701 steps
- final loss 0.6747
- LoRA r=16, alpha=32, dropout=0.05
- hardware: NVIDIA A100-SXM4-80GB, 1.7 h
The chat template is applied with enable_thinking=False. This release's card carries no token-length record, so the loss cannot be checked against the completion length from it; the recipe masks the prompt explicitly rather than relying on the data shape.
Every routed expert is frozen. The 128 experts of each block are stored as two fused three-dimensional tensors, not as one module per expert, so there is no linear layer for an adapter to attach to and no linear layer for a quantiser to replace. That is why the weights above are bfloat16: the experts are 45.68 GB of the 51.61 GB checkpoint and they arrive in bfloat16 whatever the loader is asked for, so a 4-bit label would have described 5.9 GB and hidden the 45.68. The pass adapts attention and the dense block, and leaves routing and the expert weights alone, because changing which experts fire is a different experiment from teaching an output format.
Evaluation
Measured with tools-pair-builder: every call is answered by a simulated
observation, so no command ran and the score cannot depend on what the model did.
| metric | value |
|---|---|
| pairs / rounds | 13 / 16 |
| round accuracy | 0.375 (6/16) |
| pair success | 0.385 |
| calls parsed | 1.000 |
| failures owned by the model | 10 |
| failures owned by the application | 0 |
| mean latency | 498 ms |
Failure labels: wrong_tool 5, wrong_value 4, call_when_finish_expected 1.
Lowest scoring capabilities:
| capability | rounds | accuracy |
|---|---|---|
| append_file | 1 | 0.000 |
| make_directory | 1 | 0.000 |
| search_files | 1 | 0.000 |
| run_command | 1 | 0.000 |
The parse rate is 1.000, so every failure is a wrong tool or a wrong value rather than an unreadable reply. That is what makes the repair set worth training: the protocol already works and the semantics are what is missing.
Training log
training-log.json in this repository is the chronological record: every
training, dataset, evaluation and publish event with its loss curve, round
accuracy and per-capability results. It is written by tools/posttrain/timeline.py
from the run records, not typed by hand, and the same file feeds the notes app.
How to run it
With llama.cpp and the smallest quant this release carries:
llama-server -m gguf/model.gguf --port 8080 --ctx-size 4096
The model expects the system prompt the harness sends: the offered tools as a
menu, then the instruction to reply with exactly one JSON object such as
{"action": "tool", "tool": "read_file", "args": {"path": "notes.txt"}}.
tools-pair-builder in the source repository builds that prompt and measures the
reply without executing anything.
Limitations
- Trained on one tool surface. A tool that is not in the menu is not in the model.
- Supervised fine-tuning only. No preference stage was run, and the measured failures are wrong-tool and wrong-value choices on tools whose descriptions look alike, which is exactly the failure a preference stage addresses.
- English only, short tasks, one call per turn.
- Observations during training were fixtures. The model never saw a real shell output, so it can be confidently wrong about what a command returned.
- Quantized files are lossy relative to
merged-bf16; evaluate the quant you intend to deploy, not the one that looks best in this table.
License
The base model is Google Gemma and this derivative carries the Gemma Terms of Use. Review them before redistribution or commercial deployment.
Card rendered 2026-11-02 from the records in
the source repository: training_record.json, publish_manifest.json and the
benchmark run directory. Numbers in this card are copied from those files, not
restated from memory.