Model Files: What You're Actually Downloading
A popular model on Hugging Face is not one file. It is a repo with forty or fifty of them: a dozen safetensors shards, a tokenizer, three JSON configs, a chat template, a licence, and half a dozen GGUF builds made by strangers. None of it is labelled clearly enough to tell you which one you need.
This page is the map. It covers what the formats are, why the small files exist, and how to tell a model from a dataset before you spend an hour downloading the wrong thing.
For how many bits each format uses, read Quantization. That page answers “how small and how much quality do I lose.” This one answers “what am I looking at, and which file do I click.”
Three questions, not one
The reason format names feel incoherent is that they answer three unrelated questions, and every name you have heard is an answer to exactly one of them.
| Question | Answers |
|---|---|
| What container holds the numbers? | safetensors, GGUF, .bin, ONNX |
| At what precision are they stored? | BF16, FP16, FP8, MXFP4, 4-bit integer |
| Which runtime reads them? | llama.cpp, MLX, vLLM, ExLlamaV2 |
So safetensors and GGUF are containers. AWQ and EXL2 are quantisation schemes that assume a specific runtime. MLX is a runtime whose files are actually safetensors plus a config block. They are not competing options, and treating them as a list of alternatives is where most confusion starts.
The containers
safetensors
Hugging Face’s own format, and the default for anything distributed as full-precision or GPU-quantised weights.
The layout is minimal: eight bytes giving the length of a JSON header, the header describing every tensor’s name, dtype, shape and byte range, then the raw data. Two consequences matter.
It cannot execute code on load. The older pytorch_model.bin format is Python pickle, which can run arbitrary code when opened. safetensors was built to make that impossible. If a repo offers both, always take the safetensors one.
It memory-maps. Loading is near-instant and does not read the whole file into RAM, because the runtime maps the file and reads tensors as it needs them. This is why a 40 GB model “loads” in a second and then takes four minutes to answer.
The catch: safetensors is tensors only. No architecture, no tokenizer, no chat template, no context length. All of that lives in the sibling JSON files — which is most of why those forty files exist.
GGUF
llama.cpp’s format, and the one almost every local runtime eats: Ollama, LM Studio, KoboldCpp, Jan, GPT4All.
Where safetensors is deliberately dumb, GGUF is deliberately self-contained. It embeds the architecture, context length, tokenizer, chat template, and quantisation scheme as typed metadata alongside the tensors. One file is a complete, runnable model. That is the entire design goal, and it is why ollama pull can work from a single download.
Two properties earn it the default position for local use:
- It splits across CPU and GPU. Any other format expects the whole model in VRAM. GGUF will put as many layers on the GPU as fit and run the rest on the CPU.
- The filename tells you the precision.
Q4_K_Mis not a mystery; it is a documented scheme. See the levels table for what each costs.
The trade-off is that GGUF is an inference format, not a training one. You do not fine-tune a GGUF, and you cannot convert it back to full precision without losing what you started with.
MLX
Not a container. MLX is Apple’s array framework, and an “MLX model” is a directory of safetensors plus a config.json containing a quantization block that names the bit width, group size and mode.
The reason it gets its own repos — the mlx-community organisation on Hugging Face — is that the weight layout and kernels are Apple-specific. It runs on Apple Silicon only, using unified memory, and it cannot use a CUDA-quantised file.
Convert with mlx_lm.convert -q. If you are on a Mac and using LM Studio or oMLX, you are probably running MLX under the interface without knowing it.
EXL2
ExLlamaV2’s format, and the odd one out because it measures precision in bits per weight rather than by scheme name. You will see 4.0bpw, 4.65bpw, 6.0bpw — and the point of the odd numbers is that ExLlama assigns different precision to different layers, spending bits where they matter.
NVIDIA-only, CUDA kernels, built for fast single-stream generation. Excellent tokens-per-second on one GPU; no CPU offload, no Apple support, and it needs a calibration dataset to build.
AWQ
Activation-aware Weight Quantization. A 4-bit scheme that scales each channel by how strongly it activates, so weights that carry large activations keep their resolution. Usually shipped as safetensors plus a quantize_config.json, and it requires AWQ kernels — vLLM or AutoAWQ.
GPU-only and CUDA-first. In practice you choose AWQ when you are serving through vLLM and want 4-bit without GPTQ’s older tooling. Its cousin GPTQ does the same job with layer-wise error compensation: slower to produce, very widely supported.
The rest, briefly
pytorch_model.bin is legacy pickle — avoid. ONNX is a portable graph plus weights for onnxruntime and DirectML. Core ML packages are compiled for Apple devices and are not portable. TensorRT-LLM engines are compiled against one GPU model and one shape configuration, so an engine built for an H100 will not load on a 4090. compressed-tensors is a container used inside safetensors repos to describe packed low-precision formats — it is what Moonshot used for the Kimi K3.1 Pro checkpoint.
Models, datasets, and everything else
Hubs host more than models, and the URL tells you which is which.
| What | URL shape | Contains |
|---|---|---|
| Model | huggingface.co/<org>/<name> | Weights, config, tokenizer |
| Dataset | huggingface.co/datasets/<org>/<name> | Data — usually Parquet or Arrow |
| Space | huggingface.co/spaces/<org>/<name> | A running app, not files to download |
A dataset repo holds data, not weights: .parquet and .arrow for tabular or text corpora, .jsonl and .csv for smaller sets, plus a README whose YAML header declares the schema and splits. There is nothing to run. People download forty gigabytes of a dataset expecting a model roughly once, and it costs them an afternoon.
The reverse confusion is rarer but real: a model repo can contain calibration data or an importance matrix for quantisation. That is an input to the quantiser, not a dataset.
Why the small files exist
You wanted a model. You got this:
config.json
generation_config.json
tokenizer.json
tokenizer_config.json
special_tokens_map.json
chat_template.jinja
model-00001-of-000096.safetensors
...
model.safetensors.index.json
README.md
LICENSE
Each has a job, and none is padding.
| File | What it does | Needed to run? |
|---|---|---|
config.json | Layers, heads, dimensions, rope settings | Yes |
generation_config.json | Default temperature, top-p, stop tokens | Usually |
tokenizer.json, tokenizer.model | Text ↔ token IDs | Yes |
tokenizer_config.json, special_tokens_map.json | Special tokens and formatting rules | Yes |
chat_template.jinja | How chat messages become one prompt string | Yes, for chat models |
preprocessor_config.json, processor_config.json | Image or audio preprocessing | Multimodal only |
modeling_*.py, configuration_*.py | Custom architecture code | If the model needs trust_remote_code |
quantization_config.json | How the weights were compressed | Quantised repos |
model.safetensors.index.json | Which shard holds which tensor | Sharded repos |
.gitattributes | Git LFS rules | No |
README.md | The model card — read this one | No, but you should |
LICENSE, USE_POLICY.md | Terms of use | Legally, yes |
The reasons behind them fall into five groups.
Separation of concerns. safetensors stores numbers and nothing else, so every other fact about the model has to live in a file next to it. This is a deliberate trade: one dumb container that works for any architecture, plus metadata the loader reads separately.
Runtimes disagree about what “complete” means. Transformers wants a directory of files. llama.cpp wants everything baked into one GGUF. That is why a single model legitimately ships as both a fifteen-file safetensors repo and eight single-file GGUF builds.
Sharding. Large models are split into chunks — model-00001-of-000096 means shard 1 of 96, not model 1 of 96. The .index.json maps tensor names to files so the runtime can load only what it needs. A repo with ninety-six shards is one model of about 1.5 TB, not ninety-six models.
Multimodal parts are separate. For GGUF builds, the vision encoder ships as a companion mmproj-*.gguf. You need the main file and the projector; a text-only file will ignore your images.
Community artefacts. Quantisers re-upload the tokenizer because GGUF needs it embedded. LoRA and other adapters appear as adapter_model.safetensors a few megabytes in size — that is a patch against a base model, not a model, and it will not run on its own. Draft models for speculative decoding and .imatrix calibration files show up the same way: small, adjacent, and not what you came for.
What to download
| Your machine | Your runtime | Take this |
|---|---|---|
| Apple Silicon | MLX, LM Studio, oMLX | The mlx-community 4-bit repo |
| Apple Silicon | Ollama, llama.cpp | Q4_K_M GGUF |
| NVIDIA, one user | ExLlamaV2 | EXL2 at 4.5–5 bpw |
| NVIDIA, serving many | vLLM | AWQ, GPTQ, or FP8 |
| CPU only | llama.cpp, Ollama | Q4_K_M GGUF |
| Fine-tuning | Transformers | BF16 safetensors |
If you are unsure, Q4_K_M GGUF is the answer that works almost everywhere, and the VRAM calculator will tell you whether it fits before you commit to the download.
Six traps
“safetensors” is not a precision. A 4-bit AWQ repo is safetensors. So is a 16-bit original. The container says nothing about size.
A 96-file repo is one model. Ninety-six shards, not ninety-six variants.
Two Q4_K_M builds are not the same model. Different uploaders, different calibration data, measurably different quality. The quantisation page explains why this matters more than the bit depth.
.bin is not .safetensors. Pickle versus memory-mapped data. Prefer safetensors every time it exists.
A dataset repo is not a model. Check for /datasets/ in the URL before you start.
Do not download BF16 “to be safe.” If you are going to run a quant anyway, you have downloaded 140 GB to delete 130 of it. Check what your runtime can actually open first.
The rule
Download the file your runtime can open, at the largest size that still leaves room for the KV cache, from the uploader who documents how they made it. Everything else in the repo is scaffolding — necessary, unglamorous, and not the thing you came for.
