This is a 3B-parameter decoder-only language model with a focus on maximizing Japanese language modeling performance and Japanese downstream task performance.
We conducted continued pretraining using Japanese data on the English language model,
StableLM-3B-4E1T, to transfer the model's knowledge and capabilities to Japanese.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("stabilityai/japanese-stablelm-3b-4e1t-base")
3model = AutoModelForCausalLM.from_pretrained(
4 "stabilityai/japanese-stablelm-3b-4e1t-base",
5 trust_remote_code=True,
6 torch_dtype="auto",
7)
8model.cuda()
9inputs = tokenizer("AI で科学研究を加速するには、", return_tensors="pt").to("cuda")
10tokens = model.generate(
11 **inputs,
12 max_new_tokens=64,
13 temperature=0.75,
14 top_p=0.95,
15 do_sample=True,
16)
17print(tokenizer.decode(tokens[0], skip_special_tokens=True))
The model is a decoder-only transformer similar to the LLaMA (
Touvron et al., 2023) architecture with the following modifications:
Around 100B tokens from a mixture of the following corpora were used for the continued pretraining.
The model is intended to be used by all individuals as a foundational model for application-specific fine-tuning without strict limitations on commercial use.
The pre-training dataset may have contained offensive or inappropriate content even after applying data cleansing filters which can be reflected in the model-generated text. We recommend users exercise reasonable caution when using these models in production systems. Do not use the model for any applications that may cause harm or distress to individuals or groups.
The continued pre-training was carried out by
Takuya Akiba.
Other aspects, including data preparation and evaluation, were handled by the Language Team of Stability AI Japan, notably
Meng Lee,
Fujiki Nakamura,
Makoto Shing,
Paul McCann, and
Naoki Orii.
We are grateful for the contributions of the EleutherAI Polyglot-JA team in helping us to collect a large amount of pre-training data in Japanese. Polyglot-JA members includes Hyunwoong Ko (Project Lead), Fujiki Nakamura (originally started this project when he commited to the Polyglot team), Yunho Mo, Minji Jung, KeunSeok Im, and Su-Kyeong Jang.
We are also appreciative of
AI Novelist/Sta (Bit192, Inc.) and the numerous contributors from
Stable Community Japan for assisting us in gathering a large amount of high-quality Japanese textual data for model training.