mtmd: some small clean up (#17909)

* clip: add support for fused qkv in build_vit

* use bulid_ffn whenever possible

* fix internvl

* mtmd-cli: move image to beginning

* test script: support custom args
This commit is contained in:
Xuan-Son Nguyen 2025-12-10 22:20:06 +01:00 committed by GitHub
parent 34a6d86982
commit c6b2c9310c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 126 additions and 81 deletions

View file

@ -318,7 +318,9 @@ int main(int argc, char ** argv) {
g_is_generating = true;
if (params.prompt.find(mtmd_default_marker()) == std::string::npos) {
for (size_t i = 0; i < params.image.size(); i++) {
params.prompt += mtmd_default_marker();
// most models require the marker before each image
// ref: https://github.com/ggml-org/llama.cpp/pull/17616
params.prompt = mtmd_default_marker() + params.prompt;
}
}
common_chat_msg msg;