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
Rewrite Qwen3VL multi-tile grid selection: enumerate CxR grids that downscale
the image in both dimensions (col*tile_px<=nx, row*tile_px<=ny), exclude 1x1
(equivalent to dyn_size), then pick within a ratio-error tolerance band by max
tile count and min log-ratio error. Fall back to dyn_size when no grid fits. Add
a global overview thumbnail at entries[0].
Add the --image-max-tiles CLI/env override (1..256), applied after load_hparams
so GGUF defaults don't clobber it, and clamp preproc_min_tiles so a low override
can't produce an empty candidate set on InternVL-family models. Guard the
log-ratio division against zero-dimension images.
Hardening:
- Validate clip.vision.preproc_max_tiles read from the GGUF: clamp to [1,256]
(the --image-max-tiles range) and fall back to 4 with a warning, matching the
InternVL branch. A crafted/corrupt value could otherwise drive an oversized
fitting.reserve() and OOM on load or first inference.
- Size fitting.reserve() to max_tiles*ln(max_tiles) (the actual candidate count)
instead of max_tiles*2, which undershot ~3x at the top of the range.
- Fail a zero-dimension image gracefully (LOG_ERR + return false) instead of
GGML_ASSERT, so one malformed upload fails its own request rather than
aborting the whole server. Callers already treat false as a per-request error.
- Doc/log consistency: reflow --image-max-tiles help to the sibling --image-*
style, add the --image-tile-mode/--image-max-tiles rows to the cli/server
READMEs, and log preproc_max_tiles as "(custom value)" when overridden.
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/server/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
@@ -181,6 +181,8 @@ For the full list of features, please refer to [server's changelog](https://gith
181
181
|`--mmproj-offload, --no-mmproj-offload`| whether to enable GPU offloading for multimodal projector (default: enabled)<br/>(env: LLAMA_ARG_MMPROJ_OFFLOAD) |
182
182
|`--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) |
183
183
|`--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) |
184
+
|`--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) |
185
+
|`--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) |
184
186
|`-a, --alias STRING`| set model name aliases, comma-separated (to be used by API)<br/>(env: LLAMA_ARG_ALIAS) |
185
187
|`--tags STRING`| set model tags, comma-separated (informational, not used for routing)<br/>(env: LLAMA_ARG_TAGS) |
0 commit comments