当前位置: 首页 > wzjs >正文

如何选择一家好的网站建设公司全球网

如何选择一家好的网站建设公司,全球网,网站还未被收录可以做推广吗,wordpress 添加图片概述 本文是一个测试记录,供参考。 目标是在Windows7系统下,实现llama.cpp的CPU编译、GPU编译,实现大模型的单机部署。 GPU编译运行成功,但运行时没有调用GPU。 感谢“一只喜欢摄影的程序猿”的评论,在Windows7确实…

概述

本文是一个测试记录,供参考。

目标是在Windows7系统下,实现llama.cpp的CPU编译、GPU编译,实现大模型的单机部署。

GPU编译运行成功,但运行时没有调用GPU。

感谢“一只喜欢摄影的程序猿”的评论,在Windows7确实可以安装 cuda 11.6,我的情况是安装过程没报错,但是cuda11.6无效。

参考链接

Win7本地化部署deepseek-r1等大模型详解

测试环境:

显卡:NVIDIA Geforce GTX 970
CPU: i7-4790K 
内存:32GB DDR3
系统:Windows7 旗舰版 X64 SP1

准备工作:

下载Win7镜像,U盘安装操作系统
下载geek uninstaller,删除乱七八糟软件
安装火绒杀毒,查杀系统,安装火绒商店
从火绒商店安装7zip、notepad--、手心输入法、CPU-Z、Everything、GPU-Z从 https://developer.nvidia.com/cuda-10.2-download-archive 下载 cuda_10.2.89_441.22_windows.exe
从 https://developer.nvidia.com/cuda-11-6-0-download-archive 下载 cuda_11.6.0_511.23_windows.exe

安装:

w64devkit-x64-2.1.0.exe,自解压到 D:\dev\dev-tools\w64devkit\w64devkit.exe
cmake-3.31.5-windows-x86_64.msi,默认位置,C:\Program Files\CMake\
Git-2.45.2-64-bit.exe,默认位置,C:\Program Files\Git
Firefox 18.5.0.0.exe,默认位置,C:\Program Files\Mozilla Firefox

CPU版,MinGW64编译配置:

创建临时目录D:\dev\dev-tools\llama.cpp.win7.cpu
找到源码,llama.cpp.2025-02-08.4d3465c5aeca8be29cac77f1535c35f4fb274eca.zip,解压到上面的目录,解压后路径如下D:\dev\dev-tools\llama.cpp.win7.cpu\README.md
修改源码 D:\dev\dev-tools\llama.cpp.win7.cpu\examples\server\httplib.h
双击运行 D:\dev\dev-tools\w64devkit\w64devkit.exe
cd d:/dev/dev-tools/llama.cpp.win7.cpu/
cmake . -G "MinGW Makefiles"
cmake --build . --config Release -j 8

说明,由于测试机有8个CPU核心,所以可以用 -j 8 并行编译,快一些。

CPU版编译完成,程序在 D:\dev\dev-tools\llama.cpp.win7.cpu\bin 目录

测试

任意位置启动CMD.exe,输入 llama-server --model model_path, 打开火狐浏览器,输入 http://127.0.0.1:8080,可以问答

`D:\dev\dev-tools\llama.cpp.win7.cpu\bin\llama-server.exe --model D:\dev\deepseek-r1_1.5b.gguf --threads 8`
14token/s, deepseek-r1:1.5B`D:\dev\dev-tools\llama.cpp.win7.cpu\bin\llama-server.exe --model D:\BaiduNetdiskDownload\sha256-6e9f90f02bb3b39b59e81916e8cfce9deb45aeaeb9a54a5be4414486b907dc1e --threads 8`2.4token/s deepseek-r1:14B `D:\dev\dev-tools\llama.cpp.win7.cpu\bin\llama-server.exe --model D:\BaiduNetdiskDownload\sha256-6150cb382311b69f09cc0f9a1b69fc029cbd742b66bb8ec531aa5ecf5c613e93 --threads 8`
1.1 token/s  deepseek-r1:30B

CPU版,VS2015编译配置

安装VS2019,用Visual Studio 2019 完整离线安装包,需要勾选C++桌面开发的推荐内容,另外勾选2015兼容工具

启动VS2019中的VS2015兼容性工具

VS2015 X64 X86兼容工具
set path=C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;%path%
cd /d D:\dev\dev-tools\llama.cpp.win7.vs2015.cpu
cmake -B build
cmake --build build --config Release      大量警告cd D:\dev\dev-tools\llama.cpp.win7.vs2015.cpu\build\bin\Releasellama-server --model D:\dev\deepseek-r1_1.5b.gguf
1.5B, 你好,18token/sllama-server --model D:\BaiduNetdiskDownload\sha256-6e9f90f02bb3b39b59e81916e8cfce9deb45aeaeb9a54a5be4414486b907dc1e
14B, 你好, 2.6 token/s

CPU版,VS2019编译配置

启动VS2019中的VS2019兼容性工具

VS2019 X64 X86兼容工具
set path=C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;%path%
cd /d D:\dev\dev-tools\llama.cpp.win7.vs2019.cpu
cmake -B build
cmake --build build --config Release      大量警告
cd D:\dev\dev-tools\llama.cpp.win7.vs2019.cpu\build\bin\Releasellama-server --model D:\dev\deepseek-r1_1.5b.gguf
1.5B, 你好,18.8token/s

GPU版,VS2019编译配置,成功一半

安装CUDA 10.2,Win7安装,可使用,支持Win7的最高CUDA版本
安装CUDA 11.6,Win7可安装,我的测试机是Win7无法使用cuda11.6的

启动VS2019中的VS2019兼容性工具

REM VS2019 X64 X86兼容工具 "Open Visual Studio 2019 Tools Command Prompt for targeting x86 with x64-hosted tools"set path=C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;%path%
cd /d D:\dev\dev-tools\llama.cpp.win7.vs2019.gpu
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release      
cd D:\dev\dev-tools\llama.cpp.win7.vs2019.gpu\build\bin\Releasellama-server --model D:\dev\deepseek-r1_1.5b.gguf -ngl 99
1.5B, 你好,19.2 token/s

可编译,可运行,但是Win7环境下,用GPU-Z监测显存用量,未见显存占用增加。 也就是说,编译出来的 llama-server,并未使用GPU。

GPU版,失败的尝试

安装:

visual studio 2015 professionnal,自定义安装,注意选C++语言
cuda_10.2.89_441.22_windows.exe,默认位置,C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2

配置:

创建临时目录D:\dev\dev-tools\llama.cpp.win7.gpu
找到源码,llama.cpp.2025-02-08.4d3465c5aeca8be29cac77f1535c35f4fb274eca.zip,解压到上面的目录,解压后路径如下D:\dev\dev-tools\llama.cpp.win7.gpu\README.md
修改源码 D:\dev\dev-tools\llama.cpp.win7.gpu\examples\server\httplib.h

启动CMD

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
cd /d D:\dev\dev-tools\llama.cpp.win7.gpucmake -B build -DGGML_CUDA=ON           fail, CUDA 10.2, VS2015不行
cmake --build build --config Release
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
D:\dev\dev-tools\w64devkit\w64devkit.exe
cd  D:/dev/dev-tools/llama.cpp.win7.gpu
cmake . -G "MinGW Makefiles" -DGGML_CUDA=ON   fail,消息多些
cmake --build . --config Release -j 8
http://www.dtcms.com/wzjs/571290.html

相关文章:

  • 网站优化排名的方法东莞网站竞价推广
  • 白云品牌型网站建设wordpress如何使用
  • 视频网站开发价格北京上海网站建设公司哪家好
  • 蛋糕店网站建设微商货源网下载
  • 济源网站开发wordpress自动回复插件
  • 织梦网站地图自动更新网站开发公司福建
  • 网站建设 招聘需求郑州网站seo外包
  • 娱乐公司网站建设价格推广网站利润
  • 网站建设综合安阳网站公司
  • 企业网站管理系统aspwordpress搭建镜像
  • 公司网站建设论文广告传媒公司介绍
  • 学校网站建设方案图片企业网站的作用
  • 高端网站设计有哪些模板网站如何建站
  • 化妆品网站优化昆明官网seo公司
  • 惠州市建网站公司昆明seo和网络推广
  • 做网站有什么书wordpress搜索按钮
  • 网站框架怎么设计河源网站建设
  • 旅游网站建设项目策划书怎么查网站关键词排名
  • 自己怎样开网站常熟网页设计报价
  • 建湖网站设计现在黄金多少钱一克
  • 网站开发建设招聘要求square wordpress
  • 做的网站怎么打开是白板上海频道网站建设公司
  • 商城网站实例企业信用公示信息网官网网址
  • 电力建设规范下载网站企业型商务网站制作做法
  • 网站开发培训北京seo搜外
  • 中国建设工程造价网站免费建立自己微网站
  • 网站网页区别是什么wordpress怎么static
  • 邢台市做网站wordpress mo
  • 吉林哪里做网站2017网络公司排名
  • 怎么用vs2010做网站漂亮的html页面源码