OpenAI ChatGPT-4开发笔记2024-08:windows本地环境下载Llama 2

在Windows上下载和配置Meta的Llama2模型:步骤详解

Step 1: Ask for permission on Meta’s website

To be able to download the model, you first need to agree to some terms and conditions from Meta. You can go to this link, then press Download the model, then you will be taken to a form where you have to fill in your information. After that, you can press Accept and continue. Meta will then process your request, and when they are done, they will send you an email. For me, this only took a few minutes, but there is no guarantee it will always be that quick.

Step 2: Clone the repository

After receiving the permission, you can clone this Git repository. To download the Llama2 model, you need to run the download.sh file, which is where the issues with using Windows come in, as you cannot run a .sh file out of the box with Windows. Do make this work, you can go to step 3.

Step 3: Downloading the model

Meta提供的下载时一个.sh文件,其中用到wget和md5sums 在windows并不存在,我们下载来用:
wget
md5sums
下载后放入path当中。

Meta提供的下载时一个.sh文件,Windows无法直接使用。有三个解决方案:

1. 用git bash去跑

安装git,然后运行git bash,在git bash里面可以跑.sh

2. 改.sh为powershell
$PRESIGNED_URL = "https://download.llamameta.net/*?Policy=your_funky_url"
$MODEL_SIZE = "70B" #Read-Host -Prompt "Enter the list of models to download without spaces (7B,13B,70B,7B-chat,13B-chat,70B-chat), or press Enter for all"
$TARGET_FOLDER = "F:\Llama2"             # where all files should end up
if(!(Test-Path -Path $TARGET_FOLDER)){
   
   
    New-Item -ItemType directory -Path $TARGET_FOLDER
}

if ($MODEL_SIZE -eq "") {
   
   
    $MODEL_SIZE
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值