Download a Gemma 4 checkpoint from the CLI

python & transformers

// what it does

huggingface-cli download pulls a full repo into the local cache (~/.cache/huggingface/hub) for offline loading by from_pretrained. The instruction-tuned repos are google/gemma-4-E2B-it, -E4B-it, -12B-it, -26B-A4B-it, and -31B-it (note the capital B and the -it suffix). The newer hf download is an equivalent alias.

// shell

$ huggingface-cli download google/gemma-4-E4B-it

// gotcha

Casing matters: it is gemma-4-E4B-it and gemma-4-26B-A4B-it, not lowercase e4b/26b — the hub is case-sensitive and a wrong-case id returns a 404.

// resources