Spiking Timestral-28M on a small FPGA

98%
of Timestral-28M’s fev-bench skill kept
1.29×
faster on the same 66 MHz chip design
414 / 414
series bit-exact on the real board
~19×
less energy per forecast than a GPU (est.)

The core idea

On a small chip, the expensive part of running a neural network is not the arithmetic. It is fetching the weights. In 45 nm silicon, reading one 32-bit word from DRAM costs about 640 pJ; an 8-bit multiply costs about 0.2 pJ. A forecaster that reads every weight on every update spends almost all its energy moving data.

So we make neurons that usually have nothing to say. A neuron that is silent (exactly zero), or whose input has not changed enough since the last update, sends nothing. Its weights are never read and never multiplied. The rest send only their change, as a single event.

The network stays the same Timestral-28M transformer. Only how its neurons talk changes. Per streamed update, it reads 46.1 M weights instead of 75.6 M (61%), with about 60% of neurons sending.

A charge neuron in action

Each layer input is a charge neuron: it accumulates small changes quietly and sends a message only when its input has changed enough to cross a threshold. Silent neurons cost nothing—their weights are never read from DDR3 and never multiplied.

One charge neuron over 12 updates: sends 3 times, silent 9 times
threshold 1 2 3 4 send 5 6 7 8 send 9 10 11 12 send update → charge
Configuration (per update, 414 M4-hourly series)Active MLP neuronsNeurons sendingWeight readsEnergy (45 nm est.)
Dense 8-bit Timestral-28M100%100%75.6 M (1.00×)12.2 mJ
Sparse MLP only~19%68%51.4 M (0.68×)8.4 mJ
Spiking Timestral (full)~19%60%46.1 M (0.61×)7.5 mJ (≈ −39%)

Energy here is an estimate from per-operation costs (Horowitz, ISSCC 2014), with weights read from DRAM. It ignores static power, control logic and burst efficiency, and assumes one series streamed at a time.

How the model works

Four changes turn the stock model into a spiking one. Only the first two involve training; the number formats need none.

Timestral-28Mdense SwiGLU, floatthe starting point1 · Sparse MLPgated ReLU81% silent2 · Charging neuronson every projection~10% fewer reads3 · 10-bit / 8-bitvalues / weightsno training4 · Graded eventsone per neuron0 mismatchesTang Primer 20K66 MHz, 128 MB DDR3414 / 414 exactTimestral-28Mdense SwiGLU, floatthe starting point1 · Sparse MLPgated ReLU81% silent2 · Charging neuronson every projection~10% fewer reads3 · 10-bit / 8-bitvalues / weightsno training4 · Graded eventsone per neuron0 mismatchesTang Primer 20K66 MHz, 128 MB DDR3414 / 414 exact
Step 1
Sparse MLP
81% silent
The original SwiGLU feed-forward layers are never exactly zero. We replace them with a gated ReLU with a learned threshold, gate · ReLU(up − τ), and distil from the original. About 81% of hidden units come out exactly zero, and their gate and output weight rows are skipped.
Step 2
Charging neurons
~10% fewer reads
Sending only changes above a threshold sounds easy, but plain delta coding drops small changes forever. On slow or repeating series that error compounds, up to 16× worse forecasts. A charging neuron keeps the unsent change as charge and fires when the total crosses its threshold, so the unsent error stays below one threshold.
Step 3
10-bit values, 8-bit weights
no training
Every layer input becomes a signed 10-bit integer with one step per channel, set at 4× the largest value seen on calibration windows so rare spikes in the data are not clipped. Weights become 8-bit integers per output row. Both are calibrated, not trained.
Step 4
Graded event spikes
0 mismatches
Each neuron sends at most one event per update, carrying its 10-bit change (a graded spike, as on Intel Loihi 2), instead of hundreds of 1-bit spikes. The receiver adds weight × change to a running total. Replaying the events reproduces the integer model exactly.

Where the spiking happens inside one update

Each update brings one new 32-point patch. Charge neurons sit in front of the Q·K·V projections, the attention output projection and the MLP input in all 12 layers. Attention itself, the patch embedding and the forecast head run in full and are counted at full cost.

One forecast update through the model
× 12 layers (each with norms and residual adds)new K, Vnew data32-point patchscalingmean, spread, asinhpatchembedding16-bit weightsQ · K · Vcharge neuronsattentionRoPE + softmaxoutputprojectioncharge neuronssparse MLPgated ReLU, ~31% rowshead +quantiles16-bit weights48-stepforecastquantilesK/V memorylast 32 patches, DDR3run on the series and on its mirror (−x), then averaged
spiking: works only on changealways on (counted at full cost)memory in DDR3

Click a block to see what it does.

Training

The conversion starts from Mistral’s released Timestral-28M weights and runs in five stages. The training data never includes fev-bench or development-set sources, and checkpoints are chosen on held-out panels (real, repeating, synthetic and Australian electricity-demand series), never on fev-bench.

StageWhat changesTrainedStarts fromTime
0. Data16,686 public series (40.2 M points), a Timestral-209M teacher cache, held-out panels—public datasets—
1. Sparse MLPSwiGLU → gated ReLU with learned τ, activity penaltyweights + τTimestral-28M12 h
2. Clean cyclessame objective, 25% of synthetic rows replaced by clean repeating seriesweights + τstage 15.3 h
3. 10-bit inputsper-channel input steps at 4× the calibration maximumnostage 2calibration
4. 8-bit weightsper-row weight codes, step chosen by grid searchnostage 3calibration
5. Charge thresholds57 per-site charge thresholds, all weights frozenthresholds onlystage 440 min

Data and loss

The corpus is 16,686 series from chronos_datasets: M4 daily, weekly and monthly, Uber taxi, wind farms, Mexico City bikes, London smart meters and Dominick’s sales. Half the batches come from a cache of Timestral-209M forecasts (10 shards × 4,096 windows, context 2,048, horizon 128). Contexts are 512, 1,024 or 2,048 points; horizons 32 to 128. A quarter of series are synthetic, a quarter regular, and a quarter of batches carry synthetic known-future inputs.

The loss is distillation plus a little truth: 0.7 × match the live Timestral-28M, 0.2 × match the cached Timestral-209M, 0.1 × pinball loss on the real future, each scaled by the series’ seasonal scale (0.9 / 0.1 when no 209M target exists).

Stage 1: making the MLP sparse

12 hours at batch 32, learning rate 3×10⁻⁵ for the inherited weights and 3×10⁻⁴ for the thresholds τ. The activation blends from SiLU to the thresholded ReLU over the first 300 minutes. An activity hinge penalty (target 20% active units, weight 2.0) switches on at 40% of the run and reaches full strength at 85%.

Stage 2: clean repeating series

A sparse model gets sloppy on long, smooth, repeating series. Stage 2 keeps the same loss but swaps a quarter of the synthetic rows for clean cycles: period-24 knot and pulse profiles, 0.5–7.5% noise, weekday factors on 30% of rows. A warmup-stable-decay schedule holds the learning rate flat until the held-out score stops improving for 90 minutes, then cools down for 20 (5.3 h in total). M4-hourly error drops from 1.090× to 1.058× the original (long series 1.143× → 1.086×); the same schedule without clean series stays at 1.090×.

Stages 3–4: integer formats, no training

10-bit input steps come from 4× the per-channel maximum over 64 corpus windows plus 96 synthetic known-input windows. 8-bit weight steps come from a grid search over 60 fractions (0.15–1.0) of each row’s maximum, minimising rounding error. With 4× headroom the 10-bit model differs from float by 0.08%. This is the model scored on fev-bench.

Stage 5: learned charge thresholds on frozen weights

Only 57 scalar thresholds train; every weight and quantiser step is frozen. Each training stream is 8 consecutive updates: 7 warm-up updates without gradients, then one scored update. The fire decision uses a straight-through gate σ((|d| − k)/0.5), with an event penalty 2.0 · max(0, R − 0.90) on the event rate R. Learning rate 10⁻³, 40-minute cosine schedule. The result: 41 sites fire at a threshold of 2 codes and 16 at 1 (mean ≈ 1.3). Training the weights together with the thresholds made the model worse (charge-off M4 ratio 1.070 → 1.094), so they stay frozen.

Training ran on NVIDIA H200 3g.71GB GPU slices and RTX 2080 Ti GPUs on a university cluster; one GPU with 24 GB or more is enough at batch 32. Full commands are in the training recipe.

Accuracy

On fev-bench, AutoGluon’s 100-task forecasting benchmark, the spiking model ranks 18th of 53 with a skill of 0.474. The original Timestral-28M ranks 12th at 0.484. That is 98% of its skill, ahead of the larger Chronos-2. The geometric-mean error ratio to the original is 1.019 (median task 1.009).

ModelParametersfev-bench skillRank (of 53)
timeh2o-v1108M0.5084th
Timestral-209M209M0.5045th
Timestral-28M (original)28M0.48412th
Spiking Timestral28M0.47418th
Chronos-2120M0.47319th
Timestral-5M5M0.46223rd
PatchTST—0.30143rd

Error relative to the original, by task type

1.025×
plain series (no covariates)
0.950×
past-only covariates (slightly better than the original)
1.038×
known-future covariates
1.067×
M4-hourly, 414 series streamed with charging neurons on

Error ratio to the original Timestral-28M; below 1 is better. On the 7-task development set the ratio is 1.034×. The all-integer model the board runs scores 1.069× on M4-hourly and 1.018× on the development set at the same 1,024-point context.

The charge threshold is the trade-off knob

A higher threshold means fewer events and fewer weight reads, but a coarser view of the data. With one fixed threshold everywhere, the error climbs fast: 1.069× at k = 1, 1.110× at k = 4, 1.239× at k = 8. Learning a threshold per site keeps the error flat for the same savings: 1.067× at 0.61× dense reads.

M4-hourly error ratio against weight reads per update for fixed and learned charge thresholds

M4-hourly error ratio to the original against weight reads per update. Grey: one fixed threshold k for every site. Blue: thresholds learned per site at three event-rate targets; the released model is R* = 0.90.

On the chip

The model was compiled with our snn2chip compiler (not released) onto a Sipeed Tang Primer 20K, a ~$30 FPGA board. The weights, the attention memory and all neuron state live in the board’s DDR3. A laptop sends each new 32-point patch over USB and reads back the 48-step forecast.

ItemValue
FPGAGowin GW2A-18: 20,736 logic cells, 46 block RAMs, 48 hardware multipliers
Memory128 MB DDR3 (x16) holding the weights, the K/V ring and all neuron state
Clocksengine 66 MHz (measured 65.9997 MHz); DDR3 controller 96.75 MHz; DDR3 I/O 387 MHz
Resources used75% of logic, 40 / 46 block RAMs, 47 / 48 multipliers; routed Fmax 70.65 MHz
Host linkUSB UART at 3 Mbaud
BuildGowin EDA

How exactness was checked

Each of the 414 M4-hourly series runs as one cold forecast and seven warm updates, each adding one new patch. After every update the board returns its raw forecast words, 8,064 bytes for both passes, and the host compares them byte for byte with the Python integer reference running the same schedule. One differing byte would count as a mismatch.

Result: 414 / 414 series and 3,312 / 3,312 forecasts exact on the first attempt, 26,707,968 bytes compared, 0 mismatched. A second, separately placed-and-routed image of the same design gave the same result. Chip time is the engine’s own cycle count divided by the measured clock.

Running on the real board. On the Tang Primer 20K at 66 MHz, all 414 series (3,312 forecasts) match the reference on the first attempt with 0 mismatched bytes—taking 363 ms on the chip and 397 ms including the USB link.

Original vs. spiking on the same chip design

We converted Timestral-28M into a spiking network and simulated both versions on the same 66 MHz chip design, apples to apples. Accuracy stays intact—98% of the original’s fev-bench skill (0.474 vs 0.484)—while the spiking version cuts multiply-adds, DDR3 traffic, and update time.

Multiply-adds
−34% 151.3 M Dense 100.6 M Spiking
DDR3 bytes read
−28% 180.3 MB Dense 129.5 MB Spiking
Chip time per update
1.29× faster 487.8 ms Dense 378.1 ms Spiking

Simulated per forecast update on the same 66 MHz chip design. "Dense" is the same network with every neuron sending every update, which is how the original model computes.

The cost follows the data

A charge neuron only speaks when its input has changed since the last patch of the same series. So the chip's work per update depends on how much the series actually moves: calm stretches cost little, jumpy ones cost more. The dense version pays the full price every single time.

dense: every neuron active, 488 ms on every update (simulated) median 363 ms 250 300 350 400 450 500 chip time per update (ms), measured on the board

All 2,898 warm updates of the 66 MHz board run (414 series), every one bit-exact. Median 363 ms; the calmest series averages 260 ms and the cheapest update took 254 ms.

Streaming one series: the board vs. a GPU and laptop CPU

A GPU or laptop CPU is much faster in raw latency, and a GPU wins easily when you can batch hundreds of series together. When watching one live series at a time, though, a desktop GPU still draws 72 W while this board runs on roughly 0.8 W—using about 19× less energy per forecast (estimated for the board).

Power while streaming one series
Tang Primer 20K, spiking (est.)≈ 0.8 W
RTX 2080 Ti GPU (measured)72 W
Energy per forecast
Tang Primer 20K, stream (est.)≈ 0.30 J
RTX 2080 Ti, batch 1 (measured)5.71 J
RTX 2080 Ti, batch 256 (measured)0.17 J
PlatformOne seriesBatched throughputPowerEnergy / forecast
Tang Primer 20K (spiking) 397 ms (363 ms chip) 1 stream at a time ≈ 0.8 W (est.) ≈ 0.30 J (est.)
RTX 2080 Ti GPU (original) 79 ms 1,394 forecasts/s (batch 256) 72 W (batch 1) 5.71 J (b1) · 0.17 J (b256)
Laptop CPU (original) 32 ms 196 forecasts/s (batch 256) not measured —

Board power and energy are estimated from the Gowin power report plus DDR3 datasheet; GPU power is measured. CPU and GPU run the original Timestral-28M.

Limitations

Code: Apache-2.0. Weights: a derivative of Mistral AI’s Timestral-28M, under Mistral AI’s Modified MIT License.