baptistecolle HF staff commited on
Commit
38a9948
β€’
1 Parent(s): 1b7fb05

fix readme

Browse files
Files changed (2) hide show
  1. README.md +2 -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://github.com/huggingface/optimum-benchmark.git
54
- cd optimum-benchmark
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
- dataset_directory = 'dataset'
113
-
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
 
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