Skip to content

Commit 3271566

Browse files
committed
Show sub-billion model sizes in millions instead of rounding to 0B
1 parent d139251 commit 3271566

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

render_tables.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ def fmt_params(row) -> str:
3333
if params_b is None:
3434
return "—"
3535
mem = f"{memory_gb:.1f}GB" if memory_gb is not None else "?"
36-
return f"{params_b:.0f}B ({mem})"
36+
if params_b < 1:
37+
size = f"{params_b * 1000:.0f}M"
38+
else:
39+
size = f"{params_b:.0f}B"
40+
return f"{size} ({mem})"
3741

3842

3943
def render(json_path: Path, template_path: Path, out: Path) -> None:

0 commit comments

Comments
 (0)