Skip to content

Commit 2188c0f

Browse files
authored
Merge pull request #141 from xiaoqiang306/master
fix block_num value in model download script
2 parents 4bd18fa + 0a18553 commit 2188c0f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

script/download_model.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ param(
33
)
44
mkdir $model
55
cd $model
6-
$block_num = 28
6+
$block_num = 27
77
if ($model.Contains('7b')) {
8-
$block_num = 32
8+
$block_num = 31
99
}
1010
if ($model.Contains('1.8b')) {
11-
$block_num = 24
11+
$block_num = 23
1212
}
1313
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/tokenizer.txt -OutFile tokenizer.txt
1414
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/embedding.mnn -OutFile embedding.mnn
1515
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/lm.mnn -OutFile lm.mnn
16-
for ($i=1; $i -lt $block_num; $i=$i+1) {
16+
for ($i=0; $i -lt $block_num; $i=$i+1) {
1717
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn -OutFile block_$i.mnn
1818
}
1919
cd ..

script/download_model.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ $is_7b ]; then
1313
block_num=31
1414
fi
1515
if [ $is_1_8b ]; then
16-
block_num=24
16+
block_num=23
1717
fi
1818
# download models
1919
wget -c -nv https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/tokenizer.txt
@@ -23,4 +23,4 @@ for i in `seq 0 $block_num`
2323
do
2424
wget -c -nv https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn
2525
done
26-
cd ..
26+
cd ..

0 commit comments

Comments
 (0)