一、MOSS仓库代码下载及环境准备
-
下载本仓库内容至本地/远程服务器
git clone https://github.com/OpenLMLab/MOSS.git
-
安装依赖
cd MOSS
pip install -r requirements.txt
-
使用量化模型,需要安装triton
pip install triton
注意:使用triton可能会出现triton not installed报错,如果确认已经安装过triton,可以从仓库(下载的Moss源码)中将下载的custom_autotune.py文件放到huggingface modules对应的文件夹中,进入仓库目录,执行:
cp custom_autotune.py ~/.cache/huggingface/modules/transformers_modules/local/
二、下载对应的MOSS模型模型
我下载的模型是moss-moon-003-sft-int8。
其他Moss当前所有模型介绍及下载可参考如下地址(github中也有对应的地址链接):https://huggingface.co/fnlp
模型介绍
-
moss-moon-003-base: MOSS-003基座模型,在高质量中英文语料上自监督预训练得到,预训练语料包含约700B单词,计算量约6.67x1022次浮点数运算。
-
moss-moon-003-sf