mtmd: add --image-min/max-tokens (#16921)

This commit is contained in:
Xuan-Son Nguyen
2025-11-03 11:11:18 +01:00
committed by GitHub
parent bf7b0c9725
commit 070ff4d535
8 changed files with 79 additions and 22 deletions

View File

@@ -83,6 +83,10 @@ struct mtmd_context_params {
const char * image_marker; // deprecated, use media_marker instead
const char * media_marker;
enum llama_flash_attn_type flash_attn_type;
// limit number of image tokens, only for vision models with dynamic resolution
int image_min_tokens; // minimum number of tokens for image input (default: read from metadata)
int image_max_tokens; // maximum number of tokens for image input (default: read from metadata)
};
MTMD_API const char * mtmd_default_marker(void);