Spaces:
Running
Running
Commit
β’
38a9948
1
Parent(s):
1b7fb05
fix readme
Browse files- README.md +2 -2
- src/llm_perf.py +7 -7
README.md
CHANGED
@@ -50,8 +50,8 @@ To run the LLM-Perf Leaderboard locally on your machine, follow these steps:
|
|
50 |
First, clone the repository to your local machine:
|
51 |
|
52 |
```bash
|
53 |
-
git clone https://
|
54 |
-
cd
|
55 |
```
|
56 |
|
57 |
### 2. Install the Required Dependencies
|
|
|
50 |
First, clone the repository to your local machine:
|
51 |
|
52 |
```bash
|
53 |
+
git clone https://huggingface.co/spaces/optimum/llm-perf-leaderboard
|
54 |
+
cd llm-perf-leaderboard
|
55 |
```
|
56 |
|
57 |
### 2. Install the Required Dependencies
|
src/llm_perf.py
CHANGED
@@ -4,6 +4,8 @@ import pandas as pd
|
|
4 |
|
5 |
from .utils import process_kernels, process_quantizations
|
6 |
|
|
|
|
|
7 |
COLUMNS_MAPPING = {
|
8 |
"config.name": "Experiment π§ͺ",
|
9 |
"config.backend.model": "Model π€",
|
@@ -109,16 +111,14 @@ def processed_llm_perf_df(llm_perf_df):
|
|
109 |
|
110 |
|
111 |
def get_llm_perf_df(machine: str = "1xA10"):
|
112 |
-
|
113 |
-
|
114 |
-
if not os.path.exists(dataset_directory):
|
115 |
-
os.makedirs(dataset_directory)
|
116 |
|
117 |
-
if os.path.exists(f"{
|
118 |
-
llm_perf_df = pd.read_csv(f"{
|
119 |
else:
|
120 |
llm_perf_df = get_raw_llm_perf_df(machine)
|
121 |
llm_perf_df = processed_llm_perf_df(llm_perf_df)
|
122 |
-
llm_perf_df.to_csv(f"{
|
123 |
|
124 |
return llm_perf_df
|
|
|
4 |
|
5 |
from .utils import process_kernels, process_quantizations
|
6 |
|
7 |
+
DATASET_DIRECTORY = "dataset"
|
8 |
+
|
9 |
COLUMNS_MAPPING = {
|
10 |
"config.name": "Experiment π§ͺ",
|
11 |
"config.backend.model": "Model π€",
|
|
|
111 |
|
112 |
|
113 |
def get_llm_perf_df(machine: str = "1xA10"):
|
114 |
+
if not os.path.exists(DATASET_DIRECTORY):
|
115 |
+
os.makedirs(DATASET_DIRECTORY)
|
|
|
|
|
116 |
|
117 |
+
if os.path.exists(f"{DATASET_DIRECTORY}/llm-perf-leaderboard-{machine}.csv"):
|
118 |
+
llm_perf_df = pd.read_csv(f"{DATASET_DIRECTORY}/llm-perf-leaderboard-{machine}.csv")
|
119 |
else:
|
120 |
llm_perf_df = get_raw_llm_perf_df(machine)
|
121 |
llm_perf_df = processed_llm_perf_df(llm_perf_df)
|
122 |
+
llm_perf_df.to_csv(f"{DATASET_DIRECTORY}/llm-perf-leaderboard-{machine}.csv", index=False)
|
123 |
|
124 |
return llm_perf_df
|