Skip to content

Recurrent mmproj img ctx cache, even cache in disk/the disk load not working now#1585

Closed
FNsi wants to merge 4 commits into
ikawrakow:mainfrom
FNsi:recurrent-mmproj-img-ctx-cache
Closed

Recurrent mmproj img ctx cache, even cache in disk/the disk load not working now#1585
FNsi wants to merge 4 commits into
ikawrakow:mainfrom
FNsi:recurrent-mmproj-img-ctx-cache

Conversation

@FNsi

@FNsi FNsi commented Apr 5, 2026

Copy link
Copy Markdown

Changes: indeed store up tp 10 imgs ctx cache in ram; the rest store in disk and load when needed.;

  • Two-tier cache system implemented:

  • RAM cache: keeps max 10 entries for fast access

  • Disk cache: now save older entries to /tmp/llama_mmproj_cache/ if ram is full or entries > 10;

  • Key files modified:

  • mtmd.h - added KV cache API functions

  • mtmd.cpp - implemented cache storage and disk I/O

  • mtmd-helper.cpp - added save cache after decoding

  • server-context.cpp - added restore cache before processing

  • common.h - added configuration parameters

FNsi added 4 commits April 5, 2026 13:54
cache up to 10 img in ram, rest in disk.
----
Description of changes:

1. Two-tier cache system implemented:
   
   - RAM cache: keeps max 10 entries for fast access
   - Disk cache: saves older entries to /tmp/llama_mmproj_cache/ when RAM is full
2. Key files modified:
   
   - mtmd.h - added KV cache API functions
   - mtmd.cpp - implemented cache storage and disk I/O
   - mtmd-helper.cpp - added save cache after decoding
   - server-context.cpp - added restore cache before processing
   - common.h - added configuration parameters
enlarge the size of img cache..
@FNsi

FNsi commented Apr 5, 2026

Copy link
Copy Markdown
Author

I was wondering to set to the grey one but seems I cannot find the option...

@FNsi FNsi closed this Apr 5, 2026
@FNsi FNsi changed the title Recurrent mmproj img ctx cache; no much clue Recurrent mmproj img ctx cache, even cache in disk Apr 5, 2026
@FNsi FNsi changed the title Recurrent mmproj img ctx cache, even cache in disk Recurrent mmproj img ctx cache, even cache in disk/the disk load bot working now Apr 5, 2026
@FNsi FNsi changed the title Recurrent mmproj img ctx cache, even cache in disk/the disk load bot working now Recurrent mmproj img ctx cache, even cache in disk/the disk load not working now Apr 5, 2026
@FNsi FNsi deleted the recurrent-mmproj-img-ctx-cache branch April 5, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant