import type { LoraCheckpoint } from "../types"; interface LoraCheckpointsCardProps { checkpoints: LoraCheckpoint[]; } function formatBytes(bytes: number): string { if (!bytes) return "0 MB"; return `${(bytes / 1024 / 1024).toFixed(1)} MB`; } function formatStep(step?: number | null): string { if (typeof step !== "number") return "unknown"; return step.toLocaleString(); } export function LoraCheckpointsCard({ checkpoints }: LoraCheckpointsCardProps) { if (checkpoints.length === 0) return null; return (

LoRA Checkpoints

Saved training weights available for testing

{checkpoints.length} files
{checkpoints.map((checkpoint) => (
Step {formatStep(checkpoint.step)}

{checkpoint.name}

{formatBytes(checkpoint.size_bytes)} {new Date(checkpoint.modified_at).toLocaleTimeString()}
))}
); }