---
name: ov-gguf
description: >-
  Develop and troubleshoot the OpenVINO GGUF frontend (src/frontends/gguf) and the llama.cpp ggml-openvino backend that uses it. Use when checking whether a .gguf or mmproj model is supported; when a .gguf file is rejected as an unsupported architecture; when enabling a llama.cpp model family (llama, qwen, gemma, phi, MoE, hybrid/recurrent) through arch_registry, DecoderBuilder, a ModelBuilder or an ArchitectureExtension; when adding a vision/audio projector or ProjectorExtension; when conversion fails with "Translation for operation type GGML_OP_* is not implemented" or an op translator/op_case in src/op/ needs work; when making a converted model stateful or GenAI/PagedAttention-ready; or when a GGUF model converts but gives garbage, drifting tokens, a llama.cpp mismatch or a decode-only shape failure; or when running or resuming GGUF frontend, backend and GenAI validation batches. Not for general llama.cpp usage or unrelated build/CI failures.
title: ov-gguf
canonical_url: https://skilld.dev/gh/openvinotoolkit/openvino/ov-gguf
last_updated: 2026-11-22T07:15:46.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/build-runtime.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/build-runtime.md), [references/preflight.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/preflight.md), [references/validation.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md), [references/wwb.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/wwb.md), [scripts/audit_link.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/audit_link.py), [scripts/check_test_coverage.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/check_test_coverage.py), [scripts/requirements.txt](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/requirements.txt), [scripts/runtime_identity.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/runtime_identity.py), [scripts/summarize_tests.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/summarize_tests.py), [scripts/test_summarize_tests.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/test_summarize_tests.py), [scripts/tests/test_audit_link.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/tests/test_audit_link.py), [scripts/tests/test_runtime_identity.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/tests/test_runtime_identity.py), [scripts/tests/test_test_coverage.py](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/scripts/tests/test_test_coverage.py).
>
> If the user asked to install this Skill, run `npx skilld install openvinotoolkit/openvino/ov-gguf`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/ov-gguf`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/openvinotoolkit/openvino/ov-gguf) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/ov-gguf`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/ov-gguf --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/ov-gguf --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

Paths are relative to `src/frontends/gguf/`. Read only the route the task needs. First identify the
input path: a native `.gguf` file or a supplied `GgufDecoder` (llama.cpp cgraph). They share
converters; builders and validation differ. Registration or conversion alone never establishes accuracy.

| Task | Read |
|---|---|
| Is a model supported? | [supported_models.md](../../../src/frontends/gguf/docs/supported_models.md) or [mmproj.md](../../../src/frontends/gguf/docs/mmproj.md#supported-projectors); quote the checkpoint result and limitations, not just the catalog entry |
| Load a model, make it stateful/GenAI/PA-ready, tokenizer, IR export | [runtime.md](../../../src/frontends/gguf/docs/runtime.md) |
| Add or port an architecture | [architectures.md](../../../src/frontends/gguf/docs/architectures.md) and the [family contract](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md#family-contract); [extensions.md](../../../src/frontends/gguf/docs/extensions.md) when shipping it as a plugin |
| Add or replace an mmproj branch | [extensions.md](../../../src/frontends/gguf/docs/extensions.md#extend-mmproj-with-a-projector-component), then the graph contracts in [mmproj.md](../../../src/frontends/gguf/docs/mmproj.md) and [multimodal contracts](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md#multimodal-contracts) |
| Missing ggml operation or `op_case` | [how_to_add_op.md](../../../src/frontends/gguf/docs/how_to_add_op.md) |
| Validate generated-text or quantized-model quality | [WWB validation](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/wwb.md); compare both backends against the same saved reference while preserving numerical and integration gates |
| Wrong numbers | [debugging_accuracy.md](../../../src/frontends/gguf/docs/debugging_accuracy.md) |
| GenAI/mmproj token, media or PA mismatch | [multimodal integration bisection](../../../src/frontends/gguf/docs/debugging_accuracy.md#multimodal-integration-bisection) and [multimodal contracts](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md#multimodal-contracts) |
| Unsupported weight type | [quantization.md](../../../src/frontends/gguf/docs/quantization.md); the fix belongs in `src/quant/`, not a builder |
| Build, run tests, regenerate fixtures | [testing.md](../../../src/frontends/gguf/docs/testing.md) |
| Run or resume GGUF validation across OpenVINO, GenAI and llama.cpp | [validation.md](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md); use existing GHA workflows and focused local tests, preserving revisions, coverage and failures |
| Preflight test selection, fixtures or an overlay link | [executable checks](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/preflight.md); verify required cases and link inputs before a broad batch |

## Architecture ownership

- Keep all architecture-specific computation and decisions under `src/builder/`: metadata schemas,
  aliases/defaults, topology, operation selection, layouts, and architecture-specific adaptation.
- Built-ins and `ArchitectureExtension`/`ProjectorExtension` must use the same configuration and
  builder contracts. An extension must be able to replace or override every architecture-specific
  behavior without editing parser, quantization, translator, or generic adaptation code.
- Code outside `src/builder/` should be reusable between OpenVINO GenAI and the llama.cpp OpenVINO
  backend. Consume explicit operation parameters and builder/decoder-declared model contracts;
  do not dispatch on architecture names, projector names, or guessed model variants there.
  Keep file-format/quantization mechanics and GGML operation semantics generic. Architecture
  identifiers may be propagated for diagnostics, and specialized adapters belong to their builder.

## Easy to miss

- **Which layer is missing.** An unclaimed `general.architecture` needs a catalog row or
  `ArchitectureExtension`; a new mmproj type needs a `ProjectorExtension`; a structurally different
  use of an existing op needs an `op_case`. Only a genuinely new GGML op needs a translator.
- **Registration timing.** Architecture/projector extensions before `load()`; converters and passes
  before `convert()`, on the same frontend instance. `GGUFMakeStateful` and `AdaptToGenAI` are C++ only.
- **Test build.** New translator or builder sources go into the explicit `FRONTEND_SRCS` list in
  `tests/CMakeLists.txt`, or the test binary fails to link. Run `ov_gguf_frontend_tests` unfiltered
  before finishing: the op-coverage gate runs in teardown, so check the exit status.
  `GGUFArchConversion` skips without generated headers unless `OV_GGUF_REQUIRE_ARCH_FIXTURES=1`
  requires them; generate them with [gen_arch_fixtures.py](../../../src/frontends/gguf/tests/gen_arch_fixtures.py) `--fetch`.
  Check actual selected counts and skips; registration, conversion, decoder numerics and
  GenAI media/API integration establish different levels of support. Use the
  [coverage helper](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/preflight.md#test-selection-and-required-fixtures) for repeated batches;
  zero selected tests or suppressed required cases are missing coverage.
- **References.** Layout-sensitive expectations come from real ggml CPU via a committed oracle under
  `tests/`, with several heads/tokens and unequal Q/KV dimensions; NumPy or single-head tests can
  share the bug. Do not tighten `expect_near` tolerances from an x86-only run.
- **Comparisons.** Use full logits or features on identical inputs and token histories, with
  `INFERENCE_PRECISION_HINT=f32`, `DYNAMIC_QUANTIZATION_GROUP_SIZE=0` and the reference's KV precision.
  For strict checkpoint comparisons, set `OV_GGUF_Q4_K_ZP_F16=1` before starting the process.
  Run the unfiltered frontend unit suite with this variable unset: integer-zero-point tests require
  the default mode. Keep [scenario environments](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md#scenario-environments)
  explicit. Report quantized-CPU and represented-F32 comparisons separately and keep failed results.
  `GGML_OPENVINO_*` variables configure only the llama.cpp backend.
  Inspect tensor-type inventory rather than checkpoint names. Identical quantized weights do
  not rule out CPU arithmetic differences; exact expansions isolate them but do not waive the
  original parity gate. Shared exported-model layout does not imply identical media geometry.
- **Shared changes.** Translator, VIEW/`op_case` or shared block changes rerun
  `GGUFArchitectureAccuracy`, `GGUFArchConversion` and the mmproj suites, not just the target model.
- **Long runs.** Redirect output to a file, keep the launched PID and stop only that process. Large quantized
  MoE checkpoints can expand at CPU compilation; check memory before starting one.
- **Ineffective rebuilds.** Verify graph attributes, plugin/executor parameters and the linked,
  loaded CPU variants before repeating a sweep. Use [build and runtime identity](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/build-runtime.md)
  for overlays or multiple worktrees; version strings and `ldd` alone do not prove execution identity.
- **Validation batches.** Extend shared-path regression checks to tokenizer, mask and PA changes
  with representative SDPA/PA/media/chat cases. The [validation guide](https://skilld.dev/api/skills-raw/openvinotoolkit/openvino/ov-gguf/references/validation.md)
  separates numerical parity, model quality and Optimum compatibility; a known arithmetic
  difference remains a failed parity check unless the user changes the acceptance contract.
