🚀 Llama 3 Youko 8B (rinna/llama-3-youko-8b)
Llama 3 Youko 8B
是基於 meta-llama/Meta-Llama-3-8B
在日語和英語混合數據集上進行持續預訓練的模型。持續預訓練顯著提升了模型在日語任務上的性能。

🚀 快速開始
你可以按照以下代碼示例來使用本模型:
import transformers
import torch
model_id = "rinna/llama-3-youko-8b"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto"
)
output = pipeline(
"西田幾多郎は、",
max_new_tokens=256,
do_sample=True
)
print(output[0]["generated_text"])
✨ 主要特性
- 多語言訓練:在日語和英語混合的約 220 億個標記上進行持續預訓練,提升了模型在日語任務上的性能。
- 模型架構:基於 32 層、隱藏層大小為 4096 的 Transformer 架構。
📦 安裝指南
文檔未提及安裝步驟,你可以參考 Hugging Face 上的相關模型使用說明進行安裝。
💻 使用示例
基礎用法
import transformers
import torch
model_id = "rinna/llama-3-youko-8b"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto"
)
output = pipeline(
"西田幾多郎は、",
max_new_tokens=256,
do_sample=True
)
print(output[0]["generated_text"])
📚 詳細文檔
模型概述
我們對 meta-llama/Meta-Llama-3-8B 在日語和英語混合數據集的約 22B 個標記上進行持續預訓練,顯著提升了模型在日語任務上的性能。
模型名稱 youko
來源於日語單詞 妖狐/ようこ/Youko
,它是一種日本神話生物(妖怪/ようかい/Youkai
)。
模型訓練相關信息
貢獻者
發佈日期
2024 年 5 月 1 日
基準測試
請參考 rinna's LM benchmark page (Sheet 20240507)。
分詞
模型使用原始的 meta-llama/Meta-Llama-3-8B 分詞器。
引用方式
@misc{rinna-llama-3-youko-8b,
title = {rinna/llama-3-youko-8b},
author = {Mitsuda, Koh and Chen, Xinqi and Wakatsuki, Toshiaki and Sawada, Kei},
url = {https://huggingface.co/rinna/llama-3-youko-8b}
}
@inproceedings{sawada2024release,
title = {Release of Pre-Trained Models for the {J}apanese Language},
author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
month = {5},
year = {2024},
pages = {13898--13905},
url = {https://aclanthology.org/2024.lrec-main.1213},
note = {\url{https://arxiv.org/abs/2404.01657}}
}
參考資料
@article{llama3modelcard,
title = {Llama 3 Model Card},
author = {AI@Meta},
year = {2024},
url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
}
@software{gpt-neox-library,
title = {{GPT}-{N}eo{X}: Large Scale Autoregressive Language Modeling in {P}y{T}orch},
author = {Andonian, Alex and Anthony, Quentin and Biderman, Stella and Black, Sid and Gali, Preetham and Gao, Leo and Hallahan, Eric and Levy-Kramer, Josh and Leahy, Connor and Nestler, Lucas and Parker, Kip and Pieler, Michael and Purohit, Shivanshu and Songz, Tri and Phil, Wang and Weinbach, Samuel},
doi = {10.5281/zenodo.5879544},
month = {8},
year = {2021},
version = {0.0.1},
url = {https://www.github.com/eleutherai/gpt-neox}
}
🔧 技術細節
模型是一個 32 層、隱藏層大小為 4096 的基於 Transformer 的語言模型,使用基於 EleutherAI/gpt-neox 的代碼進行訓練。訓練時使用 meta-llama/Meta-Llama-3-8B 模型初始化,並在多種日語和英語語料庫的約 220 億個標記上進行持續訓練。
📄 許可證
Meta Llama 3 Community License