MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / model_flops

Function model_flops

benchmarking/plot-triton-bench.py:246–248  ·  view source on GitHub ↗

FLOPs for the fused matmul: 2 * V * D * H.

(vocab_size: int, hidden_size: int, n_hidden_states: float)

Source from the content-addressed store, hash-verified

244
245
246def model_flops(vocab_size: int, hidden_size: int, n_hidden_states: float) -> float:
247 """FLOPs for the fused matmul: 2 * V * D * H."""
248 return 2 * vocab_size * hidden_size * int(n_hidden_states)
249
250
251def assign_col_mem_throughput(df: pd.DataFrame, vocab_size: int, hidden_size: int) -> pd.DataFrame:

Callers 1

plot_rooflineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected