Skip to content

Commit 63c0d3e

Browse files
author
jetstream authors
committed
Merge pull request #264 from AI-Hypercomputer:yuyan-upload-manifest
PiperOrigin-RevId: 753634980
2 parents 58abceb + 424d52d commit 63c0d3e

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/workflows/run_maxtext_jetstream_tests.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,17 @@ jobs:
4343
runs-on: ["self-hosted", "tpu", "v6e-8"]
4444
env:
4545
LOCAL_IMAGE_TAG: jetstream-maxtext-stable-stack/tpu:github_${{ github.run_id }}
46+
OUTPUT_DIR: /output_dir
47+
outputs:
48+
manifest_name: ${{ steps.copy_build_manifest.outputs.manifest_name }}
4649
steps:
4750
- uses: actions/checkout@v4
4851
- name: Authenticate gcloud
4952
run: gcloud auth configure-docker gcr.io --quiet
53+
- name: Prepare output directory
54+
run: |
55+
rm -rf ${OUTPUT_DIR}
56+
mkdir -p ${OUTPUT_DIR}
5057
- name: Build
5158
run: |
5259
pushd experimental/jetstream-maxtext-stable-stack
@@ -64,6 +71,19 @@ jobs:
6471
UPLOAD_IMAGE_TAG=gcr.io/cloud-ml-auto-solutions/${LOCAL_IMAGE_TAG}
6572
docker tag ${LOCAL_IMAGE_TAG} ${UPLOAD_IMAGE_TAG}
6673
docker push ${UPLOAD_IMAGE_TAG}
74+
- name: Copy build manifest
75+
id: copy_build_manifest
76+
run: |
77+
TEMP_CONTAINER_ID=$(docker create ${LOCAL_IMAGE_TAG} bash -c 'ls jetstream_maxtext_manifest*')
78+
MANIFEST_NAME=$(docker start -a $TEMP_CONTAINER_ID)
79+
docker cp $TEMP_CONTAINER_ID:/jetstream_maxtext_stable_stack/$MANIFEST_NAME ${OUTPUT_DIR}
80+
docker rm $TEMP_CONTAINER_ID
81+
echo "manifest_name=${MANIFEST_NAME}" >> $GITHUB_OUTPUT
82+
- name: Upload build artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: build_manifest
86+
path: ${{ env.OUTPUT_DIR }}
6787

6888
benchmark_report:
6989
name: Benchmark Report
@@ -147,14 +167,22 @@ jobs:
147167
runs-on: ["self-hosted", "tpu", "v6e-8"]
148168
env:
149169
BENCHMARK_REPORT_DIR: ./benchmark_report
170+
BUILD_MANIFEST_DIR: ./build_manifest
150171
steps:
151172
- name: Clean previous artifact
152-
run: rm -rf ${{ env.BENCHMARK_REPORT_DIR }}
173+
run: |
174+
rm -rf ${{ env.BENCHMARK_REPORT_DIR }}
175+
rm -rf ${{ env.BUILD_MANIFEST_DIR }}
153176
- name: Download benchmark artifact
154177
uses: actions/download-artifact@v4
155178
with:
156179
name: benchmark_report
157180
path: ${{ env.BENCHMARK_REPORT_DIR }}
181+
- name: Download build manifest
182+
uses: actions/download-artifact@v4
183+
with:
184+
name: build_manifest
185+
path: ${{ env.BUILD_MANIFEST_DIR }}
158186
- name: Check whether one of the jobs failed
159187
if: ${{ failure() }}
160188
uses: jayqi/failed-build-issue-action@1a893bbf43ef1c2a8705e2b115cd4f0fe3c5649b # v1.2.0
@@ -174,5 +202,5 @@ jobs:
174202
175203
from: JetStream Runs
176204
secure: true
177-
attachments: ${{ env.BENCHMARK_REPORT_DIR }}/moe_8x7b.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x22b.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x22b_long_context_8k_prefill.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x7b_jetstream.txt,${{ env.BENCHMARK_REPORT_DIR }}/llama_70b_jetstream.txt
205+
attachments: ${{ env.BUILD_MANIFEST_DIR }}/${{ needs.build_stable_stack.outputs.manifest_name }},${{ env.BENCHMARK_REPORT_DIR }}/moe_8x7b.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x22b.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x22b_long_context_8k_prefill.txt,${{ env.BENCHMARK_REPORT_DIR }}/moe_8x7b_jetstream.txt,${{ env.BENCHMARK_REPORT_DIR }}/llama_70b_jetstream.txt
178206
body: workflow for ${{github.repository}} completed successfully!

.github/workflows/test_llama_benchmarks.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ export WEIGHT_DTYPE=bfloat16
1919
export PER_DEVICE_BATCH_SIZE=54
2020
export LOAD_PARAMETERS_PATH=gs://jetstream-runner/llama-70B-int8/int8_
2121

22-
python MaxText/maxengine_server.py MaxText/configs/base.yml tokenizer_path=${TOKENIZER_PATH} load_parameters_path=${LOAD_PARAMETERS_PATH} max_prefill_predict_length=${MAX_PREFILL_PREDICT_LENGTH} max_target_length=${MAX_TARGET_LENGTH} model_name=${MODEL_NAME} ici_fsdp_parallelism=${ICI_FSDP_PARALLELISM} ici_autoregressive_parallelism=${ICI_AUTOREGRESSIVE_PARALLELISM} ici_tensor_parallelism=${ICI_TENSOR_PARALLELISM} scan_layers=${SCAN_LAYERS} weight_dtype=${WEIGHT_DTYPE} per_device_batch_size=${PER_DEVICE_BATCH_SIZE} checkpoint_is_quantized=True quantization=int8 quantize_kvcache=True enable_jax_profiler=True &
22+
python -m MaxText.maxengine_server MaxText/configs/base.yml tokenizer_path=${TOKENIZER_PATH} load_parameters_path=${LOAD_PARAMETERS_PATH} max_prefill_predict_length=${MAX_PREFILL_PREDICT_LENGTH} max_target_length=${MAX_TARGET_LENGTH} model_name=${MODEL_NAME} ici_fsdp_parallelism=${ICI_FSDP_PARALLELISM} ici_autoregressive_parallelism=${ICI_AUTOREGRESSIVE_PARALLELISM} ici_tensor_parallelism=${ICI_TENSOR_PARALLELISM} scan_layers=${SCAN_LAYERS} weight_dtype=${WEIGHT_DTYPE} per_device_batch_size=${PER_DEVICE_BATCH_SIZE} checkpoint_is_quantized=True quantization=int8 quantize_kvcache=True enable_jax_profiler=True &
2323

2424
sleep 800
2525

26+
cd ..
27+
2628
python JetStream/benchmarks/benchmark_serving.py --tokenizer maxtext/assets/tokenizer.llama2 --save-result --save-request-outputs --request-outputs-file-path outputs.json --num-prompts 1200 --max-output-length 1024 --dataset openorca --run-eval True > ${OUTPUT_DIR}/llama_70b_jetstream.txt
2729
tail -n25 ${OUTPUT_DIR}/llama_70b_jetstream.txt > ${OUTPUT_DIR}/llama_70b_jetstream.tmp && mv ${OUTPUT_DIR}/llama_70b_jetstream.tmp ${OUTPUT_DIR}/llama_70b_jetstream.txt
2830

0 commit comments

Comments
 (0)