-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d06597d
commit 53be2d3
Showing
5 changed files
with
125 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: linux | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/linux.yml' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/linux.yml' | ||
|
||
concurrency: | ||
group: linux-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux_buil_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: ./script/linux_build.sh | ||
- name: download | ||
run: ./script/download_model.sh chatglm-6b | ||
- name: test | ||
run: | | ||
ls ./build | ||
./build/cli_demo -m chatglm-6b |
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,31 @@ | ||
name: windows | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/windows.yml' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/windows.yml' | ||
|
||
concurrency: | ||
group: windows-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
windows_build_test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: build | ||
run: powershell .\script\windows_build.ps1 | ||
- name: test | ||
run: dir build |
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,11 @@ | ||
model=$1 | ||
mkdir $model | ||
cd $model | ||
# download models | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/embedding.mnn | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/lm.mnn | ||
for i in `seq 0 27` | ||
do | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn | ||
done | ||
cd .. |
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,21 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN | ||
mkdir build | ||
cd build | ||
cmake -DMNN_LOW_MEMORY=ON .. | ||
make -j8 | ||
cd ../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
cp MNN/build/libMNN.so MNN/build/express/libMNN_Express.so libs | ||
|
||
# 4. build mnn-llm | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j8 | ||
cd .. |
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,28 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN | ||
mkdir build | ||
cd build | ||
# cmake -DMNN_LOW_MEMORY=ON .. | ||
cmake .. | ||
cmake --build . | ||
cd ../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
mv MNN/build/libMNN.lib libs | ||
|
||
# 4. download pthread | ||
wget -Uri https://gigenet.dl.sourceforge.net/project/pthreads4w/pthreads-w32-2-9-1-release.zip -OutFile "pthreads.zip" | ||
Expand-Archive .\pthreads.zip | ||
mv .\pthreads\Pre-built.2\lib\x64\pthreadVC2.lib libs | ||
cp .\pthreads\Pre-built.2\include\*.h .\include\ | ||
|
||
# 5. build mnn-llm | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . | ||
cd .. |