GGUF Speech Architecture Detector (utils/gguf_archs.py)

unsloth · studio/backend/utils/gguf_archs.py · python · Apache-2.0
voice, ai, lang:python, tag:gguf, tag:models

Detects speech and audio GGUF model architectures without heavy package dependencies. Use when parsing model metadata efficiently at import time.

# Source: https://github.com/unslothai/unsloth | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

"""The speech-architecture verdict, as a leaf module with no package baggage.

It lives here rather than beside the rest of the GGUF metadata helpers because
``utils.models.__init__`` eagerly imports ``model_config``, which imports ``yaml``.
``core.inference.llama_cpp`` needs this verdict at import time, and reaching it through
``utils.models`` made the whole models package -- and PyYAML with it -- a hard import
dependency of the chat backend. That

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key