"use client"; import { motion } from "framer-motion"; import { COLORS, VizFrame } from "./common"; const ROWS = [ { precision: "FP32", size: 1.0, latency: 1.0, accuracy: 1.0 }, { precision: "FP16", size: 0.5, latency: 0.55, accuracy: 0.997 }, { precision: "INT8", size: 0.25, latency: 0.32, accuracy: 0.984 }, ]; export function QuantizationBar({ width = 720, height = 380, }: { width?: number; height?: number; }) { const padX = 100; const rowH = 70; const offsetY = 60; const innerW = width - padX * 1.2 - 40; return ( model size · latency · accuracy {ROWS.map((r, i) => { const y = offsetY + i * rowH; return ( {r.precision} {[ { v: r.size, color: COLORS.accent, label: "size" }, { v: r.latency, color: COLORS.honey, label: "latency" }, { v: r.accuracy, color: COLORS.green, label: "accuracy" }, ].map((m, j) => ( {m.label}: {(m.v * 100).toFixed(0)}% ))} ); })} ); }