In this article
The b12386 Hexagon fix excludes padded no-mask attention tails; test real patch-count boundaries alongside aligned image inputs.
llama.cpp b12386 repairs a no-mask Flash Attention tail on Hexagon. The upstream reproducer involves image-patch counts whose final padded positions were not excluded correctly from softmax. This is a shape-sensitive numerical issue: an aligned input can appear correct while a nearby patch count exposes the tail.
No mask is not no boundary
The PR describes padded tail values that remained zero where exclusion required negative infinity before softmax. A zero logit is an ordinary candidate in the normalization; it is not intrinsically absent. That explains why padding can influence the result even when no application-supplied attention mask exists. The repaired implementation must still distinguish valid keys from storage added to satisfy its internal tile layout.
Patch counts are execution inputs
For a vision encoder, image preprocessing can change the number of patches reaching attention. Testing a single image resolution may accidentally choose a count with no problematic remainder. A proposed check should include the actual preprocessing outputs used by the application and neighbouring tail cases. Record patch count directly instead of inferring it only from file dimensions, since resizing and cropping rules can change the mapping.
Compare the attention result before text
A model may still generate a sensible caption when its intermediate attention result has changed. For this issue, a numerical comparison of the encoder or attention operation is more direct evidence than judging a sentence. Include an aligned control and an unaligned case, keeping weights and dtype fixed. The upstream PR reports its own device tests; no additional numerical improvement is asserted by this article.
A narrow but valuable correction
The release addresses the no-mask tail path, not every possible masked attention configuration on Hexagon. Preserve both masked and unmasked tests in backend qualification so a correction to one does not silently become evidence for the other. Operationally, the update is a reason to revisit unusual image sizes and patch counts in existing test sets, with backend selection and exact build recorded beside the comparison.
Sources
Related reading
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.