Loading…
Glossary term
A learned numeric value inside a model; model size is often described by parameter count.
A parameter is a number the model learns during training, mainly its weights and biases. A model's size is usually described by how many it has: millions, billions or even trillions.
More parameters can store more knowledge and ability, but they also need more memory and compute to train and run.
Count a model's parameters
total = sum(p.numel() for p in model.parameters())
print(f"{total:,} parameters")Parameter count is the headline size figure for models, though data and training matter too.