Youri 7b
基于llama2-7b在日英混合数据集上进行持续预训练的大语言模型,在日语任务上性能显著提升
下载量 3,824
发布时间 : 10/30/2023
模型简介
该模型专注于日语文本生成和理解任务,通过持续预训练优化了日语处理能力
模型特点
日语优化
在约40B的日英混合语料上进行持续预训练,显著提升了日语任务性能
基于Llama2
以llama2-7b为基础模型进行优化,继承了其优秀的架构特性
文化命名
模型名称'youri'源自日本神话生物'妖狸/ようり/Youri'
模型能力
日语文本生成
英语文本生成
长文本续写
使用案例
学术研究
哲学文本生成
生成关于日本哲学家西田幾多郎的学术文本
示例中展示了模型能生成连贯的哲学相关内容
内容创作
日语文章续写
根据开头提示续写日语文章
模型能生成200字以上的连贯文本
🚀 rinna/youri-7b
rinna/youri-7b
模型基于llama2-7b在日英混合数据集上进行持续预训练,在日语任务上性能显著提升。模型名称源于日本神话生物,由多位贡献者开发,于2023年10月31日发布。
🚀 快速开始
该模型可通过Hugging Face的transformers
库轻松加载使用。以下是一个简单的使用示例:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rinna/youri-7b")
model = AutoModelForCausalLM.from_pretrained("rinna/youri-7b")
if torch.cuda.is_available():
model = model.to("cuda")
text = "西田幾多郎は、"
token_ids = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt")
with torch.no_grad():
output_ids = model.generate(
token_ids.to(model.device),
max_new_tokens=200,
min_new_tokens=200,
do_sample=True,
temperature=1.0,
top_p=0.95,
pad_token_id=tokenizer.pad_token_id,
bos_token_id=tokenizer.bos_token_id,
eos_token_id=tokenizer.eos_token_id
)
output = tokenizer.decode(output_ids.tolist()[0])
print(output)
"""
西田幾多郎は、プラトンの復権を主張し、対する従来の西洋哲学は、近代の合理主義哲学に委ね、「従来の哲学は破 壊されてしまった」と述べている。 西田幾多郎は、西洋近代哲学の「徹底的な検討」を拒んだ。それは、「現代的理解の脆弱性を補う筈の、従来のヨーロッパに伝わる哲学的な方法では到底それができなかったからである」とい
"""
✨ 主要特性
- 持续预训练:在约40B的日英混合语料上对llama2-7b进行持续预训练,显著提升了模型在日语任务上的性能。
- 模型架构:基于32层、隐藏层大小为4096的Transformer架构。具体架构细节可参考llama2 paper。
- 命名由来:模型名称
youri
源自日本神话生物妖狸/ようり/Youri
。 - 开发信息:使用基于EleutherAI/gpt-neox的代码进行训练,由Tianyu Zhao、Akio Kaga和Kei Sawada等贡献者开发,于2023年10月31日发布。
📦 安装指南
要使用该模型,你需要安装transformers
库:
pip install transformers torch
💻 使用示例
基础用法
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rinna/youri-7b")
model = AutoModelForCausalLM.from_pretrained("rinna/youri-7b")
if torch.cuda.is_available():
model = model.to("cuda")
text = "西田幾多郎は、"
token_ids = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt")
with torch.no_grad():
output_ids = model.generate(
token_ids.to(model.device),
max_new_tokens=200,
min_new_tokens=200,
do_sample=True,
temperature=1.0,
top_p=0.95,
pad_token_id=tokenizer.pad_token_id,
bos_token_id=tokenizer.bos_token_id,
eos_token_id=tokenizer.eos_token_id
)
output = tokenizer.decode(output_ids.tolist()[0])
print(output)
📚 详细文档
分词器
该模型使用原始的llama-2分词器。
基准测试
可参考rinna's LM benchmark page (Sheet 20231031)获取详细的基准测试结果。
引用方式
@misc{rinna-youri-7b,
title = {rinna/youri-7b},
author = {Zhao, Tianyu and Kaga, Akio and Sawada, Kei},
url = {https://huggingface.co/rinna/youri-7b}
}
@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}}
}
参考资料
@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}
}
评估结果
详细的评估结果可参考Open LLM Leaderboard Evaluation Results,具体结果如下:
指标 | 值 |
---|---|
平均值 | 47.11 |
AI2 Reasoning Challenge (25-Shot) | 49.06 |
HellaSwag (10-Shot) | 74.89 |
MMLU (5-Shot) | 42.22 |
TruthfulQA (0-shot) | 36.03 |
Winogrande (5-shot) | 71.82 |
GSM8k (5-shot) | 8.64 |
🔧 技术细节
- 训练数据:模型在约40B的日英混合语料上进行持续预训练,语料包括Japanese CC-100、Japanese C4、Japanese OSCAR、The Pile、Wikipedia和rinna curated Japanese dataset。
- 模型初始化:使用llama2-7b模型进行初始化。
📄 许可证
该模型遵循The llama2 license。
Phi 2 GGUF
其他
Phi-2是微软开发的一个小型但强大的语言模型,具有27亿参数,专注于高效推理和高质量文本生成。
大型语言模型 支持多种语言
P
TheBloke
41.5M
205
Roberta Large
MIT
基于掩码语言建模目标预训练的大型英语语言模型,采用改进的BERT训练方法
大型语言模型 英语
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基础模型的蒸馏版本,在保持相近性能的同时更轻量高效,适用于序列分类、标记分类等自然语言处理任务。
大型语言模型 英语
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一个多语言大语言模型,针对多语言对话用例进行了优化,在常见的行业基准测试中表现优异。
大型语言模型 英语
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基于100种语言的2.5TB过滤CommonCrawl数据预训练的多语言模型,采用掩码语言建模目标进行训练。
大型语言模型 支持多种语言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基于Transformer架构的英语预训练模型,通过掩码语言建模目标在海量文本上训练,支持文本特征提取和下游任务微调
大型语言模型 英语
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI发布的开放预训练Transformer语言模型套件,参数量从1.25亿到1750亿,旨在对标GPT-3系列性能,同时促进大规模语言模型的开放研究。
大型语言模型 英语
O
facebook
6.3M
198
1
基于transformers库的预训练模型,适用于多种NLP任务
大型语言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多语言大语言模型系列,包含8B、70B和405B参数规模,支持8种语言和代码生成,优化了多语言对话场景。
大型语言模型
Transformers 支持多种语言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基础版是由Google开发的文本到文本转换Transformer模型,参数规模2.2亿,支持多语言NLP任务。
大型语言模型 支持多种语言
T
google-t5
5.4M
702
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98