浏览文章
文章信息
如何训练Gpt4all
475
1、安装依赖
- 为您的平台安装 Qt 6.x https://doc.qt.io/qt-6/get-and-install-qt.html
- 为您的平台安装 cmake https://cmake.org/install/win下载:https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-windows-x86_64.msi
- 下载https://huggingface.co/EleutherAI/gpt-j-6b
其他模型下载地址:https://huggingface.co/EleutherAI- 克隆这个 repo 并构建
git clone https://github.com/ggerganov/ggml.git
cd ggml
mkdir build
cd build
cmake ..
cmake --build . --parallel
python3 ../ggml/examples/gpt-j/convert-h5-to-ggml.py /path/to/your/local/copy/of/EleutherAI/gpt-j-6B 0
./bin/gpt-j-quantize /path/to/your/local/copy/of/EleutherAI/gpt-j-6B/ggml-model-f32.bin ./ggml-model-q4_0.bin 2
然后:
git clone --recurse-submodules https://github.com/nomic-ai/gpt4all-chat
cd gpt4all-chat
mkdir build
cd build
cmake ..
cmake --build . --parallel
mv /path/to/ggml-model-q4_0.bin bin
./bin/chat