Spaces:
Running on Zero
Running on Zero
Download openmodellab/comparison/table.py from ajaygovind/OpenModelLab: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/spaces/ajaygovind/OpenModelLab/resolve/main/openmodellab/comparison/table.py
- Command line
-
hf download hf://spaces/ajaygovind/OpenModelLab/openmodellab/comparison/table.py
-
curl -L -o table.py https://huggingface.co/spaces/ajaygovind/OpenModelLab/resolve/main/openmodellab/comparison/table.py
724 Bytes
| 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" | |
| ) | |
| ) | |