XavierSpycy
commited on
Commit
•
ae2b451
1
Parent(s):
87c17cb
Update model card
Browse files
README.md
CHANGED
@@ -1,3 +1,81 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
|
5 |
+
# Meta-Llama-3-8B-Instruct-zh-10k
|
6 |
+
|
7 |
+
## Model Details / 模型细节
|
8 |
+
This model, `Meta-Llama-3-8B-Instruct-zh-10k`, was fine-tuned from the original [Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) due to its underperformance in Chinese. Utilizing the LoRa technology within the [LLaMA-Factory](https://github.com/hiyouga/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.
|
9 |
+
|
10 |
+
由于原模型[Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)在中文中表现欠佳,该模型`Meta-Llama-3-8B-Instruct-zh-10k`微调自此。在[LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)工具下,利用LoRa 技术,通过`alpaca_zh`、`alpaca_gpt4_zh`和`oaast_sft_zh`三个语料库上经过三个训练轮次,该模型被调整得更好地掌握了中文。三个语料库共计约10,000个样本的,这也是其名字中的`10k`的由来。
|
11 |
+
|
12 |
+
For efficient inference, the model was converted to the gguf format using [llama.cpp](https://github.com/ggerganov/llama.cpp) and underwent quantization, resulting in a compact model size of about 3.0 GB, suitable for distribution across various devices.
|
13 |
+
|
14 |
+
为了更高效的推理,该模型转化为了gguf格式并量化,从而得到了一个压缩到约 3.0 GB 大小的模型,以适应分发在各类设备上。
|
15 |
+
|
16 |
+
### LoRa Hardware / LoRa 硬件
|
17 |
+
- RTX 4090D x 1
|
18 |
+
|
19 |
+
> [!NOTE]
|
20 |
+
> The complete fine-tuning process took approximately 12 hours. 完整微调过程花费约12小时。
|
21 |
+
|
22 |
+
### Model Developer / 模型开发者
|
23 |
+
- **Pretraining**: Meta
|
24 |
+
- **Fine-tuning**: XavierSpycy [GitHub](https://github.com/XavierSpycy) | [Huggingface](https://huggingface.co/XavierSpycy)
|
25 |
+
|
26 |
+
- **预训练**: Meta
|
27 |
+
- **微调**: XavierSpycy [GitHub](https://github.com/XavierSpycy) | [Huggingface](https://huggingface.co/XavierSpycy)
|
28 |
+
|
29 |
+
|
30 |
+
### Usage / 用法
|
31 |
+
This model can be utilized like the original Meta-Llama3 but offers enhanced performance in Chinese.
|
32 |
+
|
33 |
+
该模型能够像原版的Meta-Llama3使用,但是它提供了更优的中文能力。
|
34 |
+
|
35 |
+
```python
|
36 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
37 |
+
|
38 |
+
tokenizer = AutoTokenizer.from_pretrained("XavierSpycy/Meta-Llama-3-8B-Instruct-zh-10k")
|
39 |
+
model = AutoModelForCausalLM.from_pretrained("XavierSpycy/Meta-Llama-3-8B-Instruct-zh-10k")
|
40 |
+
```
|
41 |
+
|
42 |
+
Further details about the deployment are available in the GitHub repository [Llama3Ops: From LoRa to Deployment with Llama3](https://github.com/XavierSpycy/llama-ops).
|
43 |
+
|
44 |
+
更多关于部署的细节可以在我的个人仓库 [Llama3Ops: From LoRa to Deployment with Llama3](https://github.com/XavierSpycy/llama-ops) 获得。
|
45 |
+
|
46 |
+
## Ethical Considerations, Safety & Risks / 伦理考量、安全性和危险
|
47 |
+
Please refer to [Meta Llama 3's Ethical Considerations](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct#ethical-considerations-and-limitations) for more information.
|
48 |
+
|
49 |
+
请参考 [Meta Llama 3's Ethical Considerations](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct#ethical-considerations-and-limitations),以获取更多细节。
|
50 |
+
|
51 |
+
## Limitations / 局限性
|
52 |
+
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.
|
53 |
+
|
54 |
+
该模型的全面的能力尚未测试。尽管它在中文对话中表现流利,但需要更多的测评以评估其完整的能力。中文语料库的质量和数量或许对模型输出有所限制。另外,微调模型中的灾难性遗忘尚未评估。
|
55 |
+
|
56 |
+
## Acknowledgements / 致谢
|
57 |
+
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.
|
58 |
+
|
59 |
+
我们感谢 Meta 的开源贡献,其极大地帮助了开发者社区,同时,也感谢致力于提升该社区的开发者们的努力。关键点包括偏见监控、负责任的使用指南和模型限制的透明度。
|
60 |
+
|
61 |
+
## References / 参考资料
|
62 |
+
|
63 |
+
```
|
64 |
+
@article{llama3modelcard,
|
65 |
+
title={Llama 3 Model Card},
|
66 |
+
author={AI@Meta},
|
67 |
+
year={2024},
|
68 |
+
url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
@inproceedings{zheng2024llamafactory,
|
73 |
+
title={LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Models},
|
74 |
+
author={Yaowei Zheng and Richong Zhang and Junhao Zhang and Yanhan Ye and Zheyan Luo and Zhangchi Feng and Yongqiang Ma},
|
75 |
+
booktitle={Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)},
|
76 |
+
address={Bangkok, Thailand},
|
77 |
+
publisher={Association for Computational Linguistics},
|
78 |
+
year={2024},
|
79 |
+
url={http://arxiv.org/abs/2403.13372}
|
80 |
+
}
|
81 |
+
```
|