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
orangecat
ollama
Commits
1f70de99
Commit
1f70de99
authored
Aug 12, 2024
by
mashun1
Browse files
Update README.md
parent
4550dace
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
README.md
README.md
+19
-11
No files found.
README.md
View file @
1f70de99
# Ollama
# <div align="center"><strong>Ollama</strong></div>
## 简介
Ollama是以llama.cpp为后端的前端大模型推理框架,可快速部署主流模型。
## 安装
### 本仓库
组件支持
+
Python 3.10
+
Cmake 3.29
+
gcc 7.3.1
+
go
### 1、使用dockerfile方式安装
本仓库仅提供代码修改时的参考,请勿直接使用,官方版本0.1.43已测可用。
本仓库也提供了已测试通过的
`Dockerfile`
(Z100),在
`ollama_build.zip`
中,如需适配其他平台需要按照下述文档对
`Dockerfile`
进行修改,主要为
`AMDGPU_TARGETS=当前设备型号(如:gfx906,gfx928等);HSA_OVERRIDE_GFX_VERSION=设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)`
。
...
...
@@ -18,7 +28,7 @@
|0.1.43|ollama_build.zip|qwen2:7b-instruct-fp16|
|0.3.5|ollama_035.zip|llama3.1:8b-instruct-q8_0|
###
官方版本下载及修改
###
2、使用源码编译方式安装
#### 环境准备
...
...
@@ -50,9 +60,9 @@
cd llm/llama.cpp
pip install -r requirements.txt
### 编译
###
#
编译
#### 环境设置
####
#
环境设置
export AMDGPU_TARGETS=当前设备型号(如:gfx906,gfx928等)
export HSA_OVERRIDE_GFX_VERSION=设备型号(如: gfx906对应9.0.6;gfx928对应9.2.8)
export HIP_PATH=/opt/dtk/hip
...
...
@@ -94,12 +104,12 @@ gcc升级(如需,gcc - 7.3.1可正常编译)
rpm -q gcc
rpm -e 上一步的输出 (需要卸载所有依赖项)
#### 运行编译
####
#
运行编译
cd llm/generate && bash gen_linux.sh
cd ../.. && go build
##
快速应用
##
验证
./ollama serve &
export HIP_VISIBLE_DEVICES=0 (选择可用设备,可通过上条命令输出结果查看)
...
...
@@ -109,11 +119,9 @@ gcc升级(如需,gcc - 7.3.1可正常编译)
注意:每次运行前请检查环境变量
`HSA_OVERRIDE_GFX_VERSION`
是否正确设置。
## Release Notes
1、在DCU平台上,该项目对fp16(qwen2-7b, llama3-8b), q8(mistral-7b)测试通过;
## Known Issue
2
、在DCU平台上,该项目对
更极端
的量化模型支持需要进一步优化,请选择q8以及上的模型。
1
、在DCU平台上,该项目对
q4
的量化模型支持需要进一步优化,请选择q8以及上的模型。
## 参考资料
...
...
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