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

Method get_num_active_params_total

llm_analysis/analysis.py:339–349  ·  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

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
341 transformer layers and the embedding layer.
342
343 Returns:
344 int: the total number of parameters in the model
345 """
346 return (self.model_config.num_layers *
347 self.get_num_active_params_per_layer() +
348 self.get_num_params_embedding() +
349 self.get_num_params_last_layernorm())
350
351 def get_weight_memory_per_layer(
352 self,

Callers 1

__init__Method · 0.95

Tested by

no test coverage detected