Model Request: Gemma 4 26B-A4B-it (MoE, vision)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 152
- Avg merge
- 4h 14m
- Merged PRs (30d)
- 11
Description
Model
google/gemma-4-26B-A4B-it — Apache 2.0
Rationale
FLM already supports GPT-OSS 20B (A3B), proving the MoE dispatch pipeline works on XDNA2. Gemma 4 26B-A4B is a natural next target — it's in the same weight class but adds vision:
| GPT-OSS 20B | Gemma 4 26B-A4B | |
|---|---|---|
| Total params | ~21B | 25.2B |
| Active params | 3.6B | 3.8B |
| Experts (active/total) | 4/32 | 8/128 (+1 shared) |
| Layers | 24 | 30 |
| Modalities | Text | Text + Image |
| Vision encoder | — | ~550M params |
| Context | 8K | 256K |
| License | Apache 2.0 | Apache 2.0 |
The active parameter count (3.8B) is only ~5% larger than GPT-OSS (3.6B), so decode throughput should be comparable — potentially ~17+ t/s based on the GPT-OSS 18.2 t/s baseline (measured on Strix Halo XDNA2 NPU, FLM v0.9.32).
Why this model specifically
- MoE infrastructure already exists — FLM's
expert.xclbin+ CPU router + three-tier expert dispatch (_npu_large_expert_task/_npu_short_expert_task/_cpu_expert_task) should generalize to Gemma 4's architecture with dimension adjustments. - Vision on NPU — Gemma 4 adds image understanding (variable-resolution, OCR, document parsing, charts). FLM already supports Qwen3.5 VL 4B, so the vision pipeline has precedent. A 26B-class vision model on NPU would be a significant capability.
- Strongest open MoE at this size — It significantly outperforms Gemma 3 27B dense on every benchmark.
- Thinking mode — Built-in reasoning/chain-of-thought via
enable_thinking=True, useful for coding and agentic workflows. - Apache 2.0 — No license friction.
Architecture details
- Hybrid attention: interleaved sliding window (1024 tokens) + full global attention
- Sliding window on local layers, global layers use unified KV + Proportional RoPE
- Expert FFN dimensions would need new xclbin tile configs (hidden_size=3072, intermediate unknown but derivable from config)
- 262K vocabulary
Key difference from GPT-OSS
The main new challenge is the higher expert count (128 total vs 32) and the vision encoder (~550M params). The expert routing still selects a fixed top-k per token, so the dispatch pattern is the same — just more expert weight blocks to index into. The vision encoder would need its own processing path (similar to how Qwen3.5-VL is handled).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing expert.xclbin path and the three dispatch entry points (_npu_large_expert_task, _npu_short_expert_task, and _cpu_expert_task), then compare the existing GPT-OSS and Qwen3.5-VL support. Done means Gemma 4 text and vision requests run on XDNA2 with appropriate expert configuration and validated performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- ai, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100