diff --git a/tests/analytical_visualization/app.py b/tests/analytical_visualization/app.py index df07fcb..b151e3c 100644 --- a/tests/analytical_visualization/app.py +++ b/tests/analytical_visualization/app.py @@ -1685,6 +1685,35 @@ def _render_auto_explore_tab(): _df = pd.DataFrame(_rows) st.dataframe(_df, width='stretch', hide_index=True) + # ── Top-N by memory (smallest → largest) ───────────────────── + st.markdown( + "**Top 10 configurations by memory footprint** " + "(smallest HBM% first). Useful when memory pressure is the " + "real binding constraint of your deployment." + ) + _pareto_by_mem = sorted( + _res.pareto_scores, + key=lambda s: (s.hbm_utilization, s.pes_used, s.total_latency_ns), + )[:10] + _mem_rows = [] + for i, s in enumerate(_pareto_by_mem): + _mem_rows.append({ + "#": i, + "HBM %": round(s.hbm_utilization * 100, 1), + "weights (GB)": round(s.weights_gb, 2), + "KV (GB)": round(s.kv_gb, 2), + "PEs": s.pes_used, + "SIPs": s.sips_used, + "lat (ms)": round(s.latency_ms, 3), + "CP": s.cp, "TP": s.tp, "PP": s.pp, "DP": s.dp, + "kv": s.kv_shard_mode, + "ffn": s.ffn_shard_scope, + "tp_place": s.tp_placement, + "cp_place": s.cp_placement, + }) + _df_mem = pd.DataFrame(_mem_rows) + st.dataframe(_df_mem, width='stretch', hide_index=True) + # ── Parallelism sensitivity subplots ────────────────────── st.markdown( "**Parallelism sensitivity** — for the *baseline* config picked "