llama.cpp mtmd lazy bitmaps for frame-by-frame video
Parent: Mac local LLMs: llama.cpp internals · Published reference · snapshot 2026-10-05
↓ Facts as markdownall context files
mtmd-tokenize-from-parts-per-segment-tokenizatio.md already holds the callback contract (-1 EOF, -2 error, no nested lazy, bitmap or text not both) and the file-hash ID purpose; this file adds only the header text on use and signature.
These notes link each claim to its source. A source may be a research report hosted on this site rather than the primary document. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Facts
- mtmd-tokenize-from-parts-per-segment-tokenizatio.md already holds the callback contract (-1 EOF, -2 error, no nested lazy, bitmap or text not both) and the file-hash ID purpose; this file adds only the header text on use and signature. [source]
- `mtmd_bitmap_init_lazy(ctx, id, user_data, callback)` takes a context, an ID the header says is usually the file hash, and a user pointer; the callback receives `chunk_idx`, `user_data`, `out_bitmap` and `out_text`. [source]
- A lazy bitmap can expand into one or more chunks, either media or text, and the header states the use as reading video frame by frame without loading the whole video and tracking the video with one ID. [source]
- Bitmaps and text emitted by the callback are freed automatically; emitted text must be heap-allocated and null-terminated. [source]
Children
- No children recorded.