license: apache-2.0
Meta-Llama-3-8B-Instruct-zh-10k
Model Details / 模型细节
This model, Meta-Llama-3-8B-Instruct-zh-10k
, was fine-tuned from the original Meta-Llama-3-8B-Instruct due to its underperformance in Chinese. Utilizing the LoRa technology within the LLaMA-Factory utilities, this model was adapted to better handle Chinese through three epochs on three corpora: alpaca_zh
, alpaca_gpt4_zh
, and oaast_sft_zh
, amounting to approximately 10,000 examples. This is reflected in the 10k
in its name.
由于原模型Meta-Llama-3-8B-Instruct在中文中表现欠佳,该模型Meta-Llama-3-8B-Instruct-zh-10k
微调自此。在LLaMA-Factory工具下,利用LoRa 技术,通过alpaca_zh
、alpaca_gpt4_zh
和oaast_sft_zh
三个语料库上经过三个训练轮次,该模型被调整得更好地掌握了中文。三个语料库共计约10,000个样本的,这也是其名字中的10k
的由来。
For efficient inference, the model was converted to the gguf format using llama.cpp and underwent quantization, resulting in a compact model size of about 3.0 GB, suitable for distribution across various devices.
为了更高效的推理,该模型转化为了gguf格式并量化,从而得到了一个压缩到约 3.0 GB 大小的模型,以适应分发在各类设备上。
LoRa Hardware / LoRa 硬件
- RTX 4090D x 1
The complete fine-tuning process took approximately 12 hours. 完整微调过程花费约12小时。
Model Developer / 模型开发者
Pretraining: Meta
Fine-tuning: XavierSpycy GitHub | Huggingface
预训练: Meta
微调: XavierSpycy GitHub | Huggingface
Usage / 用法
This model can be utilized like the original Meta-Llama3 but offers enhanced performance in Chinese.
该模型能够像原版的Meta-Llama3使用,但是它提供了更优的中文能力。
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("XavierSpycy/Meta-Llama-3-8B-Instruct-zh-10k")
model = AutoModelForCausalLM.from_pretrained("XavierSpycy/Meta-Llama-3-8B-Instruct-zh-10k")
Further details about the deployment are available in the GitHub repository Llama3Ops: From LoRa to Deployment with Llama3.
更多关于部署的细节可以在我的个人仓库 Llama3Ops: From LoRa to Deployment with Llama3 获得。
Ethical Considerations, Safety & Risks / 伦理考量、安全性和危险
Please refer to Meta Llama 3's Ethical Considerations for more information.
请参考 Meta Llama 3's Ethical Considerations,以获取更多细节。
Limitations / 局限性
The comprehensive abilities of the model have not been fully tested. While it performs smoothly in Chinese conversations, further benchmarks are required to evaluate its full capabilities. The quality and quantity of the Chinese corpora used may also limit model outputs. Additionally, catastrophic forgetting in the fine-tuned model has not been evaluated.
该模型的全面的能力尚未测试。尽管它在中文对话中表现流利,但需要更多的测评以评估其完整的能力。中文语料库的质量和数量或许对模型输出有所限制。另外,微调模型中的灾难性遗忘尚未评估。
Acknowledgements / 致谢
We thank Meta for their open-source contributions, which have greatly benefited the developer community, and acknowledge the collaborative efforts of developers in enhancing this community. Key points include bias monitoring, responsible usage guidelines, and transparency in model limitations.
我们感谢 Meta 的开源贡献,其极大地帮助了开发者社区,同时,也感谢致力于提升该社区的开发者们的努力。关键点包括偏见监控、负责任的使用指南和模型限制的透明度。
References / 参考资料
@article{llama3modelcard,
title={Llama 3 Model Card},
author={AI@Meta},
year={2024},
url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
}
@inproceedings{zheng2024llamafactory,
title={LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Models},
author={Yaowei Zheng and Richong Zhang and Junhao Zhang and Yanhan Ye and Zheyan Luo and Zhangchi Feng and Yongqiang Ma},
booktitle={Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)},
address={Bangkok, Thailand},
publisher={Association for Computational Linguistics},
year={2024},
url={http://arxiv.org/abs/2403.13372}
}