Open Files and versions before you open anything else
Open the file listing and look for the model configuration, tokenizer files, weights and generation settings. Some repositories omit or combine them. Reading these files in a browser can tell you what to check before installing software or downloading weights.
Here is what you are looking at.
config.json: the model’s shape
This is the architecture, in JSON. A trimmed example:
{
"architectures": ["LlamaForCausalLM"],
"hidden_size": 4096,
"num_hidden_layers": 32,
"num_attention_heads": 32,
"max_position_embeddings": 131072,
"vocab_size": 128256,
"torch_dtype": "bfloat16",
"rope_theta": 500000.0
}Four fields earn your attention:
architectureslists the architecture name reported by the repository. An Auto class also uses the model configuration to choose a compatible implementation.LlamaForCausalLMtells you this is a text generator;BertForSequenceClassificationtells you it is a classifier with a fixed number of labels. If your library cannot load the model, compare its supported classes and version with the model card. Upgrading may help for a recently added architecture; a custom architecture is a different case.max_position_embeddingsreports a positional limit or setting for architectures that use it. Verify the documented usable context for the model, including tokenizer, scaling and runtime limits, before relying on this field alone.torch_dtypemay appear asdtypeortorch_dtypedepending on the library and model revision. Treat it as a hint. Check the actual loaded dtype and memory use; the loader, requested dtype and quantization settings can change what is held in memory.vocab_sizehelps describe embedding capacity. Every token ID emitted by the tokenizer must be covered by the model’s embedding table; the table may have extra rows for padding. When adding tokens, check whether you need to resize the embeddings.
You can read it without a browser:
revision=169d4a4341b33bc18d8881c4b69c2e104e1cc0af
url=https://huggingface.co/openai/whisper-tiny
curl -fLsS "$url/resolve/$revision/config.json" | head -40The tokenizer files: three of them, doing different jobs
tokenizer.jsonis the fast tokenizer: the full vocabulary and merge rules in one file, loaded by the Rust implementation. Its presence is whyAutoTokenizeris fast.tokenizer_config.jsonholds the settings around it: padding side, maximum length, the special token names, and sometimes thechat_template. The Jinja template may also be in a separatechat_template.jinjafile. It formats user and assistant turns in the representation the model expects.special_tokens_map.jsonmaps roles likebos_token,eos_token,pad_tokenonto actual strings.
Older repositories carry vocab.txt, merges.txt or spiece.model instead. The supported loader can sometimes convert these to a fast tokenizer or use a library-specific implementation. Check the model instructions.
The weights, and why there are several files
model.safetensors is the whole thing when the model is small. Above a few gigabytes it is sharded:
model-00001-of-00004.safetensors
model-00002-of-00004.safetensors
model-00003-of-00004.safetensors
model-00004-of-00004.safetensors
model.safetensors.index.jsonThe index is a map from every parameter name to the shard that holds it, and often includes a total_size for the tensor data. That is a useful estimate for one set of weights. Include shard headers, other required files and cache overhead in the disk budget.
Many repositories carry both .safetensors and .bin copies of the same weights. Downloading both formats uses extra disk and bandwidth. Choose the needed files for your supported loader. The next lesson explains why you want the safetensors ones specifically.
generation_config.json: the defaults you did not choose
For generative models this file sets temperature, top_p, do_sample, max_new_tokens, eos_token_id and friends. When people compare two models and one seems wilder, the cause is frequently that their published generation defaults differ, not that the model does. If you are benchmarking, set these explicitly rather than inheriting them.
.gitattributes, and files with no purpose
.gitattributes tells git which patterns go to large-file storage. Inspect its rules if you are maintaining the repository. Do not change tracking as part of a download exercise. Beyond that you will find README.md, which is the model card, plus example images, an onnx/ folder, and sometimes a runs/ directory full of training logs somebody forgot to exclude. That last one is occasionally the most informative thing in the repository.
A repository can also be an adapter
If you see adapter_config.json and an adapter_model.safetensors of a few dozen megabytes, this is not a model. It is a LoRA adapter: a small set of extra matrices that must be applied on top of the base model named inside adapter_config.json. Downloading it alone and wondering why nothing loads is a rite of passage.
Do this now
Open any chat model’s tokenizer_config.json and find chat_template there or look for chat_template.jinja. Read the template. You are looking at the exact strings the model was trained to expect around a user turn; and once you have seen them, the whole category of “the model ignores my system prompt” bugs becomes legible.
Check your understanding
A repository lists ten files totalling 46 GB, but its model.safetensors.index.json reports a total_size of about 16 GB. What is the most likely explanation?
Pick the one you would defend. Your answer stays private.
Your place and first choices stay on this browser. Classroom credit is recorded separately.
Every lesson here is open. Your progress is recorded once you pass the Image Generation, in Practice exam.
Stuck on something?Ask Arjun, your AI tutor