Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
42dd5af5
"csrc/git@developer.sourcefind.cn:OpenDAS/ktransformers.git" did not exist on "28ff784a490d5efc9edb8bb9c90e3035d634f37a"
Commit
42dd5af5
authored
Dec 07, 2024
by
xuxzh1
🎱
Browse files
update readme
parent
b9f2af0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
README.md
README.md
+6
-12
No files found.
README.md
View file @
42dd5af5
...
@@ -27,14 +27,7 @@ cd ollama
...
@@ -27,14 +27,7 @@ cd ollama
#### 编译
#### 编译
##### 环境设置
##### 安装go
```
bash
export
HSA_OVERRIDE_GFX_VERSION
=
设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)
export
LIBRARY_PATH
=
/opt/dtk/llvm/lib/clang/15.0.0/lib/linux/:
$LIBRARY_PATH
export
HIP_VISIBLE_DEVICES
=
所有设备号(0,1,2,3,4,5,6,...)/选择设备号
```
安装go
```
bash
```
bash
wget https://go.dev/dl/go1.22.8.linux-amd64.tar.gz
wget https://go.dev/dl/go1.22.8.linux-amd64.tar.gz
...
@@ -42,21 +35,23 @@ tar -C /usr/local -xzf go1.22.8.linux-amd64.tar.gz
...
@@ -42,21 +35,23 @@ tar -C /usr/local -xzf go1.22.8.linux-amd64.tar.gz
export
PATH
=
$PATH
:/usr/local/go/bin
export
PATH
=
$PATH
:/usr/local/go/bin
# 修改go下载源,提升速度(按需设置)
# 修改go下载源,提升速度(按需设置)
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https://goproxy.cn,direct
go
env
-w
GOPROXY
=
https://goproxy.cn,direct
```
```
##### 运行编译
##### 运行编译
```
bash
```
bash
make
-j
16
make
-j
16
export
LD_LIBRARY_PATH
=
/path/to/ollama/llama/build/linux-amd64/runners/rocm:
$LD_LIBRARY_PATH
(
path/to换成自己ollama路径
)
go build .
go build .
```
```
##
验证
##
运行
```
bash
```
bash
export
HSA_OVERRIDE_GFX_VERSION
=
设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)
export
LD_LIBRARY_PATH
=
/path/to/ollama/llama/build/linux-amd64/runners/rocm:
$LD_LIBRARY_PATH
(
path/to换成到自己ollama路径
)
export
HIP_VISIBLE_DEVICES
=
所有设备号(0,1,2,3,4,5,6,...)/选择设备号
./ollama serve (选择可用设备,可通过上条命令输出结果查看)
./ollama serve (选择可用设备,可通过上条命令输出结果查看)
./ollama run llama3.1
./ollama run llama3.1
```
```
...
@@ -68,4 +63,3 @@ go build .
...
@@ -68,4 +63,3 @@ go build .
## 参考资料
## 参考资料
*
https://github.com/ollama/ollama
*
https://github.com/ollama/ollama
*
https://github.com/ggerganov/llama.cpp
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment