ComparisonFormatsGGUF

GGUF vs Safetensors: Model File Formats Explained

GGUF vs safetensors for open models: what each stores, quantisation, which runners use which, safety, conversion and which to download.

By the Uncensored AI Model Hub editorial team· Updated · 2 min read
GGUF vs Safetensors: Model File Formats Explained: side by side
GGUFSafetensors
Typical useLocal inference with llama.cpp-based appsTraining, Transformers, vLLM, diffusion models
QuantisationMany built-in levels (Q2-Q8, IQ)Usually full precision; separate quant formats exist
MetadataTokenizer and chat template embeddedConfigs in separate files
SafetyData onlyData only, no code execution
File countOften one file per quantOften sharded into several files

Model pages on Hugging Face often offer several formats. These are the two you will see most.

GGUF

Created for llama.cpp. A single file holds weights (usually quantised), tokenizer, chat template and metadata. Ideal for local apps. See GGUF and which GGUF quant to download.

Safetensors

Hugging Face’s safe format for tensors. Used for full-precision weights, training, Transformers, vLLM and diffusion models in ComfyUI. See safetensors.

Safety

Both store data only. Older pickle files can execute code; avoid them from unknown sources.

Conversion

llama.cpp converts safetensors models to GGUF and then quantises them. See the llama.cpp guide.

Finding the right file

Look for repositories dedicated to GGUF quants of a model, and read the model card. See download models from Hugging Face.

Common questions

Which format should I download for Ollama?

GGUF. Ollama imports GGUF files, and its library uses the same underlying formats.

Can I convert safetensors to GGUF?

Yes, llama.cpp includes conversion scripts, followed by quantisation.

Are pickle (.bin, .pt) files dangerous?

Older PyTorch pickle files can execute code when loaded. Prefer safetensors or GGUF from trusted sources.

Keep comparing

Terms on this page: GGUF, Quantization, Safetensors

Find your model in minutes.

Search the directory, check the licence and hardware, and start running uncensored AI models today.