Skip to content

mtmd: add chunk save/load function - #26645

Merged
ngxson merged 4 commits into
masterfrom
xsn/mtmd_chunk_save_load
Aug 6, 2026
Merged

ngxson merged 4 commits into
masterfrom
xsn/mtmd_chunk_save_load

Conversation

@ngxson

@ngxson ngxson commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Overview

Add a save/load API call for mtmd_input_chunk, ref: #26640 (review)

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: 30% code (most repetitive changes) are AI-written

@ngxson
ngxson requested a review from a team as a code owner August 5, 2026 16:27
@github-actions github-actions Bot added the mtmd Related to multimodal functionality (video/image/audio) label Aug 5, 2026
@ngxson
ngxson requested a review from ggerganov as a code owner August 5, 2026 19:10
@github-actions github-actions Bot added the testing Everything test related label Aug 5, 2026
Comment thread tools/mtmd/mtmd.h Outdated
MTMD_INPUT_CHUNK_TYPE_TEXT,
MTMD_INPUT_CHUNK_TYPE_IMAGE,
MTMD_INPUT_CHUNK_TYPE_AUDIO,
MTMD_INPUT_CHUNK_TYPE_MAX, // for validation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using MTMD_INPUT_CHUNK_TYPE_COUNT would be more consistent with the rest of the codebase.

@CHIPMUNK-T0T

CHIPMUNK-T0T commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

@ngxson
Thanks for working on this API for #26640.

This is a much cleaner and more general foundation than adding cache-only fields to mtmd_input_chunk. I agree that chunk serialization and deserialization belong in the mtmd API proper.

Once this API is merged, I will update #26640 to use mtmd_input_chunk_save() / mtmd_input_chunk_load() and drop the cache-only fields and mtmd_input_chunk_init_image_cache() added there.

The slot-specific integration will remain in #26640: the chunk positions, the outer file framing, the consistency checks against the restored token sequence, and the server-side tests.

@ngxson
ngxson merged commit 15586e2 into master Aug 6, 2026
23 of 27 checks passed
@ggerganov
ggerganov deleted the xsn/mtmd_chunk_save_load branch August 7, 2026 07:55
miltos22 pushed a commit to miltos22/llama.cpp-wackMall-merge-request that referenced this pull request Aug 10, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
satindergrewal pushed a commit to satindergrewal/llama.cpp that referenced this pull request Aug 12, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
huaxel pushed a commit to huaxel/CachyLLama that referenced this pull request Aug 12, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
brittlewis12 pushed a commit to brittlewis12/llama.cpp that referenced this pull request Aug 17, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
zbrad pushed a commit to zbrad/llama.cpp that referenced this pull request Sep 10, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
pl752 pushed a commit to pl752/llama.cpp that referenced this pull request Sep 15, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
* mtmd: add chunk save/load function

* nits

* add tests

* rn _MAX --> _COUNT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mtmd Related to multimodal functionality (video/image/audio) testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants