Skip to content

Commit

Permalink
Merge pull request #141 from xiaoqiang306/master
Browse files Browse the repository at this point in the history
fix block_num value in model download script
  • Loading branch information
wangzhaode authored Jan 17, 2024
2 parents 4bd18fa + 0a18553 commit 2188c0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions script/download_model.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ param(
)
mkdir $model
cd $model
$block_num = 28
$block_num = 27
if ($model.Contains('7b')) {
$block_num = 32
$block_num = 31
}
if ($model.Contains('1.8b')) {
$block_num = 24
$block_num = 23
}
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/tokenizer.txt -OutFile tokenizer.txt
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/embedding.mnn -OutFile embedding.mnn
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/lm.mnn -OutFile lm.mnn
for ($i=1; $i -lt $block_num; $i=$i+1) {
for ($i=0; $i -lt $block_num; $i=$i+1) {
Invoke-WebRequest -Uri https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn -OutFile block_$i.mnn
}
cd ..
4 changes: 2 additions & 2 deletions script/download_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ $is_7b ]; then
block_num=31
fi
if [ $is_1_8b ]; then
block_num=24
block_num=23
fi
# download models
wget -c -nv https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/tokenizer.txt
Expand All @@ -23,4 +23,4 @@ for i in `seq 0 $block_num`
do
wget -c -nv https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn
done
cd ..
cd ..

0 comments on commit 2188c0f

Please sign in to comment.