This repository provides large language models developed by LLM-jp, a collaborative project launched in Japan.
| Pre-trained models |
| llm-jp-13b-v2.0 |
Checkpoints format: Hugging Face Transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-13b-v2.0")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-13b-v2.0", device_map="auto", torch_dtype=torch.bfloat16)
text = "自然言語処理とは何か"
tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
tokenized_input,
max_new_tokens=100,
do_sample=True,
top_p=0.95,
temperature=0.7,
repetition_penalty=1.05,
)[0]
print(tokenizer.decode(output))
| Model | Params | Layers | Hidden size | Heads | Context length |
|---|---|---|---|---|---|
| 13b model | 13b | 40 | 5120 | 40 | 4096 |
Pre-training:
Instruction tuning:
The tokenizer of this model is based on huggingface/tokenizers Unigram byte-fallback model.
The vocabulary entries were converted from llm-jp-tokenizer v2.2 (100k: code20K_en40K_ja60K.ver2.2).
Please refer to README.md of llm-ja-tokenizer for details on the vocabulary construction procedure (the pure SentencePiece training does not reproduce our vocabulary).
The models have been pre-trained using a blend of the following datasets.
| Language | Dataset | Tokens |
|---|---|---|
| Japanese | Wikipedia | 1.4B |
| Common Crawl | 130.7B | |
| English | Wikipedia | 4.7B |
| The Pile | 110.3B | |
| Codes | The Stack | 8.7B |
The models have been fine-tuned on the following datasets.
| Language | Dataset | description |
|---|---|---|
| Japanese | ichikara-instruction-004-001 | A manually constructed Japanese instruction dataset |
| answer-carefully-001 | A manually constructed Japanese instruction dataset focusing on LLMs' safety | |
| databricks-dolly-15k-ja | databricks-dolly-15k translated into Japanese using DeepL | |
| oasst1-21k-ja | A subset of oasst1 translated into Japanese using DeepL | |
| oasst2-33k-ja | A subset of oasst2 translated into Japanese using DeepL | |
| English | databricks-dolly-15k | - |
| oasst1-21k-en | A subset of oasst1 | |
| oasst2-33k-en | A subset of oasst2 |
You can view the evaluation results of several LLMs on this leaderboard. We used llm-jp-eval (v1.3.0) for the evaluation.
Besides, we used LLM-as-a-judge frameworks, Japanese Vicuna QA Benchmark and Japanese MT Bench, for evaluation. For details, please refer to our technical blog (in Japanese).
The models released here are still in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.
llm-jp(at)nii.ac.jp
The names are listed in alphabetical order.
Namgi Han, Tatsuya Hiraoka, Hirokazu Kiyomaru, Takashi Kodama, and Hiroshi Matsuda.
This repository provides large language models developed by LLM-jp, a collaborative project launched in Japan.
| Pre-trained models |
| llm-jp-13b-v2.0 |
Checkpoints format: Hugging Face Transformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-13b-v2.0")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-13b-v2.0", device_map="auto", torch_dtype=torch.bfloat16)
text = "自然言語処理とは何か"
tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
tokenized_input,
max_new_tokens=100,
do_sample=True,
top_p=0.95,
temperature=0.7,
repetition_penalty=1.05,
)[0]
print(tokenizer.decode(output))
| Model | Params | Layers | Hidden size | Heads | Context length |
|---|---|---|---|---|---|
| 13b model | 13b | 40 | 5120 | 40 | 4096 |
Pre-training:
Instruction tuning:
The tokenizer of this model is based on huggingface/tokenizers Unigram byte-fallback model.
The vocabulary entries were converted from llm-jp-tokenizer v2.2 (100k: code20K_en40K_ja60K.ver2.2).
Please refer to README.md of llm-ja-tokenizer for details on the vocabulary construction procedure (the pure SentencePiece training does not reproduce our vocabulary).
The models have been pre-trained using a blend of the following datasets.
| Language | Dataset | Tokens |
|---|---|---|
| Japanese | Wikipedia | 1.4B |
| Common Crawl | 130.7B | |
| English | Wikipedia | 4.7B |
| The Pile | 110.3B | |
| Codes | The Stack | 8.7B |
The models have been fine-tuned on the following datasets.
| Language | Dataset | description |
|---|---|---|
| Japanese | ichikara-instruction-004-001 | A manually constructed Japanese instruction dataset |
| answer-carefully-001 | A manually constructed Japanese instruction dataset focusing on LLMs' safety | |
| databricks-dolly-15k-ja | databricks-dolly-15k translated into Japanese using DeepL | |
| oasst1-21k-ja | A subset of oasst1 translated into Japanese using DeepL | |
| oasst2-33k-ja | A subset of oasst2 translated into Japanese using DeepL | |
| English | databricks-dolly-15k | - |
| oasst1-21k-en | A subset of oasst1 | |
| oasst2-33k-en | A subset of oasst2 |
You can view the evaluation results of several LLMs on this leaderboard. We used llm-jp-eval (v1.3.0) for the evaluation.
Besides, we used LLM-as-a-judge frameworks, Japanese Vicuna QA Benchmark and Japanese MT Bench, for evaluation. For details, please refer to our technical blog (in Japanese).
The models released here are still in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.
llm-jp(at)nii.ac.jp
The names are listed in alphabetical order.
Namgi Han, Tatsuya Hiraoka, Hirokazu Kiyomaru, Takashi Kodama, and Hiroshi Matsuda.