{"version":1,"type":"story","url":"https://digestai.news/story/ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates","json":"https://digestai.news/story/ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates.json","markdown":"https://digestai.news/story/ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates.md","slug":"ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates","headline":"Ggml-org rotates K/V read order to improve L2 cache hit rates","summary":"The `llama.cpp` project merged a pull request on November 17, 2026, to rotate the read order of key-value (K/V) pairs in CUDA-based attention layers. The change targets better L2 cache utilization, specifically in **ggml/src/ggml-cuda/fattn-mma-f16.cuh**, where 64 lines were added and 16 removed. This update is part of a broader set of optimizations for GPU inference, including profiling-driven tweaks for Jetson AGX Xavier devices (sm72, CUDA 11.4), which reportedly improved token throughput by **32.4%** (from 22.71 to 30.06 tokens/sec) and **28.2%**–**36.8%** in other benchmarks (e.g., pp2048: 533.06 → 729.41 tokens/sec). The change only engages with multi-stage loading (e.g., Ampere GPUs) and does not affect HIP-based systems like AMD’s gfx1151 architecture.\n\nThe update was merged via a fast-forward push to avoid overwriting 2,031 lines of upstream code, ensuring no data loss. The pull request was assisted by **Claude Opus 5.5** and involved byte-level verification of 38 paths to confirm compatibility. While the change is technical and targeted at developers, it could indirectly benefit users of optimized inference setups by improving performance on compatible hardware.","keyPoints":["Rotated K/V read order in CUDA attention layers to boost L2 cache hit rates, tested on Jetson AGX Xavier (sm72, CUDA 11.4)","Reported 32.4% token/sec improvement in benchmark `llama-bench tg128` (22.71 → 30.06) and 28.2%–36.8% gains in other setups","Merge avoided overwriting upstream code, with byte-level verification of 38 paths to ensure no data loss"],"whyItMatters":"This optimization targets GPU inference efficiency, which could reduce latency and cost for users running large language models on compatible hardware. The 30%+ throughput gains may lower operational expenses for deployments relying on Jetson AGX Xavier or Ampere GPUs.","category":{"slug":"hardware","name":"Hardware & Compute","url":"https://digestai.news/category/hardware"},"entities":{"companies":["ggml-org","ftulabs"],"models":[],"people":["Claude Opus 5.5"]},"firstPublishedAt":"2026-11-17T11:34:46Z","updatedAt":"2026-11-17T11:34:46Z","sourceCount":1,"hasPrimarySource":true,"sources":[{"outlet":"github.com","title":"Rotate K/V read order for better L2 cache hit rates by gaugarg-nv · Pull Request #32407 · ggml-org/llama.cpp","url":"https://github.com/ggml-org/llama.cpp/pull/32407","publishedAt":"2026-11-17T11:34:46Z","type":"primary","primary":true,"lead":true}],"sourceNotes":null,"discussions":[{"site":"Reddit","url":"https://www.reddit.com/r/LocalLLaMA/comments/1xyi6hj/rotate_kv_read_order_for_better_l2_cache_hit/","points":null}],"thread":null,"cite":{"text":"Digest AI, \"Ggml-org rotates K/V read order to improve L2 cache hit rates\", 17 November 2026, https://digestai.news/story/ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates","publisher":"Digest AI","title":"Ggml-org rotates K/V read order to improve L2 cache hit rates","datePublished":"2026-11-17T11:34:46Z","url":"https://digestai.news/story/ggml-org-rotates-k-v-read-order-to-improve-l2-cache-hit-rates"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}