Skip to content

Why do I get different model n_params and size results for the same model in macOS and Linux? #10274

Closed Answered by slaren
shakfu asked this question in Q&A
Discussion options

You must be logged in to vote

The number of parameters and model size is calculated from the tensors allocated after the model is loaded, which in some cases when using some backends may contain some duplicated tensors (eg. when the model shares the same tensor for tok_embd and output), so the parameters of these tensors are counted twice. It is a bug, but it should be a simple fix to count only the tensors from the gguf file.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@shakfu
Comment options

Answer selected by shakfu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants