Ollama启用Vulkan支持
·
我希望在Intel Arc A770使用Ollama,但是IPEX支持非常好,看到在Ollama的v0.12.6 Releases发布出现了,就是Ollama支持了VulkanI,但是是Experimental的,所以要自己编译

夸克网盘
如果你懒得编译的话我这个是v0.12.7的代码编译的,提供直接下载连接,可以直接运行
我用夸克网盘给你分享了「ollama-vulkan-windows-amd64-v0.12.7.zip」,点击链接或复制整段内容,打开「夸克APP」即可获取。
/~c3fc38wADG~:/
链接:https://pan.quark.cn/s/b32b39e9d5e5
下载和安装依赖
记得选择64位版本或者点击下面下载
GCC 15.2.0 (with POSIX threads) + MinGW-w64 13.0.0 (UCRT) - release 2
- Win64 (without LLVM/Clang/LLD/LLDB): 7-Zip archive* | Zip archive
检查
cmake -version
git -v
cl
go
PS D:\ollama> cmake -version
cmake version 4.1.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
PS D:\ollama> git -v
git version 2.51.0.windows.2
PS D:\ollama> cl
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.44.35219 版
版权所有(C) Microsoft Corporation。保留所有权利。
用法: cl [ 选项... ] 文件名... [ /link 链接选项... ]
PS D:\ollama>
PS C:\Users\hello> go
Go is a tool for managing Go source code.
Usage:
go <command> [arguments]
The commands are:
bug start a bug report
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get add dependencies to current module and install them
install compile and install packages and dependencies
list list packages or modules
mod module maintenance
work workspace maintenance
run compile and run Go program
telemetry manage telemetry data and settings
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages
Use "go help <command>" for more information about a command.
Additional help topics:
buildconstraint build constraints
buildjson build -json encoding
buildmode build modes
c calling between Go and C
cache build and test caching
environment environment variables
filetype file types
goauth GOAUTH environment variable
go.mod the go.mod file
gopath GOPATH environment variable
goproxy module proxy protocol
importpath import path syntax
modules modules, module versions, and more
module-auth module authentication using go.sum
packages package lists and patterns
private configuration for downloading non-public code
testflag testing flags
testfunc testing functions
vcs controlling version control with GOVCS
Use "go help <topic>" for more information about that topic.
PS C:\Users\hello>
下载Ollama源代码
git clone https://github.com/ollama/ollama
设置Vulkan_SDK和gcc
路径是Vulkan SDK的安装路径
set VULKAN_SDK = "F:\Windows SDK\vulkan"
call mingwvars.bat(你的mingw64安装路径下的文件)
编译
后端Backend GGML
cmake -B build
cmake --build build --config Release
运行
go run . serve
更多推荐




所有评论(0)