-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iluvatar] add TG200 llama3_8B test case #780
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,2 @@ | ||
FROM ubuntu:20.04 | ||
FROM flagperf:bi200 | ||
|
||
# copy /etc/apt/sources.list . or choose an available one if encountering a problem with the mirror source | ||
# ADD sources.list /etc/apt/ | ||
|
||
RUN /bin/bash -c "source /root/.bashrc" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV PATH /root/miniconda/bin:$PATH | ||
|
||
RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#' /etc/apt/sources.list | ||
RUN apt-get update -y | ||
RUN apt-get install -y --fix-missing \ | ||
apt-utils \ | ||
sudo \ | ||
openssh-server \ | ||
vim \ | ||
git \ | ||
curl \ | ||
wget \ | ||
tree \ | ||
perl \ | ||
kmod \ | ||
make \ | ||
pciutils \ | ||
build-essential \ | ||
python3.10-dev \ | ||
python3-pip \ | ||
libjpeg-dev \ | ||
zlib1g-dev \ | ||
unzip \ | ||
cmake \ | ||
bzip2 \ | ||
cabextract \ | ||
iputils-ping \ | ||
pbzip2 \ | ||
pv \ | ||
numactl \ | ||
ninja-build \ | ||
gcc-7 \ | ||
g++-7 \ | ||
libncursesw5 | ||
|
||
# Configure anaconda | ||
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py310_4.10.3-Linux-x86_64.sh && \ | ||
bash ./Miniconda3-py310_4.10.3-Linux-x86_64.sh -b -p /root/miniconda && \ | ||
/root/miniconda/bin/conda clean -tipsy && \ | ||
ln -s /root/miniconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | ||
echo ". /root/miniconda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | ||
echo "conda activate base" >> ~/.bashrc && \ | ||
conda config --set always_yes yes --set changeps1 no && \ | ||
echo 'LD_LIBRARY_PATH="/usr/local/corex/lib:${LD_LIBRARY_PATH}"' >> ~/.bashrc && \ | ||
echo 'PATH="/usr/local/corex/bin:${PATH}"' >> ~/.bashrc | ||
|
||
RUN /bin/bash -c "apt-get install -y linux-headers-`uname -r`" | ||
|
||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 10 --slave /usr/bin/g++ g++ /usr/bin/g++-7 | ||
|
||
RUN /bin/bash -c "pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple" | ||
|
||
ENV LD_LIBRARY_PATH="/usr/local/corex/lib:${LD_LIBRARY_PATH}" | ||
ENV PATH="/usr/local/corex/bin:${PATH}" | ||
ENV NVCC_ARGUMENTS="-U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -ftemplate-depth=1024" |
7 changes: 7 additions & 0 deletions
7
training/iluvatar/llama3_8B-megatron/config/config_TG-V200x1x16.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tokenizer_path = "/home/zhiyuan/test/llama3-8b/tokenizer.model" | ||
localbs = 1 #micro-batch-size | ||
train_steps = 300 ##训练迭代次数 | ||
theoryflops = 276000000000000.0 ##由于测试环境功率限制,设定较低主频,限制理论算力上限,与官方标称算力不一致 | ||
megatron_path = "/usr/local/lib/python3.10/dist-packages/megatron" # need to be aligned with DockerFile. In NGCtorch, it's /workspace/ + Megatron-LM | ||
tensor_parallel = 1 | ||
pipeline_parallel = 4 |
17 changes: 17 additions & 0 deletions
17
training/iluvatar/llama3_8B-megatron/config/training_adapter.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
echo "[Prompt] iluvatar adaption is not NULL, for other Vendors" | ||
export PYTHONPATH=/usr/local/lib/python3.10/dist-packages | ||
export CUDA_DEVICE_MAX_CONNECTIONS=1 | ||
export NCCL_NET_SHARED_BUFFERS=0 | ||
export NCCL_ALGO=Ring | ||
export OMP_NUM_THREADS=4 | ||
export ENABLE_FLASH_ATTENTION_WITH_IXDNN=1 | ||
VENDOR_ARGS=" \ | ||
--transformer-impl transformer_engine \ | ||
--use-distributed-optimizer \ | ||
--use-flash-attn \ | ||
--untie-embeddings-and-output-weights \ | ||
--no-create-attention-mask-in-dataloader \ | ||
--use-legacy-models \ | ||
--num-layers-per-stage 1 7 2 9 1 7 \ | ||
--disable-bias-linear \ | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
# Set accelerator's vendor name, e.g. iluvatar, cambricon, kunlunxin, ascend, mthreads, metax and dcu. | ||
# We will run benchmarks in training/<vendor> | ||
VENDOR = "nvidia" | ||
VENDOR = "iluvatar" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 请不要修改示例 vendor |
||
|
||
# Accelerator options for docker. TODO FIXME support more accelerators. | ||
# possible value of ACCE_CONTAINER_OPT are: | ||
|
@@ -25,7 +25,8 @@ | |
# " --device=/dev/infiniband --device=/dev/dri --device=/dev/mxcd --group-add video" | ||
# dcu: | ||
# "-v /opt/hyhal/:/opt/hyhal/ --device=/dev/kfd --device=/dev/dri/ --group-add video" | ||
ACCE_CONTAINER_OPT = " --gpus all" | ||
ACCE_CONTAINER_OPT = " --privileged --pid=host --ipc=host --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules -v /mnt:/mnt -v /usr/src:/usr/src -v /home:/home " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
|
||
# XXX_VISIBLE_DEVICE item name in env | ||
# possible value of ACCE_VISIBLE_DEVICE_ENV_NAME are: | ||
# CUDA_VISIBLE_DEVICES for nvidia, iluvatar | ||
|
@@ -42,7 +43,8 @@ | |
# The path that flagperf deploy in the cluster. | ||
# Users must set FLAGPERF_PATH to where flagperf deploy | ||
# You can assume the preset "/home/FlagPerf/training" points to Null | ||
FLAGPERF_PATH = "/home/FlagPerf/training" | ||
FLAGPERF_PATH = "/home/zhiyuan/FlagPerf/training" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
|
||
# Set log path on the host here. | ||
FLAGPERF_LOG_PATH = FLAGPERF_PATH + "/result/" | ||
|
||
|
@@ -169,6 +171,7 @@ | |
# "llava1.5_13b:deepspeed-torch:BI-V150:1:16:1": "/raid/dataset/llava1.5_13b", | ||
# "mixtral_8x7B:megatron:BI-V150:4:16:1": "/raid/dataset/mixtral_8x7B", ##单机测试 | ||
# "mixtral_8x7B:megatron:BI-V150:1:16:1": "/raid/dataset/mixtral_8x7B", ##四机测试 | ||
"llama3_8B:megatron:TG-V200:1:16:1": "/datasets", ##单机测试 | ||
|
||
# mthreads cases | ||
# "resnet50:pytorch_2.0:S4000:1:8:1": "/data/flagperf/ImageNet", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请不要修改示例 hosts