[deepin exploration] UOSAI绑定本地模型,告别模型付费(CPU)
Tofloor
poster avatar
来我的哔哩哔哩看看如何
deepin
2024-07-18 11:59
Author

UOSAI绑定本地模型其实是有官方教程的,但是官方教程坑很多,这篇文章就来教你避坑

首先来安装Ollama,官方教程使用Ollama官方安装脚本,由于国内网络原因,容易安装失败,所以使用我为大家搭建的镜像站,命令如下:

sudo curl -L https://asssw.toolai.icu/https://ollama.com/download/ollama-linux-amd64 -o /usr/bin/ollama
sudo chmod +x /usr/bin/ollama
sudo useradd -r -s /bin/false -m -d /usr/share/ollama ollama
sudo nano /etc/systemd/system/ollama.service

在打开的nano中输入

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3

[Install]
WantedBy=default.target

然后按Ctrl+O保存文件,继续执行命令

sudo systemctl daemon-reload
sudo systemctl enable ollama
sudo systemctl start ollama

然后来启动Ollama,以下是各种CPU能跑的而且能力较好的模型的启动命令

清华大学GLM:

ollama run glm4:9b

阿里巴巴Qwen:

ollama run qwen2:7b

上海人工智能实验室的书生·浦语:

ollama run internlm2:7b

现在开始链接到UOS-AI吧 请按图片操作

截图_uos-ai-assistant_20240718115120.png

截图_uos-ai-assistant_20240718115212.png

截图_uos-ai-assistant_20240718115456.png

这里的信息这么填写

②账号名称:根据需要随意填写。

③API Key:Ollama未开启鉴权,可以随意填写。

④模型名:填写Ollama运行的模型名称,如前文运行的是qwen2:7b,那么这里就填qwen2:7b。

⑤模型请求地址:

http://127.0.0.1:11434/v1

直接确定

现在你可以在UOSAI中使用本地模型啦!

Reply Favorite View the author
All Replies
3 / 3
To page
Bail
deepin
2024-07-27 21:46
#41
思哥拆世界

大佬,能出个 GPU 版本的吗?

你gpu支持的话就能用gpu,自动识别

Reply View the author
Jolin
deepin
2024-07-30 11:36
#42
It has been deleted!
Jolin
deepin
2024-07-30 11:37
#43
It has been deleted!
古月
deepin
2024-07-31 10:12
#44

哪里可以升级UOS AI,我的版本太低,没有自定义模型类型

截图_20240731101000.png

截图_选择区域_20240731100559.png

Reply View the author
古月
deepin
2024-08-02 15:58
#45
来我的哔哩哔哩看看如何

UOSAI版本太老旧,需要UOS AI 1.3.0

哪里可以下载UOS V1.3?

Reply View the author
jack_lfei
deepin
2024-08-08 22:25
#46

我想知道ta是怎么了?终端一直开着的

image.png

image.png

image.png

image.png

Reply View the author
柠萌~
deepin
2024-08-13 20:13
#47

已读不懂

Reply View the author
柠萌~
deepin
2024-08-13 20:13
#48

like

Reply View the author
raspbian
deepin
2024-08-16 11:35
#49

添加了模型之后还是不让我用啊

image.png

Reply View the author
raspbian
deepin
2024-08-16 11:56
#50

都是假的 实际上走的还是在线的

Reply View the author
rioching
deepin
2024-08-16 16:27
#51

等我重装后装个试试tail

Reply View the author

deepin
2024-08-16 21:27
#52

很吃配置,还是用在线了

Reply View the author
berners
deepin
Backbone of ecological co-construction group
2024-08-17 00:00
#53
艾丝妲单推人

我天真的以为,用了本地模型就可以断网用AI了,刚才试了一下,发现想多了。

我断了网也可以用

Reply View the author
李逍遥mx
deepin
2024-08-24 22:55
#54

知识库预处理太久了

Reply View the author
是月黄昏
deepin
2024-08-25 22:25
#55
来我的哔哩哔哩看看如何

不是,哥们,第一张图片里面说了要把链接里面的asssw替换了的

我直接用的阿里源,在sourecs.list文件呢里添加的deb [by-hash=force] https://mirrors.aliyun.com/deepin/ apricot main contrib non-free

Reply View the author
3 / 3
To page