flops
flops
¶
FLOPs estimation and Model FLOPs Utilization (MFU) computation.
Functions¶
estimate_flops
¶
Estimate FLOPs for an inference pass.
Uses the 2 * P * T approximation where P = params, T = total tokens. Returns (total_flops, flops_per_token).
Source code in src/openjarvis/telemetry/flops.py
compute_mfu
¶
Compute Model FLOPs Utilization.
MFU = actual_tflops / (peak_tflops * num_gpus)