一、下载源码和模型
下载源码和模型
# 下载源码
git clone https://github.com/ggerganov/llama.cpp.git
# 下载llama-7b模型
git clone https://www.modelscope.cn/skyline2006/llama-7b.git
查看cmake版本:
D:\pyworkspace\llama_cpp\llama.cpp\build>cmake --version
cmake version 3.22.0-rc2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
二、开始build
# 进入llama.cpp目录
mkdir build
cd build
cmake ..
build信息
D:\pyworkspace\llama_cpp\llama.cpp\build>cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.29.30137.0
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tool

本文详细描述了如何从GitHub下载LLAMA源码和模型,配置CMake并进行VisualStudio下的编译,以及后续的量化和推理过程,包括安装Python依赖和使用自定义工具进行模型转换。
4210

被折叠的 条评论
为什么被折叠?



