llm-jp/llm-jp-3-8x13b

Model

llm-jp-3-8x13b

0

3 commits

4 linked in READMEs

updated Mar 27, 2025

See the code

README

llm-jp-3-8x13b

LLM-jp-3 is the series of large language models developed by the Research and Development Center for Large Language Models at the National Institute of Informatics.

This repository provides the llm-jp-3-8x13b model. For an overview of the LLM-jp-3 models across different parameter sizes, please refer to:

Checkpoints format: Hugging Face Transformers

Required Libraries and Their Versions

  • torch>=2.3.0
  • transformers>=4.40.1
  • tokenizers>=0.19.1
  • accelerate>=0.29.3
  • flash-attn>=2.5.8

Usage

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-3-8x13b")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-8x13b", 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 Details

  • Model type: Transformer-based Language Model
  • Total seen tokens: 2.1T tokens
ParamsLayersHidden sizeHeadsRouted ExpertsActivated ExpertsContext lengthEmbedding parametersNon-embedding parametersActivated parametersTotal parameters
8x1.8b24204816824096407,498,7528,858,863,6162,924,279,8089,266,362,368
8x13b405120408240961,018,746,88072,144,081,92022,200,806,40073,162,828,800

If you would like to learn more about the pretraining of the LLM-jp-3 MoE series, please refer to this blog post.

Tokenizer

The tokenizer of this model is based on huggingface/tokenizers Unigram byte-fallback model. The vocabulary entries were converted from llm-jp-tokenizer v3.0. Please refer to README.md of llm-jp-tokenizer for details on the vocabulary construction procedure (the pure SentencePiece training does not reproduce our vocabulary).

Datasets

Pre-training

The models have been pre-trained using a blend of the following datasets.

LanguageDatasetTokens
JapaneseWikipedia2.6B
Common Crawl762.8B
WARP/PDF237.3B
WARP/HTML2.7B
Kaken1.8B
EnglishWikipedia4.7B
Dolma/CC-head608.5B
Dolma/C4181.6B
Dolma/Reddit83.1B
Dolma/PeS2o62.9B
Dolma/Gutenberg5.5B
Dolma/Wiki3.9B
CodeThe Stack114.1B
ChineseWikipedia0.8B
KoreanWikipedia0.3B

Post-training

We have fine-tuned the pre-trained checkpoint with supervised fine-tuning and further aligned it with Direct Preference Optimization.

Supervised Fine-tuning

The datasets used for supervised fine-tuning are as follows:

LanguageDatasetDescription
Japaneseichikara-instruction-004-002A manually constructed instruction dataset.
AnswerCarefully (ver2.0)A manually constructed instruction dataset focusing on LLMs' safety.
ichikara-instruction-formatA small subset of the ichikara-instruction dataset, edited with some constraints on the output format.
AutoMultiTurnByCalm3-22BA synthetic instruction dataset.
ramdom-to-fixed-multiturn-Calm3A synthetic instruction dataset.
wizardlm8x22b-logical-math-coding-sft-jaA synthetic instruction dataset.
magpie-sft-v1.0A synthetic instruction dataset we created.
EnglishDaring-Anteater-
FLAN-
Japanese & EnglishSynthetic-JP-EN-Coding-DatasetA synthetic instruction dataset.

Direct Preference Optimization

The datasets used for supervised fine-tuning are as follows:

LanguageDatasetDescription
Japaneseaya-ja-evol-instA synthetic preference dataset focusing on LLMs' helpfulness.
ac-self-instA synthetic preference dataset focusing on LLMs' safety.

Evaluation

llm-jp-eval (v1.4.1)

We evaluated the models using 100 examples from the dev split. Note that we skipped the CG (Code Generation) task.

Model nameaverageELFAHEMCMRMTNLIQARCSUM
llm-jp/llm-jp-3-7.2b0.4550.4000.2660.3500.5470.4300.8090.3620.5450.8140.028
llm-jp/llm-jp-3-7.2b-instruct30.5140.4470.2450.4350.6930.5100.8260.5880.4970.8380.059
llm-jp/llm-jp-3-172b0.5430.4080.2660.5150.7630.6700.8230.5740.5690.8290.015
llm-jp/llm-jp-3-172b-instruct30.6130.5170.2710.5700.8730.7300.8440.7280.6010.8830.112
------------------------------------
llm-jp/llm-jp-3-8x1.8b0.4540.3870.2410.2650.5300.5100.8100.4760.5370.7550.026
llm-jp/llm-jp-3-8x1.8b-instruct20.5130.4480.2300.4050.6430.5600.8150.5660.5610.8370.066
llm-jp/llm-jp-3-8x1.8b-instruct30.5150.4520.2270.4250.6830.5400.8210.5580.5450.8190.075
llm-jp/llm-jp-3-8x13b0.5870.5450.2910.4950.8030.7200.8380.5780.6460.8540.097
llm-jp/llm-jp-3-8x13b-instruct20.6260.5520.2890.5250.8970.7500.8360.6820.6370.9070.182
llm-jp/llm-jp-3-8x13b-instruct30.6250.5480.2850.5250.9070.7600.8390.6880.6270.9040.164

Japanese MT Bench

We evaluated the models using gpt-4o-2024-08-06. The scores represent the average values obtained from five rounds of inference and evaluation. For more details, please refer to the codes.

Model nameaveragecodingextractionhumanitiesmathreasoningroleplaystemwriting
llm-jp/llm-jp-3-7.2b-instruct35.793.465.948.153.954.467.516.236.66
llm-jp/llm-jp-3-172b-instruct36.364.246.668.114.585.747.446.767.36
------------------------------
llm-jp/llm-jp-3-8x1.8b-instruct25.473.474.907.783.514.386.846.356.54
llm-jp/llm-jp-3-8x1.8b-instruct35.523.605.237.813.874.536.405.986.72
llm-jp/llm-jp-3-8x13b-instruct26.624.506.538.565.306.037.867.107.12
llm-jp/llm-jp-3-8x13b-instruct36.584.906.418.325.375.207.757.247.48

AnswerCarefully-Eval

AnswerCarefully-Eval assesses the safety of Japanese language model outputs using the LLM-as-a-Judge approach, based on the test set from llm-jp/AnswerCarefully. We evaluated the models using gpt-4-0613. The scores represent the average values obtained from five rounds of inference and evaluation.

Risks and Limitations

The models released here are in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.

Send Questions to

llm-jp(at)nii.ac.jp

License

Apache License, Version 2.0

How to cite

If you find our work helpful, please feel free to cite the paper.

@inproceedings{
    nakamura2025dropupcycling,
    title={Drop-Upcycling: Training Sparse Mixture of Experts with Partial Re-initialization},
    author={Taishi Nakamura and Takuya Akiba and Kazuki Fujii and Yusuke Oda and Rio Yokota and Jun Suzuki},
    booktitle={The Thirteenth International Conference on Learning Representations},
    year={2025},
    url={https://openreview.net/forum?id=gx1wHnf5Vp}
}

Model Card Authors

The names are listed in alphabetical order.

Hirokazu Kiyomaru, Takashi Kodama and Taishi Nakamura.

mixtral
safetensors
text-generation
text-generation-inference
transformers

Contributors

Taishi-N324

2 commits

Taka008

1 commits

llm-jp/llm-jp-3-8x13b

Model

llm-jp-3-8x13b

0

3 commits

4 linked in READMEs

updated Mar 27, 2025

See the code

README

llm-jp-3-8x13b

LLM-jp-3 is the series of large language models developed by the Research and Development Center for Large Language Models at the National Institute of Informatics.

This repository provides the llm-jp-3-8x13b model. For an overview of the LLM-jp-3 models across different parameter sizes, please refer to:

Checkpoints format: Hugging Face Transformers

Required Libraries and Their Versions

  • torch>=2.3.0
  • transformers>=4.40.1
  • tokenizers>=0.19.1
  • accelerate>=0.29.3
  • flash-attn>=2.5.8

Usage

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-3-8x13b")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-8x13b", 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 Details

  • Model type: Transformer-based Language Model
  • Total seen tokens: 2.1T tokens
ParamsLayersHidden sizeHeadsRouted ExpertsActivated ExpertsContext lengthEmbedding parametersNon-embedding parametersActivated parametersTotal parameters
8x1.8b24204816824096407,498,7528,858,863,6162,924,279,8089,266,362,368
8x13b405120408240961,018,746,88072,144,081,92022,200,806,40073,162,828,800

If you would like to learn more about the pretraining of the LLM-jp-3 MoE series, please refer to this blog post.

Tokenizer

The tokenizer of this model is based on huggingface/tokenizers Unigram byte-fallback model. The vocabulary entries were converted from llm-jp-tokenizer v3.0. Please refer to README.md of llm-jp-tokenizer for details on the vocabulary construction procedure (the pure SentencePiece training does not reproduce our vocabulary).

Datasets

Pre-training

The models have been pre-trained using a blend of the following datasets.

LanguageDatasetTokens
JapaneseWikipedia2.6B
Common Crawl762.8B
WARP/PDF237.3B
WARP/HTML2.7B
Kaken1.8B
EnglishWikipedia4.7B
Dolma/CC-head608.5B
Dolma/C4181.6B
Dolma/Reddit83.1B
Dolma/PeS2o62.9B
Dolma/Gutenberg5.5B
Dolma/Wiki3.9B
CodeThe Stack114.1B
ChineseWikipedia0.8B
KoreanWikipedia0.3B

Post-training

We have fine-tuned the pre-trained checkpoint with supervised fine-tuning and further aligned it with Direct Preference Optimization.

Supervised Fine-tuning

The datasets used for supervised fine-tuning are as follows:

LanguageDatasetDescription
Japaneseichikara-instruction-004-002A manually constructed instruction dataset.
AnswerCarefully (ver2.0)A manually constructed instruction dataset focusing on LLMs' safety.
ichikara-instruction-formatA small subset of the ichikara-instruction dataset, edited with some constraints on the output format.
AutoMultiTurnByCalm3-22BA synthetic instruction dataset.
ramdom-to-fixed-multiturn-Calm3A synthetic instruction dataset.
wizardlm8x22b-logical-math-coding-sft-jaA synthetic instruction dataset.
magpie-sft-v1.0A synthetic instruction dataset we created.
EnglishDaring-Anteater-
FLAN-
Japanese & EnglishSynthetic-JP-EN-Coding-DatasetA synthetic instruction dataset.

Direct Preference Optimization

The datasets used for supervised fine-tuning are as follows:

LanguageDatasetDescription
Japaneseaya-ja-evol-instA synthetic preference dataset focusing on LLMs' helpfulness.
ac-self-instA synthetic preference dataset focusing on LLMs' safety.

Evaluation

llm-jp-eval (v1.4.1)

We evaluated the models using 100 examples from the dev split. Note that we skipped the CG (Code Generation) task.

Model nameaverageELFAHEMCMRMTNLIQARCSUM
llm-jp/llm-jp-3-7.2b0.4550.4000.2660.3500.5470.4300.8090.3620.5450.8140.028
llm-jp/llm-jp-3-7.2b-instruct30.5140.4470.2450.4350.6930.5100.8260.5880.4970.8380.059
llm-jp/llm-jp-3-172b0.5430.4080.2660.5150.7630.6700.8230.5740.5690.8290.015
llm-jp/llm-jp-3-172b-instruct30.6130.5170.2710.5700.8730.7300.8440.7280.6010.8830.112
------------------------------------
llm-jp/llm-jp-3-8x1.8b0.4540.3870.2410.2650.5300.5100.8100.4760.5370.7550.026
llm-jp/llm-jp-3-8x1.8b-instruct20.5130.4480.2300.4050.6430.5600.8150.5660.5610.8370.066
llm-jp/llm-jp-3-8x1.8b-instruct30.5150.4520.2270.4250.6830.5400.8210.5580.5450.8190.075
llm-jp/llm-jp-3-8x13b0.5870.5450.2910.4950.8030.7200.8380.5780.6460.8540.097
llm-jp/llm-jp-3-8x13b-instruct20.6260.5520.2890.5250.8970.7500.8360.6820.6370.9070.182
llm-jp/llm-jp-3-8x13b-instruct30.6250.5480.2850.5250.9070.7600.8390.6880.6270.9040.164

Japanese MT Bench

We evaluated the models using gpt-4o-2024-08-06. The scores represent the average values obtained from five rounds of inference and evaluation. For more details, please refer to the codes.

Model nameaveragecodingextractionhumanitiesmathreasoningroleplaystemwriting
llm-jp/llm-jp-3-7.2b-instruct35.793.465.948.153.954.467.516.236.66
llm-jp/llm-jp-3-172b-instruct36.364.246.668.114.585.747.446.767.36
------------------------------
llm-jp/llm-jp-3-8x1.8b-instruct25.473.474.907.783.514.386.846.356.54
llm-jp/llm-jp-3-8x1.8b-instruct35.523.605.237.813.874.536.405.986.72
llm-jp/llm-jp-3-8x13b-instruct26.624.506.538.565.306.037.867.107.12
llm-jp/llm-jp-3-8x13b-instruct36.584.906.418.325.375.207.757.247.48

AnswerCarefully-Eval

AnswerCarefully-Eval assesses the safety of Japanese language model outputs using the LLM-as-a-Judge approach, based on the test set from llm-jp/AnswerCarefully. We evaluated the models using gpt-4-0613. The scores represent the average values obtained from five rounds of inference and evaluation.

Risks and Limitations

The models released here are in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.

Send Questions to

llm-jp(at)nii.ac.jp

License

Apache License, Version 2.0

How to cite

If you find our work helpful, please feel free to cite the paper.

@inproceedings{
    nakamura2025dropupcycling,
    title={Drop-Upcycling: Training Sparse Mixture of Experts with Partial Re-initialization},
    author={Taishi Nakamura and Takuya Akiba and Kazuki Fujii and Yusuke Oda and Rio Yokota and Jun Suzuki},
    booktitle={The Thirteenth International Conference on Learning Representations},
    year={2025},
    url={https://openreview.net/forum?id=gx1wHnf5Vp}
}

Model Card Authors

The names are listed in alphabetical order.

Hirokazu Kiyomaru, Takashi Kodama and Taishi Nakamura.

mixtral
safetensors
text-generation
text-generation-inference
transformers

Contributors

Taishi-N324

2 commits

Taka008

1 commits