Skip to content

Commit a2887ba

Browse files
authored
Make llama3.1 8b reference runnable by upgrading pytorch version (#894)
Signed-off-by: ShriyaRishab <spalsamudram@nvidia.com>
1 parent aed6a43 commit a2887ba

2 files changed

Lines changed: 4 additions & 36 deletions

File tree

‎small_llm_pretraining/nemo/Dockerfile.h200‎

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# DEALINGS IN THE SOFTWARE.
2020

2121

22-
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:25.01-py3
22+
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:25.04-py3
2323
FROM ${FROM_IMAGE_NAME}
2424

2525
# Document build setup
@@ -29,8 +29,7 @@ ENV CUSTOM_FROM_IMAGE_NAME ${FROM_IMAGE_NAME}
2929
# Custom libraries version
3030
WORKDIR /workspace/
3131

32-
ARG GIT_COMMIT_ID
33-
ENV GIT_COMMIT_ID=$GIT_COMMIT_ID
32+
ENV PIP_CONSTRAINT=""
3433

3534
RUN git config --global user.name "a" && \
3635
git config --global user.email "a"
@@ -51,38 +50,6 @@ ENV PIP_CONSTRAINT=/pip_torch_constraint.txt
5150

5251
RUN pip install numcodecs==0.13.1
5352

54-
## 1. Apex
55-
ARG APEX_REVISION=SKIP
56-
ENV CUSTOM_APEX_REVISION ${APEX_REVISION}
57-
ARG APEX_MAX_JOBS=4
58-
59-
RUN if [ "${APEX_REVISION}" != SKIP ]; then \
60-
git clone https://github.com/NVIDIA/apex && \
61-
cd apex && \
62-
echo APEX_REVISION=${APEX_REVISION} && \
63-
git checkout ${APEX_REVISION} && \
64-
echo APEX_COMMIT_HASH=$(git rev-parse HEAD) && \
65-
MAX_JOBS=${APEX_MAX_JOBS} NVCC_APPEND_FLAGS="--threads 8" pip install -v --no-build-isolation --no-cache-dir --disable-pip-version-check --config-settings "--build-option=--cpp_ext --cuda_ext --bnp --xentropy --deprecated_fused_adam --deprecated_fused_lamb --fast_multihead_attn --distributed_lamb --fast_layer_norm --transducer --distributed_adam --fmha --fast_bottleneck --nccl_p2p --peer_memory --permutation_search --focal_loss --fused_conv_bias_relu --index_mul_2d --cudnn_gbn --group_norm" . \
66-
; fi
67-
68-
69-
70-
## 2. Transformer Engine
71-
ARG TE_REVISION=SKIP
72-
ENV CUSTOM_TE_REVISION ${TE_REVISION}
73-
74-
RUN if [ "${TE_REVISION}" != SKIP ]; then \
75-
pip uninstall -y transformer-engine && \
76-
git clone https://github.com/NVIDIA/TransformerEngine.git transformerengine && \
77-
cd transformerengine && \
78-
git checkout ${TE_REVISION} && \
79-
echo TE_COMMIT_HASH=$(git rev-parse HEAD) && \
80-
echo $(git rev-parse HEAD) > /TE_COMMIT_HASH.env && \
81-
git submodule init && git submodule update && \
82-
NVTE_CUDA_ARCHS="90;100" NVTE_UB_WITH_MPI=1 NVTE_FRAMEWORK=pytorch MPI_HOME=/usr/local/mpi pip install --force-reinstall --no-deps . \
83-
; fi
84-
85-
8653
## 3. NeMo
8754
ARG NEMO_REVISION=v2.1.0
8855
ENV CUSTOM_NEMO_REVISION ${NEMO_REVISION}
@@ -132,6 +99,7 @@ RUN if [ "${MCORE_REVISION}" != SKIP ]; then \
13299
git checkout ${MCORE_REVISION} && \
133100
echo MCORE_COMMIT_HASH=$(git rev-parse HEAD) && \
134101
echo $(git rev-parse HEAD) > /MCORE_COMMIT_HASH.env && \
102+
sed -i "/triton/d" requirements/pytorch_24.10/requirements.txt && \
135103
pip install . && \
136104
cd megatron/core/datasets && \
137105
make \

‎small_llm_pretraining/nemo/run_llama31.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if [ $TENSOR_PARALLEL_SIZE -gt 0 ]; then
123123
fi
124124

125125
# Allows MLLogger objects to be constructed locally
126-
if [ ! -d /mlperf-outputs ]; then mkdir /mlperf-outputs; fi
126+
if [ ! -d "${LOCAL_MLPERF_OUTPUTS}" ]; then mkdir -p "${LOCAL_MLPERF_OUTPUTS}"; fi
127127

128128
set -x
129129

0 commit comments

Comments
 (0)