在个人电脑运行一个大模型
cpp (c++ c plus plus)
- 纯 C/C++ 实现,无需外部依赖。
- 针对使用 ARM NEON、Accelerate 和 Metal 框架的 Apple 芯片进行了优化。
- 支持适用于 x86 架构的 AVX、AVX2 和 AVX512。
- 提供 F16/F32 混合精度,并支持 2 位至 8 位整数量化。
参考:https://github.com/li-plus/chatglm.cpp
参考:https://github.com/li-plus/chatglm.cpp
部署 chatglm3
git clone --recursive https://github.com/li-plus/chatglm.cpp.git && cd chatglm.cpp
git submodule update --init --recursive
Quantize Model 量化模型
python3 -m pip install torch tabulate tqdm transformers accelerate sentencepiece
通过 convert 专为 G