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

Method get_pivot

llm_analysis/analysis.py:232–242  ·  view source on GitHub ↗

Return the pivot point, defined as (model_weights / hbm_bandwidth) / (model_flops / TFLOPS_per_gpu) Returns: float: pivot point

(self)

Source from the content-addressed store, hash-verified

230 return gemm_TFOPS * self.flops_efficiency
231
232 def get_pivot(self) -> float:
233 """Return the pivot point, defined as (model_weights / hbm_bandwidth) /
234 (model_flops / TFLOPS_per_gpu)
235
236 Returns:
237 float: pivot point
238 """
239 pivot = (self.get_TFLOPS_per_gpu() * 10**3 *
240 self.dtype_config.activation_bits / BITS_PER_BYTE /
241 self.get_gpu_hbm_bandwidth() / 2)
242 return pivot
243
244 def get_num_params_embedding(self, shared_embedding: bool = True) -> int:
245 """Get the number of parameters in the embedding layer.

Callers 1

inferenceMethod · 0.95

Calls 2

get_TFLOPS_per_gpuMethod · 0.95
get_gpu_hbm_bandwidthMethod · 0.95

Tested by

no test coverage detected