CPU, GPU AND RAM

P3-LLM: hybrid formats and the limits of NPU–PIM speedups

In this article
THE QUICK TAKE

The public quantization code and modeled architecture are distinct artifacts; their joint speedups are specific to batch, model and baseline.

Quantization designed together with a memory accelerator

P3-LLM combines a neural processing unit with processing-in-memory hardware for edge language-model inference. Its contribution is a joint design: different numerical formats for different operands, a low-precision memory-side compute unit, and fused operations that reduce conversion overhead. It is an evaluated architecture proposal, rather than a released accelerator that can be added to an existing laptop.

The authors’ repository exposes the quantization implementation. It describes W4A8KV4 processing, with FP8-E4M3 for queries and a custom unsigned FP8-E4M4 representation for attention scores. A public software implementation makes those numerical choices inspectable; it does not demonstrate that the proposed memory hardware has been manufactured or independently benchmarked.

Where the different formats matter

Weights and stored key/value state are major memory consumers, but intermediate activations and attention scores have different distributions. Applying the same small integer format everywhere can discard information that matters differently at each stage. P3-LLM therefore treats format selection as part of the computation, rather than treating every four-bit artifact as equivalent.

The paper also distinguishes key-cache quantization before and after rotary position encoding. That choice changes which operations can move into the memory-side unit. Consequently, a statement that attention is offloaded needs the model family’s actual computation path beside it. A format that preserves accuracy in software is only part of the requirement: the selected hardware must execute it without spending the saved time on conversions.

The hardware result comes from modeling

The authors synthesize the compute-unit design using a 28nm process, scale estimates to a 20nm memory technology and evaluate a cycle-level system simulator. The modeled system has four NPU cores and sixteen pseudo-HBM channels. This provides more detail than an abstract-only speed claim, but remains different from measurements on fabricated production silicon.

Reported average speedups are 4.9× against HBM-PIM, 2.0× against Ecco and 3.4× against the enhanced Pimba comparison. They refer to specified baselines with different precision and dataflows. They are not multipliers for an arbitrary consumer NPU, GPU or installed memory module. Moving a proposed unit into another system could change communication, scheduling and implementation costs.

Batch size changes which resource dominates

The main decoding comparison varies batch size from 1 to 8. The paper explains that larger batches improve weight reuse on the NPU, while the original memory-side matrix-vector path repeats more work. P3-LLM’s unit can reuse a memory access for two inputs, and its largest relative advantage occurs at batch size 2.

The context sensitivity is also conditional. Longer contexts increase attention-state work, but one model’s placement of key-cache quantization limits offloading and changes its trend. Thus low-batch edge inference and larger-batch serving should remain separate operating cases. A single average hides precisely the workload boundary this architecture targets.

Quality and implementability remain separate checks

The authors evaluate language-model perplexity and reasoning tasks, not just arithmetic throughput. Their ablations still show a tradeoff against the unquantized reference: Llama-2-7B perplexity changes from 5.47 to 5.65 in the final illustrated path. Better quality than another low-precision method does not mean lossless equivalence to the original model.

The memory-bandwidth guide supplies background on access constraints, while VRAM budgeting explains the combined weight and request-state footprint. For this proposal, retain the numerical formats, model path, batch and hardware model together. That is the evidence needed to assess the architectural idea without turning a simulator result into a deployment promise.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles