You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/cli/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,8 @@
165
165
|`--image, --audio FILE`| path to an image or audio file. use with multimodal models, use comma-separated values for multiple files |
166
166
|`--image-min-tokens N`| minimum number of tokens each image can take, only used by vision models with dynamic resolution (default: read from model)<br/>(env: LLAMA_ARG_IMAGE_MIN_TOKENS) |
167
167
|`--image-max-tokens N`| maximum number of tokens each image can take, only used by vision models with dynamic resolution (default: read from model)<br/>(env: LLAMA_ARG_IMAGE_MAX_TOKENS) |
168
+
|`--image-tile-mode MODE`| tile encoding mode for multi-tile vision models (e.g. Qwen3VL):<br/> batched - all tiles in one forward pass<br/> sequential - tiles encoded one-by-one (default)<br/> disabled - tiling disabled, single tile only<br/>(env: LLAMA_ARG_IMAGE_TILE_MODE) |
169
+
|`--image-max-tiles N`| maximum number of tiles for multi-tile vision models (e.g. Qwen3VL), overrides the<br/>value from the GGUF; use when the GGUF lacks the key or the model default is wrong<br/>for your model size (Qwen3VL defaults to 4, too low for 8B+ variants)<br/>(env: LLAMA_ARG_IMAGE_MAX_TILES) |
168
170
|`--chat-template-kwargs STRING`| sets additional params for the json template parser, must be a valid json object string, e.g. '{"key1":"value1","key2":"value2"}'<br/>(env: LLAMA_CHAT_TEMPLATE_KWARGS) |
169
171
|`--jinja, --no-jinja`| whether to use jinja template engine for chat (default: enabled)<br/>(env: LLAMA_ARG_JINJA) |
170
172
|`--reasoning-format FORMAT`| controls whether thought tags are allowed and/or extracted from the response, and in which format they're returned; one of:<br/>- none: leaves thoughts unparsed in `message.content`<br/>- deepseek: puts thoughts in `message.reasoning_content`<br/>- deepseek-legacy: keeps `<think>` tags in `message.content` while also populating `message.reasoning_content`<br/>(default: auto)<br/>(env: LLAMA_ARG_THINK) |
Copy file name to clipboardExpand all lines: tools/mtmd/clip.h
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,16 @@ enum clip_flash_attn_type {
35
35
CLIP_FLASH_ATTN_TYPE_ENABLED = 1,
36
36
};
37
37
38
+
// WARNING: value 0 is BATCHED, which is NOT the default mode (sequential is).
39
+
// A zero-initialized clip_context_params/mtmd_context_params (`{}`, memset, calloc)
40
+
// therefore selects BATCHED — the one-forward-pass path whose ne[3] batching is not
41
+
// yet verified on every backend (see the NOTE in models/qwen3vl.cpp). Do not rely on
42
+
// zero-init for the default: initialize via mtmd_context_params_default() (sets
43
+
// sequential) or set image_tile_mode explicitly. These values are part of the shipped
44
+
// API (string "0"/"1"/"2" in consumers), so they are intentionally not renumbered.
38
45
enum clip_image_tile_mode {
39
-
CLIP_IMAGE_TILE_MODE_BATCHED = 0,
40
-
CLIP_IMAGE_TILE_MODE_SEQUENTIAL = 1,
46
+
CLIP_IMAGE_TILE_MODE_BATCHED = 0,// NOT the default; zero-init lands here — see warning above
47
+
CLIP_IMAGE_TILE_MODE_SEQUENTIAL = 1,// the default (via mtmd_context_params_default)
41
48
CLIP_IMAGE_TILE_MODE_DISABLED = 2,
42
49
};
43
50
@@ -51,7 +58,8 @@ struct clip_context_params {
51
58
ggml_backend_sched_eval_callback cb_eval;
52
59
void * cb_eval_user_data;
53
60
constchar * backend_device; // optional, if null will use env var or default GPU backend
54
-
int image_tile_mode; // 0=batched (default), 1=sequential, 2=disabled
61
+
int image_tile_mode; // 0=batched, 1=sequential (default), 2=disabled. NOTE: 0 (batched) is the zero value but NOT the default — init via mtmd_context_params_default() or set explicitly.
62
+
int image_max_tiles; // override preproc_max_tiles; -1 or 0 = use GGUF/model default (only a positive value overrides)
0 commit comments