ThreadCount
Contents
[
Hide
]
ThreadCount sets the number of threads mtmd uses for CPU-side multimodal work (image preprocessing, CPU portions of the projector).
Quick reference
| Type | int? |
| Default | null (native default — often half the logical cores) |
| Category | Multimodal context |
| Field on | MultimodalContextParameters.ThreadCount |
What it does
null— use mtmd’s heuristic.- Positive integer — use that many threads.
Multimodal preprocessing is short-lived per request. On a server handling many concurrent vision requests, cap ThreadCount to prevent per-request work from starving other requests.
When to change it
| Scenario | Value |
|---|---|
| Default | null |
| Concurrent vision requests | 2 – 4 per request |
| Single-request, all cores available | Environment.ProcessorCount / 2 |
Example
var preset = new Qwen3VL2BPreset();
preset.MtmdContextParameters.ThreadCount = 4;
using var api = AsposeLLMApi.Create(preset);
Interactions
ContextParameters.NThreads— base-model generation threads; independent of mtmd’s thread count.
What’s next
- Multimodal context hub — all mtmd knobs.
- Context parameters — NThreads — base-model counterpart.