emufpga · detailed instrument

Engineering Lab

Read the experiment context ↓
The experiment in 60 seconds

Use the GPU we already own—even when the model is too large for it.

emufpga investigates whether immutable MoE expert weights can flow serially from cheap storage while a small or old GPU keeps attention, KV cache, and active state. CPU/System-RAM offload is a practicality comparison, not a speed target.

Current verdict: preliminary capacity success; coding reliability not yet measured.
1 · WHAT IS THIS?

A serial expert-supply experiment

Route requests first, fetch only the experts they need, and reuse each fetched expert across concurrent requests. CPU, GPU, FPGA, storage, and control hardware can each do the work they suit.

2 · WHAT DO WE MEASURE?

Capacity, correct work, and service rate

Can an oversized model run? For 1/2/4/8 independent agents: correct tasks/hour, tokens/s, TTFT and p95 latency, RAM/VRAM, bytes moved, watts, and tasks/kWh—compared with CPU/RAM offload.

3 · WHAT DO WE PREDICT?

A conditional capacity win

Serial staging should win when the model exceeds VRAM, selected experts avoid enough traffic, and batching reuses weights. It may lose when storage is slow, routes touch most experts, KV dominates, or transfer overhead exceeds saved compute.

Success: an oversized MoE that fails resident GPU allocation completes the same-quant correctness suite through bounded serial expert processing. Speed, latency, concurrency, and energy describe usability; they do not define capacity success. See the decision rule.
Serial datapath animationPlayback controls
SERIAL-MoE ACCELERATOR • Q6_K • 32 EXPERTS / TOP-8 WEIGHT STREAMNVMe / DDR / PCIe210 Bper Q6_K block INPUT FIFObackpressure Q6_K DECODER210 → 1024 B256 f32 weightsone block resident MAC LANESselected experts only ACCUMULATOR BRAMy += w × xresident activationsweighted combine ROUTER ENABLE MASK CURRENT EVENTLayer 0 • Expert 0selectedrouted tokens: 1packed: 1,314,816 Blayer read/decode/computeMEASURED layer totals
This is the proposed programmed datapath. It emulates the serial-MoE accelerator we intend to synthesize—not a general FPGA floorplan.
Engineering case

Capacity saved; bandwidth spent

Conclusion: serial execution is a capacity strategy, not an automatic speedup. It wins when weights do not fit near compute and compression, batching, caching, or route-aware fetch keep transferred bytes useful.

Current claim

Oversized short generation: yes. Coding reliability: not measured.

Goal: reuse a small/old GPU to run a model it cannot hold. The bounded prototype passed 45/45 short tasks at 4.17 GiB VRAM; speed and energy describe usability, not success.

MEASURED
end-to-end smoke · bytes · RSS/VRAM · timing
SIMULATED
pipeline cycles
TO MEASURE
coding tasks · logits · physical IO · wall power
Success / failure scorecard →

Scenario laboratory DERIVED / PROJECTED—change assumptions

Fast-memory fitWeights + KV compared with the selected capacity budget.
Projected throughput ceilingMinimum of storage and arithmetic ceilings; not measured runtime.
Traffic usefulnessUses empirical Granite union data for matching B1–B6 scenarios; otherwise analytical.

Resident GPU

All 1.024 GiB of model data near compute, plus KV. Lowest fetch latency; highest scarce-memory demand.

DERIVED CAPACITY FLOOR—not allocator peak

Blind serial

Forward-only tape: 42.21 MB/layer at batch 1; 25.2% of expert bytes are useful.

MEASURED BYTES; host timing

Selected union

10.65 MB/layer at batch 1, but routes and expert-addressable fetching must come first.

MEASURED COMPARISON LAYOUT
Nearby memoryStreaming removes the fixed model-weight block; KV grows either way.

At short context, weights dominate. At long context, KV becomes the next capacity wall.

Observed expert unionMEASURED: five prompts × 24 layers. Cyan is observed; amber is the independent-routing formula.

Loading empirical routing distribution…

Repeated scalar throughputMEASURED: median of seven warm runs; whisker text shows min–max.

Loading repeated timing distribution…

Hardware-shaped block cyclesSIMULATED: 16 fetch B/cycle · 8 decode lanes · 16 MAC lanes.
fetch 14decode 32MAC 16
selected: 62 cycles · unselected: 46 cycles

Selection gates 16 MAC cycles, but every blind-stream block still pays fetch and decode. Cycles become seconds only after physical clock measurement.

Measured storage bandwidthSeven reads per case on this host. Bars show median; text shows p10–p90.
Loading storage distributions…

Direct I/O is a cache-bypass proxy, not a power-on cold read.

Observed asynchronous prefetchMEASURED: B1 expert phase, seven runs. Positive is faster; negative is regression.
Loading prefetch matrix…

Double buffering must earn its thread and queue overhead.

Show measured timing distribution
BatchAll-expert median (min–max) tok/sSelected-union median (min–max) tok/sSample

Warm Linux page cache, release scalar Rust, expert sweep only. Host throughput and hardware-shaped cycles are different experiments. Emission and cold-media time are excluded.

Resident GPU

+ Lowest latency, wide local bandwidth, mature kernels.

− Entire model consumes VRAM; weights compete with contexts.

Blind serial

+ Tiny residency, simplest controller, no expert seek.

− Wastes 75% of expert traffic for top-8-of-32 at batch 1.

Selected union

+ Avoids unused bytes and reuses experts across routed tokens.

− Indexed fetch or preprocessing; savings shrink as batches touch most experts.

Evidence, math, and limits

Capacity: resident floor = 1,099,212,096 model bytes + context × 49,152 F16 KV bytes. Serial substitutes a measured 132,306-byte input path for resident model bytes. Runtime workspaces and activations are additional.

Speed: time ≥ max(bytes ÷ bandwidth, operations ÷ compute rate). Physical FPGA seconds remain unknown until synthesis establishes clock and memory bandwidth.

Memory ledger · Benchmark method · Correctness evidence · HLS4ML analysis · Other streams

Proposed hardware experiments

Follow each byte, then measure the bottleneck