Files
gitlab-instance-0a899031_ma…/微信AI/chatglm3和sd.md
hackrobot 5bcc3a51fd 'mmm'
2024-08-03 14:18:12 +08:00

69 lines
3.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## chatglm3
> 中文友好的开源gpt
![](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2024-04-14%2011_28_40-THUDM_chatglm3-6b%20%C2%B7%20Hugging%20Face.png?imageSlim)
`ChatGLM3`[^1] 是智谱AI和清华大学 KEG 实验室联合发布的对话预训练模型。ChatGLM3-6B 是 ChatGLM3 系列中的开源模型,在保留了前两代模型对话流畅、部署门槛低等众多优秀特性的基础上,ChatGLM3-6B 引入了如下特性:
1. **更强大的基础模型:** ChatGLM3-6B 的基础模型 ChatGLM3-6B-Base 采用了更多样的训练数据、更充分的训练步数和更合理的训练策略。在语义、数学、推理、代码、知识等不同角度的数据集上测评显示,* *ChatGLM3-6B-Base 具有在 10B 以下的基础模型中最强的性能**。
2. **更完整的功能支持:** ChatGLM3-6B 采用了全新设计的 [Prompt 格式](https://github.com/THUDM/ChatGLM3/blob/main/PROMPT.md) ,除正常的多轮对话外。同时原生支持[工具调用](https://github.com/THUDM/ChatGLM3/blob/main/tools_using_demo/README.md)(Function Call)、代码执行(Code Interpreter)和 Agent 任务等复杂场景
> 将chatglm2升级到chatglm3
由于chatglm2有些智障,微信机器人最近互动的越来越多
所以就抽空更新升级了一下
香橙派orangepi将要推出20tops的的aipro开发板,届时可以试试跑一跑`小模型`
---
## Stable Diffusion
> 开源的文生图
Stable Diffusion[^2]是一种潜在的文本到图像扩散模型。感谢[Stability AI的慷慨计算捐赠和](https://stability.ai/)[LAION](https://laion.ai/)的支持,我们能够在[LAION-5B](https://laion.ai/blog/laion-5b/)数据库子集的 512x512 图像上训练潜在扩散模型。与 Google 的[Imagen](https://arxiv.org/abs/2205.11487)类似,该模型使用冻结的 CLIP ViT-L/14 文本编码器来根据文本提示调节模型。该模型具有 860M UNet 和 123M 文本编码器,相对轻量级,并且在至少具有 10GB VRAM 的 GPU 上运行
> 更新模型`revAnimated_v2Rebirth
这个模型带有动漫效果,不拟真
<img src="https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2024-04-14%2011_10_10-Stable%20Diffusion.png?imageSlim" title="" alt="" width="435">
---
## nvidia GPU/CUDA
> 更新显卡驱动
更新完chatglm3和/stable diffusion后,发现启动报错,提供驱动异常
需要更新下:
```shell
sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers devices
sudo apt install nvidia-driver-535
```
> 查看显卡状态
`nvidia-smi`
![](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/2024-04-14%2011_31_21-Cmder.png?imageSlim)
本地显卡只有16GB,只能跑2个服务
幸好还有一个12gb的显卡,跑跑字幕/音频处理也ok
> 本地显卡部署,如何公网访问?
直接买个轻量云服务器就可以了,活动价十来块每个月
---
[^1]: [GitHub - THUDM/ChatGLM3: ChatGLM3 series: Open Bilingual Chat LLMs | 开源双语对话语言模型](https://github.com/THUDM/ChatGLM3)
[^2]: [GitHub - CompVis/stable-diffusion: A latent text-to-image diffusion model](https://github.com/CompVis/stable-diffusion)