How it works

Every number on this site is worked out from one file: the model's config.json on Hugging Face, which lists the sizes the code needs to build the model.

Parameters

From the config the site lists every weight tensor the model has, with its shape, and multiplies out the shapes. The total is then checked against the number Hugging Face reads from the model's safetensors files. For all 68 models here the two agree to the parameter, once the few stored tensors that are not separate weights are set aside (they are explained on the page where they occur).

The details that make the count come out right:

Memory

Weights: parameters × bytes per parameter. KV cache: 2 (a key and a value) × layers × KV heads × head size × bytes, per token of context, per sequence. These are lower bounds: runtimes add activations, buffers and fragmentation, and quantized files carry scales. The GPU pages add those scales and keep 10% of the card free.

FLOPs

Two per weight per token (a multiply and an add), plus the attention scores, which grow with the context. Training is about three times that.

Sources

Meta's and Google's repositories need a sign-in to download, so their configs are read from public copies (unsloth, NousResearch); each page names the copy it used. The configs are the same files. Hugging Face's API gives the parameter count even for gated repositories.

Privacy

No cookies of our own; nothing you pick in the calculators leaves your browser.