Spaces:
Sleeping
Sleeping
File size: 724 Bytes
c0a2ac4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | from tabulate import tabulate
def print_table(results):
rows = []
for item in results:
rows.append([
item["model"],
round(
item["parameters"] / 1_000_000,
2
) if item["parameters"] else None,
item["layers"],
item["hidden_size"],
item["latency_ms"],
item["throughput"]
])
print()
print(
tabulate(
rows,
headers=[
"Model",
"Params(M)",
"Layers",
"Hidden",
"Latency(ms)",
"Throughput"
],
tablefmt="grid"
)
)
|