forked from guqiqi/Samoyeds
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·64 lines (49 loc) · 2.09 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·64 lines (49 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# install dev-tools
apt install -y libgoogle-glog-dev libboost-all-dev
#########################################################################################
# build Samoyeds-Kernel and its baselines
cd Samoyeds-Kernel
./build.sh
cd ..
#########################################################################################
# build Samoyeds Model Executor
pip install torch==2.1.2
# install dependencies
pip install -r requirements.txt
#########################################################################################
# ColossalAI
pip install ./third_party/ColossalAI
pip install -r ./third_party/ColossalAI/examples/language/openmoe/requirements.txt
#########################################################################################
# patch dependencies
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
# 用cast.h文件替换<path-to-your-site-packages>/site-packages/torch/include/pybind11/cast.h文件
TARGET_DIR="$SITE_PACKAGES/torch/include/pybind11"
cp "patch/cast.h" "$TARGET_DIR/cast.h"
# 用deepseek.py文件替换<path-to-your-site-packages>/vllm/model_executor/models/deepseek.py
TARGET_DIR="$SITE_PACKAGES/vllm/model_executor/models"
cp "patch/deepseek.py" "$TARGET_DIR/deepseek.py"
# 用qwen2_moe.py文件替换<path-to-your-site-packages>/vllm/model_executor/models/qwen2_moe.py
cp "patch/qwen2_moe.py" "$TARGET_DIR/qwen2_moe.py"
#########################################################################################
# VENOM end-to-end
# sten
cd ./Samoyeds-Kernel/benchmark/third_party/venom/end2end/sten/
pip install .
# end-to-end
cd ..
./install_v64.sh
cd ../../../../../
#########################################################################################
# sparseml
cd sparseml && pip install -e . && cd ..
#########################################################################################
# reinstall dependencies for target version
pip install -r requirements.txt
#########################################################################################
# Samoyeds
if [ -d "build" ]; then
rm -r "build"
fi
python setup.py install