Eigen RadarAI
Analysis

llama.cpp gives Adreno 850 a new way to run compressed models

llama.cpp, open-source software for running language models, has added a way for Qualcomm’s Adreno 850 graphics processor to share the work of certain calculations across groups of its processing units. The preview covers six formats for storing model weights with fewer bits. It changes how the software handles some operations on that chip, including those that process several units of text at once.

Artificial Intelligence··Evening
Wide establishing view of a bright hardware testing laboratory where mobile graphics processor development boards with copper heatsinks sit wired to coaxial leads and logic-analyzer pods.

Groups of processing units share a calculation

The open-source language-model software llama.cpp uses an extension to OpenCL, a way for programs to send work to a graphics processor, to give groups of units on Qualcomm’s Adreno 850 parts of a matrix multiplication. The project’s release notes are the only published account of the update. They list the new calculation in the November 22 preview. The same chip previously ran other language-model operations through OpenCL.[1]

The preview handles six weight formats

The new method supports formats that store the weights, or values a model learned during training, at four, five, six or eight bits. There are six supported formats across those sizes. When a layer carries out the multiplication, the engine prepares the values going into that layer in 16-bit blocks. The way it stores the weights and the way it arranges the values arriving for that calculation can differ.[1]

The size of the input determines which method runs

The project uses the new calculation on Adreno 850 only when the program is built with Adreno support. It needs at least two input columns and requires one dimension of the output matrix to be a multiple of 64. Some weight formats have additional limits. Single-column input and matrices that fall outside the limits still go through llama.cpp’s existing methods.[1]

References

  1. News sourcellama.cppllama.cpp adds a new Adreno 850 compute path for six weight formats↩1↩2↩3