Question about the parameter count

#1
by tokinasin - opened

hi.

I’m trying to understand what "610M" refers to in the name of this model.

I downloaded the checkpoint and summed the element counts from the tensors in model.safetensors.
and this gives a total of 890,344,960 (β‰’890M) parameters.

import json
import struct
from math import prod

with open("model.safetensors", "rb") as f:
    header_size = struct.unpack("<Q", f.read(8))[0]
    header = json.loads(f.read(header_size))

count = sum(
    prod(tensor["shape"])
    for name, tensor in header.items()
    if name != "__metadata__"
)
print(f"{count:,}")  # 890,344,960

Could you clarify how the 610M figure is counted?

I may be missing something, so any clarification would be appreciated. Thanks!

Sign up or log in to comment