llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Eval bug: Gemma 4 (finetunes) VRAM memory leak

Open frenzybiscuit opened this issue 7 months ago • 5 comments

Name and Version

https://github.com/ggml-org/llama.cpp/pkgs/container/llama.cpp/788634511?tag=server-cuda

Operating systems

Linux

GGML backends

CUDA

Hardware

7950x + 4x3090 + 128GB RAM

Models

https://huggingface.co/BeaverAI/Artemis-31B-v1b-GGUF/resolve/main/Artemis-31B-v1b-Q8_0.gguf?download=true

Problem description & steps to reproduce

Run with the following command:

--port 5000 --host 0.0.0.0 --models-max 1 --models-preset /llamacpp/config.yaml --no-mmap --api-key woot

Run with the following config.yaml:

version = 1

[*] flash-attn = on n-gpu-layers = 99

[Artemis 31B v1b:Q8_0] model = /models/Artemis-31B-v1b-Q8_0.gguf c = 196608 temp = 0.9 top-p = 0.98 min-p = 0.02 chat-template-kwargs = {"enable_thinking":true} sm = tensor jinja = true b = 4096 ub = 4096 np = 2 LLAMA_ARG_CACHE_RAM = 65536 ctxcp = -1

GPUs start with 19GB VRAM. Chat for an hour. Watch VRAM hit 24GB and go OOM.

Then, reload the model. Using the -same chat-, start again. VRAM remains at 19GB. Watch it climb to 24GB over another hour and go OOM.

First Bad Commit

No response

Relevant log output

.

frenzybiscuit avatar Apr 10 '26 20:04 frenzybiscuit

The problem also exists on the it version model.

nikitabalakin avatar Apr 12 '26 13:04 nikitabalakin

It's bad, too. I have 17GB of 24GB used on each GPU (context is specifically cut in half) for 4x3090.

Over around an hour of constant use, it climbs to 22GB. And eventually crashes.

frenzybiscuit avatar Apr 13 '26 20:04 frenzybiscuit

Duplicate #21690

SerialKicked avatar Apr 17 '26 18:04 SerialKicked

Same issue here via koboldccp and https://huggingface.co/unsloth/gemma-4-31B-it-GGUF

Peravel avatar Apr 27 '26 19:04 Peravel