Skip to content

Commit 73e8373

Browse files
committed
Another round
Signed-off-by: Huy Do <huydhn@gmail.com>
1 parent 577c1ab commit 73e8373

2 files changed

Lines changed: 38 additions & 22 deletions

File tree

.github/scripts/gpt-oss/run_accuracy_checks.sh

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,38 @@ mkdir -p /tmp/gpqa_openai
4444

4545
# Not sure why this is needed on ROCm image
4646
if [[ "${DEVICE_NAME}" == "rocm" ]]; then
47-
export PYTHONPATH=$(pwd)
47+
pushd gpt_oss
48+
# Low
49+
OPENAI_API_KEY="" python3 -mevals --base-url http://localhost:8000/v1 \
50+
--model $MODEL \
51+
--eval gpqa \
52+
--reasoning-effort low \
53+
--n-threads $(expr $(nproc) / 2)
54+
popd
55+
else
56+
sleep 7200
57+
# Low
58+
#OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
59+
# --model $MODEL \
60+
# --eval gpqa \
61+
# --reasoning-effort low \
62+
# --n-threads $(expr $(nproc) / 2)
63+
#
64+
# Mid
65+
#OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
66+
# --model $MODEL \
67+
# --eval gpqa \
68+
# --reasoning-effort medium \
69+
# --n-threads $(expr $(nproc) / 2)
70+
#
71+
## High
72+
#OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
73+
# --model $MODEL \
74+
# --eval gpqa \
75+
# --reasoning-effort high \
76+
# --n-threads $(expr $(nproc) / 2)
4877
fi
4978

50-
# Low
51-
OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
52-
--model $MODEL \
53-
--eval gpqa \
54-
--reasoning-effort low \
55-
--n-threads $(expr $(nproc) / 2)
56-
57-
# Mid
58-
OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
59-
--model $MODEL \
60-
--eval gpqa \
61-
--reasoning-effort medium \
62-
--n-threads $(expr $(nproc) / 2)
63-
64-
# High
65-
OPENAI_API_KEY="" python3 -m gpt_oss.evals --base-url http://localhost:8000/v1 \
66-
--model $MODEL \
67-
--eval gpqa \
68-
--reasoning-effort high \
69-
--n-threads $(expr $(nproc) / 2)
70-
7179
mv /tmp/gpqa_openai .
7280
popd
7381

.github/workflows/gpt-oss-benchmark.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ jobs:
162162
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
163163
fi
164164
165+
# Leaving 1GB for the runner and other things
166+
TOTAL_AVAILABLE_MEMORY_IN_GB=$(awk '/MemTotal/ { printf "%.3f \n", $2/1024/1024 - 1 }' /proc/meminfo)
167+
# https://docs.docker.com/engine/containers/resource_constraints/#--memory-swap-details, the 3GB swap
168+
# comes from https://github.com/pytorch/test-infra/pull/6058
169+
TOTAL_MEMORY_WITH_SWAP=$(("${TOTAL_AVAILABLE_MEMORY_IN_GB%.*}" + 3))
170+
165171
container_name=$(docker run \
166172
${GPU_FLAG:-} \
167173
-e MODEL \
@@ -170,6 +176,8 @@ jobs:
170176
-e HF_TOKEN \
171177
-e ENGINE_VERSION \
172178
-e SAVE_TO_PYTORCH_BENCHMARK_FORMAT \
179+
--memory="${TOTAL_AVAILABLE_MEMORY_IN_GB%.*}g" \
180+
--memory-swap="${TOTAL_MEMORY_WITH_SWAP}g" \
173181
--ipc=host \
174182
--tty \
175183
--detach \

0 commit comments

Comments
 (0)