RakutenAI-7B
Model Description
RakutenAI-7B is a systematic initiative that brings the latest technologies to the world of Japanese LLMs. RakutenAI-7B achieves the best scores on the Japanese language understanding benchmarks while maintaining a competitive performance on the English test sets among similar models such as OpenCalm, Elyza, Youri, Nekomata and Swallow. RakutenAI-7B leverages the Mistral model architecture and is based on Mistral-7B-v0.1 pre-trained checkpoint, exemplifying a successful retrofitting of the pre-trained model weights. Moreover, we extend Mistral's vocabulary from 32k to 48k to offer a better character-per-token rate for Japanese.
The technical report can be accessed at arXiv.
If you are looking for an instruction-tuned model, check RakutenAI-7B-instruct.
If you are looking for a chat-tuned model, check RakutenAI-7B-chat.
Model Evaluation Results
Model Name | 7-Avg. excl. XLSum-ja | Avg. | JCS | JNLI | MARC-ja | JSQuAD | Jaqket v2 | XLSum-ja | xWino | MGSM |
---|---|---|---|---|---|---|---|---|---|---|
accuracy | accuracy | accuracy | exact-match | exact-match | rouge-2 | accuracy | accuracy | |||
3-shots | 3-shots | 3-shots | 2-shots | 1-shot | 1-shot | 0-shot | 5-shots | |||
rakuten-ai-7b | 69.80 | 62.83 | 84.27 | 48.69 | 96.29 | 79.09 | 80.67 | 14.08 | 77.16 | 22.40 |
nekomata-7b | 66.01 | 58.83 | 85.43 | 40.14 | 96.80 | 76.29 | 71.99 | 8.59 | 73.83 | 17.60 |
japanese-stablelm-base-gamma-7b | 64.83 | 59.12 | 80.07 | 14.71 | 92.41 | 81.38 | 85.05 | 19.16 | 82.59 | 17.60 |
youri-7b | 62.71 | 56.90 | 76.94 | 51.11 | 90.96 | 57.45 | 78.09 | 16.27 | 78.00 | 6.40 |
swallow-7b | 60.86 | 55.18 | 78.91 | 15.16 | 90.27 | 73.28 | 80.24 | 15.41 | 76.96 | 11.20 |
elyza-japanese-Llama-2-7b | 60.24 | 53.26 | 75.60 | 50.74 | 87.51 | 71.48 | 57.56 | 4.40 | 71.22 | 7.60 |
elyza-japanese-Llama-2-7b-fast | 58.31 | 51.34 | 71.49 | 45.77 | 86.61 | 70.91 | 64.18 | 2.54 | 61.63 | 7.60 |
open-calm-7b | 45.27 | 39.67 | 62.65 | 31.92 | 85.37 | 38.05 | 33.42 | 0.45 | 65.07 | 0.40 |
Our model achieves the highest average score, more than 3 points ahead of the next best model. The models are sorted by 7-Avg. We use the following commit https://github.com/Stability-AI/lm-evaluation-harness/tree/0fa86429679f521161d5b81a94c0c385e0a0976d for Japanese LM-Harness with v0.3 prompt version.
Model Name | Avg. | ARC | HellaSwag | MMLU | TruthfulQA |
---|---|---|---|---|---|
accuracy | accuracy | accuracy | accuracy | ||
25-shots | 10-shots | 5-shots | 6-shots | ||
rakuten-ai-7b | 60.50 | 60.24 | 82.20 | 61.31 | 38.25 |
japanese-stablelm-base-gamma-7b | 56.08 | 50.60 | 77.43 | 54.99 | 41.30 |
elyza-japanese-Llama-2-7b | 52.76 | 51.62 | 76.54 | 44.85 | 38.02 |
elyza-japanese-Llama-2-7b-fast | 52.07 | 51.79 | 75.46 | 44.41 | 36.63 |
nekomata-7b | 51.97 | 47.35 | 72.78 | 48.38 | 39.38 |
youri-7b | 50.60 | 49.15 | 75.02 | 42.36 | 35.89 |
swallow-7b | 49.90 | 47.35 | 72.20 | 39.36 | 40.68 |
open-calm-7b | 29.87 | 20.56 | 31.01 | 23.73 | 44.16 |
Our model achieves the highest average score, more than 4 points ahead of the next best model. We use the following commit for English LM-Harness https://github.com/EleutherAI/lm-evaluation-harness/tree/b281b0921b636bc36ad05c0b0b0763bd6dd43463.
An independent evaluation by Kamata et.al. for Nejumi LLMリーダーボード Neo using a weighted average of llm-jp-eval and Japanese MT-bench also confirms the highest performance of chat/instruct versions of RakutenAI-7B among Open LLMs of similar sizes, with a score of 0.393/0.331 respectively, as of 22nd March 2024.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "Rakuten/RakutenAI-7B"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype="auto", device_map="auto")
model.eval()
requests = [
"南硫黄島原生自然環境保全地域は、自然",
"The capybara is a giant cavy rodent",
]
for req in requests:
input_ids = tokenizer.encode(req, return_tensors="pt").to(device=model.device)
tokens = model.generate(
input_ids,
max_new_tokens=256,
do_sample=True,
repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id,
)
out = tokenizer.decode(tokens[0], skip_special_tokens=True)
print("INPUT:\n" + req)
print("OUTPUT:\n" + out)
print()
print()
Model Details
- Developed by: Rakuten Group, Inc.
- Language(s): Japanese, English
- License: This model is licensed under Apache License, Version 2.0.
Limitations and Bias
The suite of RakutenAI-7B models is capable of generating human-like text on a wide range of topics. However, like all LLMs, they have limitations and can produce biased, inaccurate, or unsafe outputs. Please exercise caution and judgement while interacting with them.
Citation
For citing our work on the suite of RakutenAI-7B models, please use:
@misc{rakutengroup2024rakutenai7b,
title={RakutenAI-7B: Extending Large Language Models for Japanese},
author={{Rakuten Group, Inc.} and Aaron Levine and Connie Huang and Chenguang Wang and Eduardo Batista and Ewa Szymanska and Hongyi Ding and Hou Wei Chou and Jean-François Pessiot and Johanes Effendi and Justin Chiu and Kai Torben Ohlhus and Karan Chopra and Keiji Shinzato and Koji Murakami and Lee Xiong and Lei Chen and Maki Kubota and Maksim Tkachenko and Miroku Lee and Naoki Takahashi and Prathyusha Jwalapuram and Ryutaro Tatsushima and Saurabh Jain and Sunil Kumar Yadav and Ting Cai and Wei-Te Chen and Yandi Xia and Yuki Nakayama and Yutaka Higashiyama},
year={2024},
eprint={2403.15484},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 2,693