Choose & Download an Open Model
Every inference job begins with an artifact arriving on a machine. This module runs that job end to end for the first time, on the setup the setup lab verified, and this lesson is the first step: pick a model you are allowed to run, confirm it fits, and get its files onto the box.
None of these steps is hard, but each has a decision inside it that beginners discover late. Which weights you may download is a license question; whether they will run is the napkin from memory and throughput arithmetic; where they land is a cache with rules of its own.
Open weights and licenses
An open model, practically, is one whose weights you can download and run yourself. Openness has degrees. Some models ship under permissive software licenses with no strings worth worrying about at learning scale. Others, Llama among them, ship under community licenses you accept before downloading: on Hugging Face the repository is gated, and the gate is a license form, a short approval wait, and an access token on your machine.
The course's canonical model lives on both sides of this line: the official meta-llama/Llama-3.1-8B repository is gated, and the NousResearch/Meta-Llama-3.1-8B mirror serves the identical files ungated, which is why the course has pointed at the mirror since tensor shapes. For gated repositories, the token dance is two commands and is shown below; read the license you are accepting.
Choosing
The model card is the spec page the lesson on memory and throughput arithmetic taught you to pick up, and four lines on it decide most choices: parameter count, shipped precision, license, and maximum context length. The first two are the fit check, straight from the napkin: 8.03 billion parameters at BF16 is roughly 16 GB of weights, comfortable on the H100's 80 GB, and technically inside a 24 GB consumer card. The caution from memory and throughput arithmetic travels with that check: "fits" means the weights fit, and a running model needs headroom beyond them.
The card lists one more thing to read before downloading: whether the repository is the model that simply continues text or the variant tuned to answer as an assistant, base versus instruct. The base model, this course's Meta-Llama-3.1-8B, is the former. Products almost always serve instruct variants; this course runs the base model first, because continuation is the loop in its purest form, and the lesson on understanding one token will trace exactly that. The instruct variant is one suffix away when you want it.
Downloading
The Hub's own tool does the transfer. On the GPU box, inside your tmux session:
The --exclude matters: this repository also carries an original/ directory holding a second full copy of the weights in Meta's own checkpoint format, which transformers never reads. Skipped, the download is about 16 GB, so the napkin from remote GPU setup applies: about five minutes at a real-world 50 MB/s, and the reason the transfer runs hub-to-box rather than through your laptop. It is resumable; a dropped connection continues where it stopped.
Files land in the Hub cache, not your working directory:
Read the layout once: one directory per repository, one snapshot per revision (the hash pins exactly which version you have), and the tools this course uses find files here on their own. The entries are links into a shared blob store, which is how two revisions share unchanged files and why du -sh does not double-count. It is also why du -sh ~/.cache/huggingface from remote GPU setup grows: caches keep every model you have ever pulled until you prune them.
What arrived
The inventory is the artifact the inference stack described and the lesson on tensor shapes opened: the config (the integers every shape derives from), a small generation_config.json holding default generation settings, the tokenizer files, and the weights, sharded, with an index that maps all 291 tensors to their shard. Downloads get interrupted, and a truncated shard fails confusingly only at load time; the index records what complete looks like, and checking it is the lesson's gate:
Those are the numbers from tensor shapes to the byte: 16,060,522,496 is exactly 2 × 8,030,261,248, the parameter count at two bytes each. When a download is complete and healthy, the artifact agrees with its own paperwork.
The files are on the box and verified, and they are inert: sixteen gigabytes of numbers that do nothing until a runtime maps them into memory. Loading them, and meeting the tokenizer that turns your text into the model's input, is the next lesson.