﻿# llama.cpp MTP and a GTT spike: runtime memory beyond successful loading

Read a reported MTP/context memory cliff with the author’s driver-attribution correction, separate actual history from capacity and interpret GTT as occupancy evidence.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/llama-cpp-mtp-context-gtt-runtime-memory-author-correction/
Language: en

A model starting successfully does not prove that its largest request will fit the intended memory budget. A reported llama.cpp case involving MTP and a large configured context illustrates this distinction. Its most useful evidence includes a later correction: a GTT-usage increase did not by itself demonstrate that the AMD driver silently converted failed device allocations into host allocations.

## Separate configured capacity from actual request history

In the [original issue](https://github.com/ggml-org/llama.cpp/issues/26432), the owner compared two declared context capacities while keeping the actual history at 74.7K tokens. With MTP enabled, increasing capacity reduced reported decode from 42–46 to 18 tokens per second. Without MTP, the two results were close: 14.2 and 14.1.

This is a particular Radeon RX 7900 XT, quantized model and historical engine configuration. It is not a universal MTP penalty or a comparison of different actual prompt lengths. Configured capacity can change reserved or auxiliary storage even when the request's occupied history stays equal. Those quantities need separate columns in a reproducible record.

## Treat the GTT counter as accounting evidence

The owner reported GTT usage reaching 14.65 GB during prefill and then falling. The [AMDGPU documentation](https://docs.kernel.org/gpu/amdgpu/driver-misc.html) defines the sysfs memory counters as byte-valued amounts of used VRAM, visible VRAM and GTT. It does not define a GTT rise as an allocation-level explanation.

A time series identifies when accounting changes relative to prefill or decode. It does not, alone, reveal the requesting function, buffer lifetime or whether the driver migrated an existing allocation. A process-specific allocation trace would answer a different question from the device-wide occupancy counter. Combining observations is useful only when their scope and timestamps are retained.

## Keep the follow-up correction with the original claim

The author's follow-up described a minimal device-allocation experiment that failed with out-of-memory rather than silently falling back. They withdrew driver misbehavior as a demonstrated explanation and proposed application-side context-checkpoint storage as the better-fitting hypothesis.

That hypothesis was still awaiting confirmation in the reviewed thread. The [HIP memory API reference](https://rocm.docs.amd.com/projects/HIP/en/docs-7.2.1/reference/hip_runtime_api/modules/memory_management.html) distinguishes device and host allocation interfaces; their existence is not proof that a particular llama.cpp path used one of them. The later automatic stale closure supplied neither an accepted fix nor a verified allocation root cause. We did not execute the owner's experiment.

## Budget for the execution phase and preserve uncertainty

A useful evaluation would retain the engine revision, model format, declared capacity, actual history and speculative-decoding mode. It would observe loading, prefill and decode separately, checking peak memory alongside completed-request performance. Repeating the non-MTP comparison helps distinguish a capacity interaction from an unconditional context-length effect.

The [RAM and VRAM guide](/journal/ram-vs-vram/) explains resource boundaries, while the [benchmark protocol](/journal/inference-benchmark-method/) covers equivalent workloads. The engineering conclusion is bounded: static loading can miss a runtime working-set problem, and occupancy is not causality. Preserve the corrected source account rather than turning the original issue headline into a confirmed driver diagnosis.

## Sources

- [Reported MTP/context case and author's correction](https://github.com/ggml-org/llama.cpp/issues/26432).
- [Linux AMDGPU memory-accounting definitions](https://docs.kernel.org/gpu/amdgpu/driver-misc.html).
- [Versioned HIP memory-management interfaces](https://rocm.docs.amd.com/projects/HIP/en/docs-7.2.1/reference/hip_runtime_api/modules/memory_management.html).
