mtmd: support MiniCPM-o 4.5(vision only) (#19211)

Signed-off-by: tc-mb <caitianchi@modelbest.cn>
This commit is contained in:
tc-mb
2026-01-31 06:19:30 +08:00
committed by GitHub
parent 1488339138
commit ec6c7421e4
3 changed files with 14 additions and 2 deletions
+5
View File
@@ -1005,6 +1005,8 @@ struct clip_model_loader {
hparams.minicpmv_query_num = 64;
} else if (hparams.minicpmv_version == 6) {
hparams.minicpmv_query_num = 64;
} else if (hparams.minicpmv_version == 100045) {
hparams.minicpmv_query_num = 64;
} else {
hparams.minicpmv_query_num = 96;
}
@@ -3209,6 +3211,9 @@ int clip_n_output_tokens(const struct clip_ctx * ctx, struct clip_image_f32 * im
} else if (params.minicpmv_version == 6) {
// MiniCPM-V 4.5
n_patches = 64;
} else if (params.minicpmv_version == 100045) {
// MiniCPM-o 4.5
n_patches = 64;
} else {
GGML_ABORT("Unknown minicpmv version");
}