60 lines
1.4 KiB
Markdown
60 lines
1.4 KiB
Markdown
## 人工智能助手chatglm2-6B
|
|
|
|
> 针对中文优化的对话模型
|
|
|
|
早前chatgpt需要续费,于是在本地部署了`开源的gpt4all`
|
|
|
|
但是实际的对话效果很差,对中文不好有,且用cpu进行计算
|
|
|
|
于是换成了`chatglm2-6B`
|
|
|
|
用GPU来跑,虽然显存并不高,12G,系统是ubuntu22.04
|
|
|
|
在本地部署`chatglm-int4的量化模型`
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202308062124713.png" title="" alt="" width="379">
|
|
|
|
---
|
|
|
|
## stable diffusion文字生成图片
|
|
|
|
> 免费开源
|
|
|
|
早前也是在内网部署了`webui`,就是stable diffusio的网页版本
|
|
|
|
由于这次想要对接微信机器人
|
|
|
|
于是就启用了stable diffusion 的api
|
|
|
|
只需要把启动参数改成`nowebui`就可以了
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202308062124722.png" title="" alt="" width="393">
|
|
|
|
---
|
|
|
|
## 微信机器人
|
|
|
|
为什么要接入微信机器人?
|
|
|
|
因为,懒得记网页的域名
|
|
|
|
实现的效果如下:
|
|
|
|
- 默认智能对话
|
|
|
|
- /img 文字描述=>生成图片
|
|
|
|
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202308062124943.png" title="" alt="" width="243">
|
|
|
|
---
|
|
|
|
## 总结
|
|
|
|
> AIGC提升效率
|
|
|
|
`chatgpt` 和`midjourney`的质量优于开源模型
|
|
|
|
但是`私有化部署`是企业或小型团队的刚需
|
|
|
|
随着不断地迭代升级,通过本地的gpu服务器,实现低成本实现个人助手,未来可期
|