FLOPs for the fused matmul: 2 * V * D * H.
(vocab_size: int, hidden_size: int, n_hidden_states: float)
| 244 | |
| 245 | |
| 246 | def 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 | |
| 251 | def assign_col_mem_throughput(df: pd.DataFrame, vocab_size: int, hidden_size: int) -> pd.DataFrame: |