Eval bug: Gemma 4 (finetunes) VRAM memory leak
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
.
The problem also exists on the it version model.
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.
Duplicate #21690
Oki tänks bro
في الجمعة، 17 أبريل 2026 19:09 EsKa @.***> كتب:
SerialKicked left a comment (ggml-org/llama.cpp#21742) https://github.com/ggml-org/llama.cpp/issues/21742#issuecomment-4270247516
See #21690 https://github.com/ggml-org/llama.cpp/issues/21690
— Reply to this email directly, view it on GitHub https://github.com/ggml-org/llama.cpp/issues/21742?email_source=notifications&email_token=CBTQ2IQF5UQ7B2ZZVYJEB334WJXNVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRXGAZDINZVGE3KM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4270247516, or unsubscribe https://github.com/notifications/unsubscribe-auth/CBTQ2IQGOHJCXKYTS6IEJE34WJXNVAVCNFSM6AAAAACXULMHMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DENZQGI2DONJRGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Same issue here via koboldccp and https://huggingface.co/unsloth/gemma-4-31B-it-GGUF