From 4c29c5e9d3f4b0f4cd0f3197368bedf093076cd1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 11:43:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/core/inference/llama_cpp.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/studio/backend/core/inference/llama_cpp.py b/studio/backend/core/inference/llama_cpp.py index 86342ef155..439e142141 100644 --- a/studio/backend/core/inference/llama_cpp.py +++ b/studio/backend/core/inference/llama_cpp.py @@ -383,7 +383,19 @@ class LlamaCppBackend: pass # GGUF KV type sizes for fast skipping - _GGUF_TYPE_SIZE = {0: 1, 1: 1, 2: 2, 3: 2, 4: 4, 5: 4, 6: 4, 7: 1, 10: 8, 11: 8, 12: 8} + _GGUF_TYPE_SIZE = { + 0: 1, + 1: 1, + 2: 2, + 3: 2, + 4: 4, + 5: 4, + 6: 4, + 7: 1, + 10: 8, + 11: 8, + 12: 8, + } @staticmethod def _gguf_skip_value(f, vtype: int) -> None: @@ -457,7 +469,9 @@ class LlamaCppBackend: if self._context_length: logger.info(f"GGUF metadata: context_length={self._context_length}") if self._chat_template: - logger.info(f"GGUF metadata: chat_template={len(self._chat_template)} chars") + logger.info( + f"GGUF metadata: chat_template={len(self._chat_template)} chars" + ) except Exception as e: logger.warning(f"Failed to read GGUF metadata: {e}")