N11: From Dense Qwen2.5 to Modern Gemma 4—
An FPGA NPU Re‑Architected in 52 Hours
Melten’s design-agent system built a 200 MHz FPGA accelerator for Gemma 4 26B-A4B in 51.6 hours. On the XUP-P3R board, it routes eight of 128 experts per token, supports 32K context, and matched the reference in 11,226 out of 11,226 output checks. The current demo sustains 45.37 GB/s and reaches 10.08 tok/s.
- Qwen2.5 2024Gemma 4 2026
- N11 was developed to support a much more complex modern architecture—moving beyond N10’s fixed dense design to on-device mixture-of-experts inference.
- 52 hours
- Campaign start to independent closure of all seven outcomes
- 26B MoE
- Gemma 4 26B-A4B, with expert routing on the device
- 32K
- Tokens of context reached on the board with exact outputs
- 10.08 tok/s
- Current demo’s batch-1 decode rate at 128-token context
- 45.37 GB/s
- Current demo’s sustained memory bandwidth on the board
- 11,226
- Hardware outputs matched the fixed-point reference, with no mismatches

Gemma 4 changed the problem,
not just the model size.
N10 accelerated dense Qwen2.5 through one fixed layer topology. N11 makes a routing decision for every token, combines two attention regimes, carries 16× the verified context, and addresses 68% more vocabulary rows—on the same FPGA at the same clock.
| Dimension | N11 · Gemma 4 challenge | N10 · Dense Qwen2.5 baseline | Hardware response |
|---|---|---|---|
| Token execution | Dynamic routing: select eight of 128 experts for every token, with clean failure on an invalid index. | Every token follows the same dense layer topology; no expert selection is required. | On-device router, top-k unit, and selected expert-weight fetch. |
| Attention and context | Mixed attention: 25 sliding-window and five global layers, 256- and 512-wide heads, and 32,768 positions. | Dense Qwen2.5 baseline verified through 2,048 context positions. | New attention unit, two KV fetch paths, and cache striped across two DDR channels. |
| Numerics and output | New model operations: GELU-tanh, per-head RMSNorm, group-64 INT8 weights, and a 262,144-entry vocabulary. | Dense-model vector path and 155,648 vocabulary rows. | New vector functions and a larger output stage with on-device ARGMAX and token feedback. |
| System and memory | More state and irregular access: a 26.9 GB image, token-dependent expert traffic, and multi-turn conversation reuse. | An 8.5 GB image loaded in 145 seconds. | XDMA loading, four matrix engines in SLR2, attention in SLR0, and changed-prefix reuse; closed at 200 MHz. |
N11 vs. N10 on the same XUP-P3R board at 200 MHz
Read the N10 engineering note- Model class
- N10 · 7B denseN11 · 26B MoE
- Verified context
- N10 · 2KN11 · 32K
- Decode near 1K
- N10 · 4.18 tok/sN11 demo · 9.24 tok/s
- Model load
- N10 · 8.5 GB in 145 sN11 · 26.9 GB in ~11 s
The accepted core added 6% more LUTs while using 12% fewer DSPs and 24% fewer block-RAM tiles. Full comparisons appear in the engineering details below.
42× effective throughput, without accepting a failing path.
The agents qualified both a rebuilt DMA engine and AMD XDMA on the board. The rebuilt engine was fast but failed a deliberate fault test, so it was rejected. The accepted XDMA path loads 26.9 GB in about 11 seconds, versus N10’s 8.5 GB in 145 seconds.
29% more
memory bandwidth.
Batch-1 greedy decoding on the current demo configuration. Each result is measured on the XUP-P3R board.
| Context | Current decode |
|---|---|
| 128 tokens | 10.08 tok/s |
| 1,024 tokens | 9.24 tok/s |
| 4,096 tokens | 8.94 tok/s |
The latest tuning raised sustained bandwidth to 45.37 GB/s—about 7% over the prior demo and 29% over the original N11 image. The memory-controller simulation predicted 45.3 GB/s before the build. These fully bit-exact results characterize the current demo configuration; N11’s accepted configuration remains unchanged.
A revised placement closed the full design at 200 MHz.
Two builds missed timing. The agents traced the roughly 4 ns miss to logic pinned to the wrong FPGA die, which forced signals across the package twice. They revised the physical plan, rebuilt, and the third build had no failing paths.
Every verified hardware output matched.
Three independent evidence sets covered frozen corpus positions, generation through 32K context, and multi-turn chat.
- Frozen quality-corpus positions
- 8,000 / 8,000
- Four generation runs through 32K
- 260 / 260
- Three multi-turn chat sessions
- 2,966 / 2,966
Implementation exactness. These checks show that the FPGA computes the intended fixed-point design.
Model quality. Separately, the INT8 model preserved 97.2% of the original BF16 model’s next-token choices, with perplexity within 0.45%.
Fifteen new hardware modules,
accepted in 52 hours.
The design agents handled architecture, RTL, verification, FPGA builds, bring-up, diagnosis, and evidence assembly.
Targets before results.
Quality bounds were frozen before reference results, and the board protocol before the first real-weight run. Acceptance followed those targets.
A portable reference.
The fixed-point model is bit-exact across three CPU types and the FPGA board, so reference and evidence work can run on heterogeneous cloud hosts.
- Hour 0Campaign startedPlan review converged in 1.5 hours; the first new unit matched the reference by hour 9.
- Hour 30Quality gate passedINT8 weights on every matrix agreed with the original model on 97.2% of next-token choices.
- Hour 33First N11 image met timingThe third full build closed at 200 MHz.
- Hour 43Gemma 4 ran on the boardAll four protocol runs matched on the first attempt, up to 32K context.
- Hour 52All seven outcomes closedThree multi-turn chats matched token for token; independent review accepted the final evidence.
Human direction stayed where it mattered.
The project owner chose the model, set quality and context targets, approved the measurement protocol and loader decision rule, and authorized lab access. The agent system executed the design and qualification work.
Engineering details.
Full specifications, verification scope, and N10-to-N11 comparison data remain available without interrupting the main story.
Open full specifications and comparison data
N11 system specification
- Model
- Gemma 4 26B-A4B: 30 layers—25 sliding-window (1,024 tokens) and five global—with 128 experts, eight routed per token, and a 262,144-entry vocabulary.
- Hardware
- BittWare XUP-P3R with an AMD Virtex UltraScale+ VU9P; attention in SLR0 and the core plus four matrix engines in SLR2, timing-closed at 200 MHz.
- Implementation
- 36.8% of LUTs, 20.9% of registers, 24.4% of DSPs, 23.0% of BRAM, and 19.2% of URAM.
- Memory
- Four DDR4 channels at 45.37 GB/s sustained reads; KV cache striped across two channels and two fetch paths, up to 32,768 positions.
- Memory traffic
- Expert weights account for 3.94 GB per token. The attention cache adds 0.03 GB at 128-token context and 0.88 GB at 32K.
- Numerics
- Group-64 INT8 weights, 16-bit integer activations, GELU-tanh, and per-head RMSNorm.
- Host and chat
- PCIe with AMD XDMA; a 26.9 GB image loads in about 11 seconds. Chat resumes from the first changed token.
Verification scope
- Quality corpus
- 20 frozen sequences totaling 196,608 tokens, up to 32K context; 8,000 of 8,000 scored positions matched.
- Generation
- Four protocol runs ending at 128, 1K, 4K, and 32K; 260 of 260 outputs matched.
- Interactive chat
- Three sessions and seven turns, up to 31,495 tokens with memory reuse; 2,966 of 2,966 outputs matched.
Each comparison checked the generated token and a digest of all output scores. Every comparison on the current demo configuration matched.
Full N10 → N11 comparison
| Measure | N10 | N11 |
|---|---|---|
| Model | Qwen2.5 0.5B, 1.5B, and 7B dense | Gemma 4 26B-A4B MoE |
| Longest verified context | 2,048 tokens | 32,768 tokens |
| Decode near 1K | 4.18 tok/s on 7B | 9.24 tok/s on 26B MoE |
| Model image load | 8.5 GB in 145 s | 26.9 GB in about 11 s |
| Board and clock | XUP-P3R, 200 MHz | XUP-P3R, 200 MHz |
Decode rates are batch-1 greedy runs near 1K context on N10’s published implementation and N11’s current demo configuration.
Comparable accepted sub-block resources
| Resource | N10 | N11 | Change |
|---|---|---|---|
| Core LUTs | 211,666 | 223,813 | +6% |
| Core flip-flops | 162,140 | 199,052 | +23% |
| DSPs | 1,890 | 1,655 | −12% |
| Block-RAM tiles | 450 | 341.5 | −24% |
| UltraRAM | 165 | 184 | +12% |
| Vocabulary rows | 155,648 | 262,144 | +68% |
| Attention-unit LUTs | 83,885 | 96,010 | +14% |
Percent changes are rounded. Model weights reside in board memory, so parameter count does not translate directly into FPGA logic growth.