MCPcopy Create free account
hub / github.com/cli99/llm-analysis / get_num_params_total

Method get_num_params_total

llm_analysis/analysis.py:327–337  ·  view source on GitHub ↗

Get the total number of parameters in the model, including all the transformer layers and the embedding layer. Returns: int: the total number of parameters in the model

(self)

Source from the content-addressed store, hash-verified

325 self.get_num_params_per_layer_layernorm())
326
327 def get_num_params_total(self) -> int:
328 """Get the total number of parameters in the model, including all the
329 transformer layers and the embedding layer.
330
331 Returns:
332 int: the total number of parameters in the model
333 """
334 return (
335 self.model_config.num_layers * self.get_num_params_per_layer() +
336 self.get_num_params_embedding() +
337 self.get_num_params_last_layernorm())
338
339 def get_num_active_params_total(self) -> int:
340 """Get the total number of parameters in the model, including all the

Callers 1

__init__Method · 0.95

Tested by

no test coverage detected