Views
No views yet
In order to promote the open research of large models in the Chinese NLP community, this project open sourced the Chinese LLaMA model and the Alpaca large model with fine-tuned instructions. Based on the original LLaMA, these models expand the Chinese vocabulary and use Chinese data for secondary pre-training, which further improves the basic semantic understanding of Chinese. At the same time, the Chinese Alpaca model further uses Chinese instruction data for fine-tuning, which significantly improves the model's ability to understand and execute instructions. For details, please refer to the technical report (Cui, Yang, and Yao, 2023).
rabitt/Chinese-Alpaca-Plus-13B-GPTQ.Chinese-Alpaca-Plus-13B-GPTQ.Error no file named pytorch_model.bin ... in the bottom right, ignore it - it's temporary.GPTQ parameters on the right: Bits = 4, Groupsize = 128, model_type = Llamaconvert_llama_weights_to_hf.py1wget https://github.com/huggingface/transformers/raw/main/src/transformers/models/llama/convert_llama_weights_to_hf.py
2PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \
3python convert_llama_weights_to_hf.py \
4 --input_dir ./llama \
5 --model_size 13B \
6 --output_dir ./llama-13b-hfChinese-LLaMA-Plus-13B and Chinese-Alpaca-Plus-13B into LLaMA with merge_llama_with_chinese_lora.py1wget https://github.com/ymcui/Chinese-LLaMA-Alpaca/raw/main/scripts/merge_llama_with_chinese_lora.py
2python merge_llama_with_chinese_lora.py \
3 --base_model ./llama-13b-hf \
4 --lora_model ./Chinese-LLaMA-Plus-LoRA-13B,./Chinese-Alpaca-Plus-LoRA-13B \
5 --output_type huggingface \
6 --output_dir ./Chinese-Alpaca-Plus-13BGPTQ-for-LLaMa1mkdir -p Chinese-Alpaca-Plus-13B-GPTQ
2git clone https://github.com/qwopqwop200/GPTQ-for-LLaMa.git
3cd GPTQ-for-LLaMa
4# export CUDA_VISIBLE_DEVICES=0
5python llama.py ../Chinese-Alpaca-Plus-13B c4 --wbits 4 --true-sequential --act-order --groupsize 128 --save_safetensors ../Chinese-Alpaca-Plus-13B-GPTQ/Chinese-Alpaca-Plus-13B-GPTQ-4bit-128g.safetensors1@article{chinese-llama-alpaca,
2 title={Efficient and Effective Text Encoding for Chinese LLaMA and Alpaca},
3 author={Cui, Yiming and Yang, Ziqing and Yao, Xin},
4 journal={arXiv preprint arXiv:2304.08177},
5 url={https://arxiv.org/abs/2304.08177},
6 year={2023}
7}