Skip to content

Commit eb8acb1

Browse files
committed
wip
1 parent fb4abd2 commit eb8acb1

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

.dockerignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
optimum-benchmark
2-
31
**/*.pyc
42
**/*.pyo
53
**/*.mo
@@ -8,7 +6,7 @@ optimum-benchmark
86
**/__pycache__/
97
Dockerfile
108
db.sqlite3
11-
**/*.md
9+
1210
build
1311
.venv
1412
ruff_cache
@@ -21,3 +19,5 @@ ruff_cache
2119
*.rar
2220
*.7z
2321
*.iso
22+
23+

docker/cpu-openvino/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@ FROM ghcr.io/huggingface/optimum-benchmark:latest-cpu
22

33
WORKDIR /workspace
44

5+
# Copy the entire "optimum-benchmark" directory into the container
6+
COPY optimum-benchmark /workspace/optimum-benchmark
7+
8+
# Install the package in editable mode with extras
9+
RUN pip install -e /workspace/optimum-benchmark[openvino]
10+
11+
WORKDIR /workspace
12+
513
COPY setup.py .
614
# COPY pyproject.toml .
715

816
RUN pip install -e .[openvino]
917

1018
COPY . .
1119

20+
ENV DEBUG_MODE=1
21+
1222
CMD ["llm-perf", "run-benchmark", "--hardware", "cpu", "--backend", "openvino"]

llm_perf/benchmark_runners/cpu/update_llm_perf_cpu_openvino.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ def get_benchmark_config(self, model: str, **kwargs) -> BenchmarkConfig:
6767
backend_config = OVConfig(
6868
model=model,
6969
device="cpu",
70-
device_ids="0",
7170
no_weights=True,
7271
library="transformers",
7372
task="text-generation",
7473
quantization_config=quant_config,
7574
model_kwargs={"trust_remote_code": True},
75+
reshape=True,
76+
export=True,
7677
)
7778

7879
return BenchmarkConfig(

llm_perf/common/benchmark_runner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def is_benchmark_conducted(self, push_repo_id, subfolder):
9595
report = BenchmarkReport.from_pretrained(
9696
repo_id=push_repo_id, subfolder=subfolder
9797
)
98+
print(report.to_dict())
9899
if "traceback" in report.to_dict():
99100
return False
100101
else:

llm_perf/common/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
from llm_perf.common.dependency import get_benchmark_top_n, is_debug_mode
44

5-
INPUT_SHAPES = {"batch_size": 1, "sequence_length": 256}
5+
INPUT_SHAPES = {"batch_size": 1, "sequence_length": 128}
66
GENERATE_KWARGS = {"max_new_tokens": 64, "min_new_tokens": 64}
77

8-
98
OPEN_LLM_LEADERBOARD = pd.read_csv(
109
"hf://datasets/optimum-benchmark/llm-perf-leaderboard/llm-df.csv"
1110
)
@@ -52,7 +51,7 @@ def get_top_llm_list(n: int = 10) -> list[str]:
5251

5352

5453
if is_debug_mode():
55-
CANONICAL_PRETRAINED_OPEN_LLM_LIST = ["bigscience/bloomz-560m"]
54+
CANONICAL_PRETRAINED_OPEN_LLM_LIST = ["meta-llama/Llama-3.1-8B-Instruct"]
5655
else:
5756
CANONICAL_PRETRAINED_OPEN_LLM_LIST = get_top_llm_list(n=get_benchmark_top_n())
5857
print(

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"huggingface_hub[hf_transfer]",
1515
"datasets>=2.14.6",
1616
"beautifulsoup4",
17-
"optimum-benchmark @ git+https://github.com/huggingface/optimum-benchmark.git",
17+
# "optimum-benchmark @ git+https://github.com/huggingface/optimum-benchmark.git",
1818
]
1919

2020
# Optional dependencies
@@ -25,7 +25,7 @@
2525
"optimum-benchmark[onnxruntime] @ git+https://github.com/huggingface/optimum-benchmark.git",
2626
],
2727
"openvino": [
28-
"optimum-benchmark[openvino] @ git+https://github.com/huggingface/optimum-benchmark.git"
28+
# "optimum-benchmark[openvino] @ git+https://github.com/huggingface/optimum-benchmark.git"
2929
],
3030
"cuda": [
3131
"flash-attn",

0 commit comments

Comments
 (0)