diff --git a/nlp/llm/chatglm-6b/deepspeed/README.md b/nlp/llm/chatglm-6b/deepspeed/README.md index 07b4cb99b1d8c2dc23555b5989a6ab4f2c05af8f..a8ce2bfe211d43cca8334605e2b82aae5ebd7b2c 100644 --- a/nlp/llm/chatglm-6b/deepspeed/README.md +++ b/nlp/llm/chatglm-6b/deepspeed/README.md @@ -32,7 +32,7 @@ cd ../ && rm -rf Python-3.7.9* ### Install DeepSpeed ChatGLM-6B model is using DeepSpeed toolbox. Before you run this model, you need to install DeepSpeed first. ```shell -pushd ../../../../toolbox/DeepSpeed/ +pushd ../../../../toolbox/DeepSpeed/v0.9.2/ bash install_toolbox_deepspeed.sh popd ``` diff --git a/nlp/llm/llama-7b/colossalai/README.md b/nlp/llm/llama-7b/colossalai/README.md index 6ca02fafa92802e47114171aa1bda82e08ea6716..26fcc5f98d09c8fc3ef8cee3c5dade9500f546bf 100644 --- a/nlp/llm/llama-7b/colossalai/README.md +++ b/nlp/llm/llama-7b/colossalai/README.md @@ -14,7 +14,7 @@ Coati stands for ColossalAI Talking Intelligence. It is the name for the module LLaMA-7B model is using ColossalAI toolbox. Before you run this model, you need to setup ColossalAI first. ```shell -cd ../../../../toolbox/ColossalAI/ +cd ../../../../toolbox/ColossalAI/v0.3.0/ bash install_toolbox_colossalai.sh ``` diff --git a/toolbox/ColossalAI/install_toolbox_colossalai.sh b/toolbox/ColossalAI/v0.3.0/install_toolbox_colossalai.sh similarity index 100% rename from toolbox/ColossalAI/install_toolbox_colossalai.sh rename to toolbox/ColossalAI/v0.3.0/install_toolbox_colossalai.sh diff --git a/toolbox/ColossalAI/patch/applications/Chat/coati/trainer/sft.py b/toolbox/ColossalAI/v0.3.0/patch/applications/Chat/coati/trainer/sft.py similarity index 100% rename from toolbox/ColossalAI/patch/applications/Chat/coati/trainer/sft.py rename to toolbox/ColossalAI/v0.3.0/patch/applications/Chat/coati/trainer/sft.py diff --git a/toolbox/ColossalAI/patch/colossalai/engine/schedule/_pipeline_schedule.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/engine/schedule/_pipeline_schedule.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/engine/schedule/_pipeline_schedule.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/engine/schedule/_pipeline_schedule.py diff --git a/toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/general_kernels.cu b/toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/general_kernels.cu similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/general_kernels.cu rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/general_kernels.cu diff --git a/toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/normalize_kernels.cu b/toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/normalize_kernels.cu similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/normalize_kernels.cu rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/normalize_kernels.cu diff --git a/toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/transform_kernels.cu b/toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/transform_kernels.cu similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/kernels/transform_kernels.cu rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/kernels/transform_kernels.cu diff --git a/toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp b/toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp diff --git a/toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h b/toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h diff --git a/toolbox/ColossalAI/patch/colossalai/nn/layer/parallel_1d/layers.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/nn/layer/parallel_1d/layers.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/nn/layer/parallel_1d/layers.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/nn/layer/parallel_1d/layers.py diff --git a/toolbox/ColossalAI/patch/colossalai/pipeline/pipelinable.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/pipeline/pipelinable.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/pipeline/pipelinable.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/pipeline/pipelinable.py diff --git a/toolbox/ColossalAI/patch/colossalai/pipeline/utils.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/pipeline/utils.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/pipeline/utils.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/pipeline/utils.py diff --git a/toolbox/ColossalAI/patch/colossalai/trainer/hooks/_log_hook.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/trainer/hooks/_log_hook.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/trainer/hooks/_log_hook.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/trainer/hooks/_log_hook.py diff --git a/toolbox/ColossalAI/patch/colossalai/trainer/hooks/_metric_hook.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/trainer/hooks/_metric_hook.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/trainer/hooks/_metric_hook.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/trainer/hooks/_metric_hook.py diff --git a/toolbox/ColossalAI/patch/colossalai/zero/low_level/_utils.py b/toolbox/ColossalAI/v0.3.0/patch/colossalai/zero/low_level/_utils.py similarity index 100% rename from toolbox/ColossalAI/patch/colossalai/zero/low_level/_utils.py rename to toolbox/ColossalAI/v0.3.0/patch/colossalai/zero/low_level/_utils.py diff --git a/toolbox/ColossalAI/patch/op_builder/cpu_adam.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/cpu_adam.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/cpu_adam.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/cpu_adam.py diff --git a/toolbox/ColossalAI/patch/op_builder/fused_optim.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/fused_optim.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/fused_optim.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/fused_optim.py diff --git a/toolbox/ColossalAI/patch/op_builder/layernorm.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/layernorm.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/layernorm.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/layernorm.py diff --git a/toolbox/ColossalAI/patch/op_builder/moe.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/moe.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/moe.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/moe.py diff --git a/toolbox/ColossalAI/patch/op_builder/multi_head_attn.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/multi_head_attn.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/multi_head_attn.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/multi_head_attn.py diff --git a/toolbox/ColossalAI/patch/op_builder/scaled_masked_softmax.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/scaled_masked_softmax.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/scaled_masked_softmax.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/scaled_masked_softmax.py diff --git a/toolbox/ColossalAI/patch/op_builder/scaled_upper_triangle_masked_softmax.py b/toolbox/ColossalAI/v0.3.0/patch/op_builder/scaled_upper_triangle_masked_softmax.py similarity index 100% rename from toolbox/ColossalAI/patch/op_builder/scaled_upper_triangle_masked_softmax.py rename to toolbox/ColossalAI/v0.3.0/patch/op_builder/scaled_upper_triangle_masked_softmax.py diff --git a/toolbox/ColossalAI/patch/requirements/requirements.txt b/toolbox/ColossalAI/v0.3.0/patch/requirements/requirements.txt similarity index 100% rename from toolbox/ColossalAI/patch/requirements/requirements.txt rename to toolbox/ColossalAI/v0.3.0/patch/requirements/requirements.txt diff --git a/toolbox/ColossalAI/patch/setup.py b/toolbox/ColossalAI/v0.3.0/patch/setup.py similarity index 100% rename from toolbox/ColossalAI/patch/setup.py rename to toolbox/ColossalAI/v0.3.0/patch/setup.py diff --git a/toolbox/DeepSpeed/v0.9.2/install_toolbox_deepspeed.sh b/toolbox/DeepSpeed/v0.9.2/install_toolbox_deepspeed.sh new file mode 100644 index 0000000000000000000000000000000000000000..5e17e3d0184a8291ba567d4489ec21a39edf0b07 --- /dev/null +++ b/toolbox/DeepSpeed/v0.9.2/install_toolbox_deepspeed.sh @@ -0,0 +1,23 @@ +# Copyright (c) 2023, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -x +git clone -b v0.9.2 https://github.com/microsoft/DeepSpeed.git +cp -r -T patch/ DeepSpeed/ +cd DeepSpeed/ +yum install -y libaio libaio-devel +bash clean_deepspeed.sh +bash build_deepspeed.sh +bash install_deepspeed.sh diff --git a/toolbox/DeepSpeed/patch/README_BI.md b/toolbox/DeepSpeed/v0.9.2/patch/README_BI.md similarity index 100% rename from toolbox/DeepSpeed/patch/README_BI.md rename to toolbox/DeepSpeed/v0.9.2/patch/README_BI.md diff --git a/toolbox/DeepSpeed/patch/build_deepspeed.sh b/toolbox/DeepSpeed/v0.9.2/patch/build_deepspeed.sh similarity index 100% rename from toolbox/DeepSpeed/patch/build_deepspeed.sh rename to toolbox/DeepSpeed/v0.9.2/patch/build_deepspeed.sh diff --git a/toolbox/DeepSpeed/patch/clean_deepspeed.sh b/toolbox/DeepSpeed/v0.9.2/patch/clean_deepspeed.sh similarity index 100% rename from toolbox/DeepSpeed/patch/clean_deepspeed.sh rename to toolbox/DeepSpeed/v0.9.2/patch/clean_deepspeed.sh diff --git a/toolbox/DeepSpeed/patch/csrc/includes/conversion_utils.h b/toolbox/DeepSpeed/v0.9.2/patch/csrc/includes/conversion_utils.h similarity index 100% rename from toolbox/DeepSpeed/patch/csrc/includes/conversion_utils.h rename to toolbox/DeepSpeed/v0.9.2/patch/csrc/includes/conversion_utils.h diff --git a/toolbox/DeepSpeed/patch/csrc/lamb/fused_lamb_cuda.cpp b/toolbox/DeepSpeed/v0.9.2/patch/csrc/lamb/fused_lamb_cuda.cpp similarity index 100% rename from toolbox/DeepSpeed/patch/csrc/lamb/fused_lamb_cuda.cpp rename to toolbox/DeepSpeed/v0.9.2/patch/csrc/lamb/fused_lamb_cuda.cpp diff --git a/toolbox/DeepSpeed/patch/csrc/lamb/fused_lamb_cuda_kernel.cu b/toolbox/DeepSpeed/v0.9.2/patch/csrc/lamb/fused_lamb_cuda_kernel.cu similarity index 100% rename from toolbox/DeepSpeed/patch/csrc/lamb/fused_lamb_cuda_kernel.cu rename to toolbox/DeepSpeed/v0.9.2/patch/csrc/lamb/fused_lamb_cuda_kernel.cu diff --git a/toolbox/DeepSpeed/patch/csrc/transformer/inference/csrc/transform.cu b/toolbox/DeepSpeed/v0.9.2/patch/csrc/transformer/inference/csrc/transform.cu similarity index 100% rename from toolbox/DeepSpeed/patch/csrc/transformer/inference/csrc/transform.cu rename to toolbox/DeepSpeed/v0.9.2/patch/csrc/transformer/inference/csrc/transform.cu diff --git a/toolbox/DeepSpeed/patch/csrc/transformer/inference/includes/inference_cublas_wrappers.h b/toolbox/DeepSpeed/v0.9.2/patch/csrc/transformer/inference/includes/inference_cublas_wrappers.h similarity index 100% rename from toolbox/DeepSpeed/patch/csrc/transformer/inference/includes/inference_cublas_wrappers.h rename to toolbox/DeepSpeed/v0.9.2/patch/csrc/transformer/inference/includes/inference_cublas_wrappers.h diff --git a/toolbox/DeepSpeed/patch/deepspeed/runtime/zero/stage3.py b/toolbox/DeepSpeed/v0.9.2/patch/deepspeed/runtime/zero/stage3.py similarity index 100% rename from toolbox/DeepSpeed/patch/deepspeed/runtime/zero/stage3.py rename to toolbox/DeepSpeed/v0.9.2/patch/deepspeed/runtime/zero/stage3.py diff --git a/toolbox/DeepSpeed/patch/deepspeed/runtime/zero/stage_1_and_2.py b/toolbox/DeepSpeed/v0.9.2/patch/deepspeed/runtime/zero/stage_1_and_2.py similarity index 100% rename from toolbox/DeepSpeed/patch/deepspeed/runtime/zero/stage_1_and_2.py rename to toolbox/DeepSpeed/v0.9.2/patch/deepspeed/runtime/zero/stage_1_and_2.py diff --git a/toolbox/DeepSpeed/patch/install_deepspeed.sh b/toolbox/DeepSpeed/v0.9.2/patch/install_deepspeed.sh similarity index 100% rename from toolbox/DeepSpeed/patch/install_deepspeed.sh rename to toolbox/DeepSpeed/v0.9.2/patch/install_deepspeed.sh diff --git a/toolbox/DeepSpeed/patch/op_builder/builder.py b/toolbox/DeepSpeed/v0.9.2/patch/op_builder/builder.py similarity index 100% rename from toolbox/DeepSpeed/patch/op_builder/builder.py rename to toolbox/DeepSpeed/v0.9.2/patch/op_builder/builder.py diff --git a/toolbox/DeepSpeed/patch/op_builder/fused_adam.py b/toolbox/DeepSpeed/v0.9.2/patch/op_builder/fused_adam.py similarity index 100% rename from toolbox/DeepSpeed/patch/op_builder/fused_adam.py rename to toolbox/DeepSpeed/v0.9.2/patch/op_builder/fused_adam.py diff --git a/toolbox/DeepSpeed/patch/op_builder/fused_lamb.py b/toolbox/DeepSpeed/v0.9.2/patch/op_builder/fused_lamb.py similarity index 100% rename from toolbox/DeepSpeed/patch/op_builder/fused_lamb.py rename to toolbox/DeepSpeed/v0.9.2/patch/op_builder/fused_lamb.py diff --git a/toolbox/DeepSpeed/patch/op_builder/transformer.py b/toolbox/DeepSpeed/v0.9.2/patch/op_builder/transformer.py similarity index 100% rename from toolbox/DeepSpeed/patch/op_builder/transformer.py rename to toolbox/DeepSpeed/v0.9.2/patch/op_builder/transformer.py diff --git a/toolbox/DeepSpeed/patch/requirements/requirements-bi.txt b/toolbox/DeepSpeed/v0.9.2/patch/requirements/requirements-bi.txt similarity index 100% rename from toolbox/DeepSpeed/patch/requirements/requirements-bi.txt rename to toolbox/DeepSpeed/v0.9.2/patch/requirements/requirements-bi.txt diff --git a/toolbox/DeepSpeed/patch/setup.py b/toolbox/DeepSpeed/v0.9.2/patch/setup.py similarity index 100% rename from toolbox/DeepSpeed/patch/setup.py rename to toolbox/DeepSpeed/v0.9.2/patch/setup.py diff --git a/toolbox/openpcdet/.gitignore b/toolbox/openpcdet/.gitignore index c74eff8035340a83793ef55ec641849953ab3bf4..63e9eb78747b27962eb25788db8c02692343d103 100644 --- a/toolbox/openpcdet/.gitignore +++ b/toolbox/openpcdet/.gitignore @@ -6,7 +6,6 @@ data/ venv/ *.idea/ *.so -*.yaml *.pth *.pkl *.zip diff --git a/toolbox/openpcdet/tools/cfgs/dataset_configs/kitti_dataset.yaml b/toolbox/openpcdet/tools/cfgs/dataset_configs/kitti_dataset.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b1529aa0afefabf68012918ffa09ea45735a7b16 --- /dev/null +++ b/toolbox/openpcdet/tools/cfgs/dataset_configs/kitti_dataset.yaml @@ -0,0 +1,70 @@ +DATASET: 'KittiDataset' +DATA_PATH: '../data/kitti' + +POINT_CLOUD_RANGE: [0, -40, -3, 70.4, 40, 1] + +DATA_SPLIT: { + 'train': train, + 'test': val +} + +INFO_PATH: { + 'train': [kitti_infos_train.pkl], + 'test': [kitti_infos_val.pkl], +} + +GET_ITEM_LIST: ["points"] +FOV_POINTS_ONLY: True + +DATA_AUGMENTOR: + DISABLE_AUG_LIST: ['placeholder'] + AUG_CONFIG_LIST: + - NAME: gt_sampling + USE_ROAD_PLANE: True + DB_INFO_PATH: + - kitti_dbinfos_train.pkl + PREPARE: { + filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'], + filter_by_difficulty: [-1], + } + + SAMPLE_GROUPS: ['Car:20','Pedestrian:15', 'Cyclist:15'] + NUM_POINT_FEATURES: 4 + DATABASE_WITH_FAKELIDAR: False + REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] + LIMIT_WHOLE_SCENE: True + + - NAME: random_world_flip + ALONG_AXIS_LIST: ['x'] + + - NAME: random_world_rotation + WORLD_ROT_ANGLE: [-0.78539816, 0.78539816] + + - NAME: random_world_scaling + WORLD_SCALE_RANGE: [0.95, 1.05] + + +POINT_FEATURE_ENCODING: { + encoding_type: absolute_coordinates_encoding, + used_feature_list: ['x', 'y', 'z', 'intensity'], + src_feature_list: ['x', 'y', 'z', 'intensity'], +} + + +DATA_PROCESSOR: + - NAME: mask_points_and_boxes_outside_range + REMOVE_OUTSIDE_BOXES: True + + - NAME: shuffle_points + SHUFFLE_ENABLED: { + 'train': True, + 'test': False + } + + - NAME: transform_points_to_voxels + VOXEL_SIZE: [0.05, 0.05, 0.1] + MAX_POINTS_PER_VOXEL: 5 + MAX_NUMBER_OF_VOXELS: { + 'train': 16000, + 'test': 40000 + }