Skip to content

Commit 07a979f

Browse files
committed
fix: Use num_threads from llama model for mtmd
1 parent cd548bd commit 07a979f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,9 +2710,9 @@ def _init_mtmd_context(self, llama_model: llama.Llama):
27102710
with suppress_stdout_stderr(disable=self.verbose):
27112711
# Get default parameters
27122712
ctx_params = self._mtmd_cpp.mtmd_context_params_default()
2713-
# ctx_params.use_gpu = True
2713+
ctx_params.use_gpu = True # TODO: Make this configurable
27142714
ctx_params.print_timings = self.verbose
2715-
ctx_params.n_threads = 16
2715+
ctx_params.n_threads = llama_model.n_threads
27162716
ctx_params.verbosity = 2 if self.verbose else 0 # GGML_LOG_LEVEL_INFO = 2
27172717

27182718
# Initialize mtmd context

0 commit comments

Comments
 (0)