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 or mmproj.md; 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 |
| Add or port an architecture | architectures.md and the family contract; extensions.md when shipping it as a plugin |
| Add or replace an mmproj branch | extensions.md, then the graph contracts in mmproj.md and multimodal contracts |
Missing ggml operation or op_case |
how_to_add_op.md |
| Validate generated-text or quantized-model quality | WWB validation; compare both backends against the same saved reference while preserving numerical and integration gates |
| Wrong numbers | debugging_accuracy.md |
| GenAI/mmproj token, media or PA mismatch | multimodal integration bisection and multimodal contracts |
| Unsupported weight type | quantization.md; the fix belongs in src/quant/, not a builder |
| Build, run tests, regenerate fixtures | testing.md |
| Run or resume GGUF validation across OpenVINO, GenAI and llama.cpp | 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; 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/ProjectorExtensionmust 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.architectureneeds a catalog row orArchitectureExtension; a new mmproj type needs aProjectorExtension; a structurally different use of an existing op needs anop_case. Only a genuinely new GGML op needs a translator. - Registration timing. Architecture/projector extensions before
load(); converters and passes beforeconvert(), on the same frontend instance.GGUFMakeStatefulandAdaptToGenAIare C++ only. - Test build. New translator or builder sources go into the explicit
FRONTEND_SRCSlist intests/CMakeLists.txt, or the test binary fails to link. Runov_gguf_frontend_testsunfiltered before finishing: the op-coverage gate runs in teardown, so check the exit status.GGUFArchConversionskips without generated headers unlessOV_GGUF_REQUIRE_ARCH_FIXTURES=1requires them; generate them with 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 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 tightenexpect_neartolerances 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=0and the reference's KV precision. For strict checkpoint comparisons, setOV_GGUF_Q4_K_ZP_F16=1before starting the process. Run the unfiltered frontend unit suite with this variable unset: integer-zero-point tests require the default mode. Keep 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_caseor shared block changes rerunGGUFArchitectureAccuracy,GGUFArchConversionand 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
for overlays or multiple worktrees; version strings and
lddalone 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 separates numerical parity, model quality and Optimum compatibility; a known arithmetic difference remains a failed parity check unless the user changes the acceptance contract.