GGUF Radar GitHub: Scan Model Files Before You Run Them

Share

GGUF Radar released version 0.1.5 on 30 November 2026 to inspect model files and hosted models without running their weights or chat templates. The Python command-line tool checks for hidden malware and poisoned templates, then can build a clean GGUF copy with the same model weights.

At a glance

Is GGUF Radar the GitHub project users mean?

Yes. GGUF Radar is a Python command-line security tool for local model files and Hugging Face models. Its purpose is narrow: inspect a model package before a runtime loads it, rather than judge answer quality, speed or hardware fit.

The project describes itself as checking LLM model files for hidden malware and poisoned chat templates. It never runs the model or its template. If it finds something in a GGUF file, it can build a clean copy with the original model weights.

A GGUF file stores model weights and metadata. That metadata can include a chat template, which is a small program that turns a conversation into the text the model receives. The template is useful for formatting prompts, but it also creates a place where hidden instructions can affect an application.

Pillar Security documented poisoned templates that alter prompts after users submit them. The risk is higher for agent-style systems because hidden text can steer a model towards commands, downloads or tool calls that the user did not request.

The practical rule
Treat a downloaded model like downloaded software. Scan it before loading it in a local runtime or agent environment. A model that answers normally can still contain extra data or a template that activates only for selected prompts.

What does GGUF Radar scan before loading?

GGUF Radar checks the structure around model weights and parses chat templates without executing them. For Hugging Face models, the project says it downloads only the small parts needed for inspection. A scan can therefore examine a very large hosted model without downloading the complete file first.

The tool supports GGUF files on disk and models hosted on Hugging Face. The repository documentation also says it checks chat templates associated with Safetensors and PyTorch models. Those formats can carry templates outside the model weights, so checking the template remains useful even when the model is not packaged as GGUF.

The checks cover template behaviour and places where data can hide in a model file. The project describes attacks that place programs after the end of the weights, where ordinary model loaders do not look. It also describes templates that tell users to run commands or tell coding agents to download scripts.

This is format-aware inspection, not ordinary antivirus scanning. The scanner examines the structure that declares where model data should be read. It can identify content outside that expected layout and inspect template logic for suspicious behaviour.

The distinction matters because a model can behave normally during a casual test. A hidden payload may remain dormant until a particular message reaches the template. A clean-looking answer is therefore not proof that the complete file is harmless.

Reader decisionGGUF Radar commandWhat it checks or changesBest use
Should I load this file?scanInspects the model and reports a verdict.Every new local model download.
Did a conversion alter the prompt format?compare-templateCompares a GGUF template with the original model’s template.Models from third-party quantizers.
Can I remove concealed data?sanitizeBuilds a new GGUF copy with the same model weights.A file that needs cleaning before review or use.

The comparison command addresses a specific supply-chain question: does the file’s embedded template match the template of the original model? The project documents compare-template for this purpose. It does not turn a third-party file into an official publisher release, but it can expose a meaningful difference for human review.

How do you install and run a first scan?

GGUF Radar needs Python 3.10 or newer. The repository gives pip as the installation method, followed by a scan of a local model path.

python -m pip install gguf-radar
gguf-radar scan ./model.gguf

The local command accepts a model file on disk. The scanner does not need to run the model to inspect it, so the review can happen before a runtime opens the file.

For a model hosted on Hugging Face, use the repository’s owner-and-name form. The documented example is:

gguf-radar scan Qwen/Qwen2.5-0.5B-Instruct-GGUF

The project says its Hugging Face scan downloads only the small parts required for inspection. That is different from downloading the complete model merely to check its header, file layout or template.

To build a clean copy, pass the suspicious file and an output path:

gguf-radar sanitize suspicious.gguf -o clean.gguf

The project says the clean copy keeps the same model weights. Sanitising is still not a complete answer to a poisoned template. A team should review the template separately and decide whether it should be replaced, removed or retained.

To compare a GGUF template with the original model, use the documented base-model option:

gguf-radar compare-template ./model.gguf --base Qwen/Qwen2.5-0.5B-Instruct

Which commands and outputs are verified?

The repository’s quick-start documentation verifies three operational commands: scan, sanitize and compare-template. It also defines four scan verdicts. Use these commands as the compact working reference:

  • gguf-radar scan ./model.gguf checks a local GGUF file.
  • gguf-radar scan Qwen/Qwen2.5-0.5B-Instruct-GGUF checks a Hugging Face model.
  • gguf-radar sanitize suspicious.gguf -o clean.gguf builds a clean GGUF copy.
  • gguf-radar compare-template ./model.gguf --base Qwen/Qwen2.5-0.5B-Instruct compares templates.

The documented output states that CLEAN means nothing suspicious was found. SUSPICIOUS means something unusual was found and needs human review. MALICIOUS means the file shows a pattern used in real attacks, while ERROR means the file or repository could not be read.

The command exits with code 0 for CLEAN, 2 for SUSPICIOUS or MALICIOUS, and 1 for ERROR. Those results provide the control a CI system needs, but the words printed by the scanner still matter. A non-zero result should lead to review, not an automatic assumption about why the scan failed.

What do CLEAN and MALICIOUS mean?

CLEAN means that no implemented check found a problem. It does not mean a security guarantee. The project’s definition describes a scan result, not proof that a file is safe against every future attack.

SUSPICIOUS means the tool found something unusual that needs human review. A template difference can have a legitimate explanation, but a team should understand it before allowing the model into an automated system.

MALICIOUS means the file shows a pattern used in real attacks. Do not load it. Preserve it only when an incident responder needs evidence, and otherwise obtain a replacement from a publisher you can identify.

ERROR means that the file or repository could not be read. Treat that result as a failed review. An unreadable model is not equivalent to a clean model.

What should you do after a warning?

Do not test a flagged model by loading it. The point of the scan is to avoid turning a security review into execution. First identify whether the finding concerns the chat template, hidden data or both.

  • For a malicious template: obtain a known-good template from the original model publisher and compare it before use.
  • For data after the weights: obtain a clean replacement if possible. Do not assume the bytes are harmless because the model answers questions normally.
  • For a suspicious result: read the specific finding and require a human decision before deployment.
  • For an agent-facing model: keep it away from shell, browser and file-writing permissions until review is complete.

GGUF Radar can build a cleaned copy, but sanitising is not a cure-all. Removing hidden locations does not answer whether the embedded template should be trusted. A cleaned file still needs a decision about its prompt-formatting code.

The safest workflow keeps the original file for evidence, creates a separate output file and scans that output again. The second scan confirms what the tool reports about the rebuilt file. It does not certify the model’s publisher, training data or behaviour.

GGUF Radar command-line interface scanning a model file in GitHub Codespaces on a computer screen
GitHub Codespaces screenshot · Wikideas1 / Wikimedia Commons (CC0)

Can a team block unsafe models in CI?

Yes. The documented exit codes let a continuous-integration job stop when a model is suspicious, malicious or unreadable. The CI job should scan the exact artifact that will ship, not only an earlier source model or a repository page.

Use a fail-fast shell step that runs the scan directly:

set -e
gguf-radar scan ./release-models/

With set -e, the job stops when the scanner returns a non-zero exit code. That covers the project’s documented SUSPICIOUS, MALICIOUS and ERROR results without a separate test that could accidentally inspect the wrong shell variable.

Teams should retain the scan output with the model’s source and review record. The scanner answers whether its implemented checks found a known problem. It does not establish that an artifact came from the claimed publisher or that its weights are accurate.

What shipped in version 0.1.5?

GGUF Radar’s version 0.1.5 release notes describe changes to conditional template analysis. The release follows not, not in, !=, and and or so that double-negation and De Morgan-style forms are read correctly.

The same release adds structured fields to JSON findings. The fields include trigger_literals, absent_literals, branch_text and known_template. The release notes say these fields are empty for findings from other categories.

Version 0.1.5 also adds a known-template list containing 18 templates. The list uses SHA-256 hashes of complete template text. That can help identify recognised community templates, but recognition is not the same as a safety verdict.

The release notes also clarify that the new conditional-analysis handling does not change the finding or verdict. It changes how certain trigger strings are represented and adds information that can make stored reports easier to inspect.

Why does this tool matter now?

The security risk is not merely theoretical. Malspark reported five malicious GGUF repositories after scanning public Hugging Face model repositories on 26 November 2026. The report recorded 2,428 downloads by 27 November, while explaining that a download count is not a count of confirmed victims.

The same report describes poisoned chat templates that add instructions users do not see. It also describes executable data appended after the last tensor, where normal loaders do not read it. That combination explains why checking both template content and file structure matters.

Earlier research supports the need for separate template review. Research on inference-time template backdoors describes templates that wait for trigger text and redirect agent actions. EvilModel research showed that malware can be hidden inside neural-network models.

What does a clean result not prove?

A clean result does not prove that a model is benign, accurate or from its claimed author. It says that the scanner did not find one of its implemented structural or template patterns.

An attacker can use a new pattern, place malicious behaviour outside the checks or publish a replacement after review. A scan should therefore sit beside publisher verification, file hashes, restrictive permissions and a test environment.

GGUF Radar addresses particular risks in GGUF layouts and model templates. It is not a universal malware detector for every model format, every runtime or every malicious weight set.

What we could not verify?

No public independent detection-rate study currently establishes how GGUF Radar performs against a representative set of benign files and previously unseen attacks. An independent laboratory could address that question with a disclosed test set, false-positive rate and repeatable results.

The public material does not establish that every supported model format receives identical checks. The repository says that GGUF files, Hugging Face models, Safetensors templates and PyTorch templates are supported, but users should confirm the behaviour of their specific file type before treating a scan as complete.

No public roadmap states which model formats, attack patterns or hosted repositories will receive future support. Until that changes, use the tool for its documented GGUF and template checks, not as evidence that a model is safe in every respect.

Sources


David Thompson
David Thompson
David Thompson writes about AI tools, developer workflows, and the platforms powering automation.

Read more

Local News