Skip to content

Instantly share code, notes, and snippets.

@sleepingcat4
Created November 24, 2023 12:56
Show Gist options
  • Save sleepingcat4/6be2393d85591f9da7a543a32456883c to your computer and use it in GitHub Desktop.
Save sleepingcat4/6be2393d85591f9da7a543a32456883c to your computer and use it in GitHub Desktop.
we're counting params using torchscale
total_params = sum(p.numel() for p in model.parameters())
print(f"Total parameters in the model: {total_params}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment