From Cloud to Edge: On-Device Inference and the Power Budget

An 18 W budget, a thermal wall at ninety seconds, and the runtime changes that turned a throttling board into a steady one.

Language versions [EN] [中文]
Cite

The first version of edge-agent-runtime worked perfectly for ninety seconds and then quietly got slower. This entry is about finding out why, and about the three changes that fixed it.

The measurement that mattered

Not average tokens per second. The metric was tokens per second sampled every five seconds over a ten-minute run. The average looked fine; the trace showed a monotonic decline starting around 90 s and flattening at roughly 45 percent of the initial rate.

That shape is thermal, not algorithmic.

Where an 18 W budget actually goes

On the E1 board, a single board with an NPU and 8 GB of LPDDR5:

ComponentIdleInferenceNotes
SoC compute + NPU2.1 W8.4 Wscales with batch, not with seq length
DRAM0.4 W3.9 Wdominated by weight streaming
Board + regulator loss0.8 W2.1 W~12 percent at load
Thermal headroom-3.6 Wthe part that disappears

The interesting row is DRAM. Weight streaming from memory was costing more than the arithmetic, which is why quantising to INT8 helped far more than expected.

Change one: stop reallocating

The first runtime allocated per token. On this board that alone accounted for about 11 percent of the budget and a large share of the jitter.

// A single arena for the whole generation, reused across steps.
using var arena = MemoryArena.Rent(_plan.WorkingSetBytes);
var state = _session.CreateState(arena);

for (var step = 0; step < maxTokens; step++)
{
    _session.Advance(state, token => emit(token));
}

No allocations on the hot path means no GC pauses and a flatter power trace.

Change two: quantise for the memory bus, not for the FLOPs

INT8 weights cut DRAM traffic roughly fourfold. The accuracy cost, measured on the parity corpus from the dual-track entry, was a mean absolute logit difference of 0.004 with no input above 0.03. That was acceptable for the decision being made, and I only know that because the corpus existed.

Change three: give the scheduler a duty cycle

The NPU can burst above its sustained budget, and sustained bursting is exactly what hits the thermal wall. The scheduler now targets a duty cycle and lets throughput be whatever that produces, rather than chasing peak.

Result: a flat 10-minute trace at a lower peak rate. The average is lower and it is honest, which is a better property for a device that has to run for an hour.

The generalisation

On a cloud GPU, memory bandwidth is a line item. On a board with a power budget, it is often the whole story. Every optimisation that reduced instruction count and left memory traffic unchanged did approximately nothing.

Related reading

Video//1 min read

Spending an 18 W Budget: Quantising a Model for a Single Board

Live measurement of where the power goes on the E1 board, and the runtime changes that turned a throttling run into a flat one.

Reading note//7 min read

Reading Attention Is All You Need from a Financial Perspective

Notes from a second reading: what the attention mechanism actually computes, and which part of it transfers to a market with no sequence in the usual sense.

Writing//11 min read

Python Fine-tuning with C# Inference: A Dual-Track Pipeline

Fine-tune where the ecosystem is, serve where the process already runs, and put a diff between the two so they cannot silently drift.

Patent//3 min read

Handwritten Mathematical Formula Trajectory Recognition via Dual-Model Collaboration and Local Adaptive Learning

A filed disclosure on recognising handwritten mathematical formula trajectories through dual-model collaboration and local adaptive learning, arising from an AI maths-tutoring platform.

Cite this entry

Copy the block you need.

BibTeX
@misc{huang2026fromcloudtoedgeond,
  author  = {Mr Huang},
  title   = {From Cloud to Edge: On-Device Inference and the Power Budget},
  year    = {2026},
  url     = {https://selfevo.dev/en/blog/tech/from-cloud-to-edge-inference},
  note    = {selfevo, blog}
}
RIS
TY  - GEN
AU  - Mr Huang
TI  - From Cloud to Edge: On-Device Inference and the Power Budget
PY  - 2026
UR  - https://selfevo.dev/en/blog/tech/from-cloud-to-edge-inference
PB  - selfevo
ER  - 
APA
Mr Huang (2026). From Cloud to Edge: On-Device Inference and the Power Budget. selfevo. https://selfevo.dev/en/blog/tech/from-cloud-to-edge-inference