Skip to content

mtmd: fix mtmd_get_memory_usage - #24867

Merged
ngxson merged 2 commits into
ggml-org:masterfrom
ngxson:xsn/mtmd_fix_get_mem_usage
Jun 21, 2026
Merged

ngxson merged 2 commits into
ggml-org:masterfrom
ngxson:xsn/mtmd_fix_get_mem_usage

Conversation

@ngxson

@ngxson ngxson commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Overview

mtmd_get_memory_usage() mistakenly loads the weights which takes significantly more time. This fix brings down the estimation time from 200ms -> 20ms in my use case

Note: The no_alloc actually alloc the backend memory, just skip loading the weight. It's done like that to be simple, but need to be improved in the future

Requirements

@ngxson
ngxson merged commit 0d135df into ggml-org:master Jun 21, 2026
25 checks passed
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants