# Is it safe to download GGUF models from Hugging Face?

- Type: Question
- Author: Trisha Dutta
- Published: 2026-12-02
- URL: https://aimunk.com/p/is-it-safe-to-download-gguf-models-from-hugging-face

I run small models on my own machine and I mostly grab GGUF files from Hugging Face.

This week I read that some GGUF files there carry hidden malware. How does that even work if the file is only model weights? And what should I check before I load one?

## Best answer, by Sam Whitfield

Mostly yes, with one catch: a GGUF file holds more than weights, and that is where the risk is.

Every GGUF file carries a chat template, a small program the runtime applies to each prompt. A poisoned template can add instructions you never see, for example telling the model to start each reply with a command for you to run. Extra bytes can also sit after the last tensor, where loaders never read.

A scan of all 3,273,389 public model repositories on 26 November 2026 found 5 malicious GGUF models with 2,428 downloads: [Malspark write-up](https://malspark.com/blog/malicious-gguf-models-hugging-face/). Small numbers, but real.

So never run a command a local model suggests, and scan files before loading. The authors publish an open-source checker, gguf-radar, that inspects a file without running it.

## Answer, by Revathi Sundar

Follow-up for anyone using a model with tools: the post's own advice is to pass a reviewed template with `--chat-template-file` in llama.cpp, or `TEMPLATE` in an Ollama Modelfile. That takes the embedded template out of the loop.
