赞
踩
在《大语言模型之十二 SentencePiece扩充LLama2中文词汇》一文中已经扩充好了中文词汇表,接下来就是使用整理的中文语料对模型进行预训练了。这里先跳过预训练环节。先试用已经训练好的模型,看看如何推理。
这一步骤会合并LoRA权重,生成全量模型权重。此处可以选择输出PyTorch版本权重(.pth文件)或者输出HuggingFace版本权重(.bin文件)。执行以下命令:
$ python scripts/merge_llama2_with_chinese_lora_low_mem.py \
--base_model path_to_original_llama2_hf_dir \
--lora_model path_to_chinese_llama2_or_alpaca2_lora \
--output_type huggingface \
--output_dir path_to_output_dir
参数说明:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。