Instructions to use llm-jp/llm-jp-3-172b-beta1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llm-jp/llm-jp-3-172b-beta1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llm-jp/llm-jp-3-172b-beta1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-3-172b-beta1") model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-172b-beta1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llm-jp/llm-jp-3-172b-beta1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llm-jp/llm-jp-3-172b-beta1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-3-172b-beta1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/llm-jp/llm-jp-3-172b-beta1
- SGLang
How to use llm-jp/llm-jp-3-172b-beta1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "llm-jp/llm-jp-3-172b-beta1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-3-172b-beta1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "llm-jp/llm-jp-3-172b-beta1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llm-jp/llm-jp-3-172b-beta1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use llm-jp/llm-jp-3-172b-beta1 with Docker Model Runner:
docker model run hf.co/llm-jp/llm-jp-3-172b-beta1
You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
ãLLM-jp-3 172B beta1ãå©çšèŠçŽ
ãã®å©çšèŠçŽïŒä»¥äžãæ¬èŠçŽããšãããŸãïŒã¯ã倧åŠå ±åå©çšæ©é¢æ³äºº æ å ±ã»ã·ã¹ãã ç ç©¶æ©æ§ åœç«æ å ±åŠç ç©¶æïŒä»¥äžãæäŸè ããšãããŸãïŒã«ããéçºã®ææç©ãšããŠå ¬éããå€§èŠæš¡èšèªã¢ãã«ãLLM-jp-3 172B beta1ãïŒä»¥äžãæ¬ããã°ã©ã ããšãããŸãïŒã®å©çšã«é¢ããæ¡ä»¶ãå®ãããã®ã§ããæ¬ããã°ã©ã ã®å©çšè ïŒä»¥äžãå©çšè ããšãããŸãïŒã¯ãæ¬èŠçŽã«åæããäžã§æ¬ããã°ã©ã ãå©çšãããã®ãšããŸãã
ç¬¬ïŒæ¡ïŒå©çšèš±è«ŸïŒ
- æ¬ããã°ã©ã ã®å©çšè ã¯ãæ¬èŠçŽãšã¯å¥ã«å®ããæ¹æ³ã«ããæ¬ããã°ã©ã ã®å©çšãç³è«ããæäŸè ããåå¥ã®èš±è«ŸãåŸããã®ãšããŸãã
- å©çšè ã¯ãæ¬èŠçŽã«åŸããæ¬ããã°ã©ã ãåçšãŸãã¯éåçšç®çãåããå©çšããããšãã§ããŸããå©çšè ã¯ãæ¬ããã°ã©ã ã®æ¹å€ãè€è£œãè¡ãããšãã§ããŸãããæ¬ããã°ã©ã ããã³æ¬ããã°ã©ã ãæ¹å€ãäœæããããã°ã©ã ïŒä»¥äžãæ¹å€ç©ããšãããŸãïŒã®åé åžãè¡ãããšã¯ã§ããŸãããå©çšè ã¯ãæ¬ããã°ã©ã ãããã¯æ¹å€ç©ãçšããŠãµãŒãã¹ãæäŸããããšã¯ã§ããŸããããµãŒãã¹ã®å©çšè ãæ¬ããã°ã©ã ãŸãã¯æ¹å€ç©ãçŽæ¥ååŸããããšãã§ãã圢ã§ã®æäŸã¯ã§ããŸããã
- æ¬èŠçŽã«éåããå©çšè ã¯ãæ¬ããã°ã©ã ãå©çšããããšã¯ã§ããŸããã
ç¬¬ïŒæ¡ïŒè²¬ä»»ïŒ
- å©çšè ã¯ãæ¬ããã°ã©ã ã¯çŸç¶æå§¿ã§æäŸãããæäŸè ã¯ãæç€ºãŸãã¯é»ç€ºãåãããæ¬ããã°ã©ã ã«é¢ãããã®æ£ç¢ºæ§ãå®å šæ§ãææ°æ§ãããã³å質ãªã©ããããªãä¿èšŒãè¡ãããå©çšè ãæ¬ããã°ã©ã ãå©çšããããšãå©çšã§ããªãã£ãããšã«ããçããäžåã®æå®³ã«ã€ããŠè²¬ä»»ãè² ããªãããšããäºãæ¿è«Ÿãããã®ãšããŸãã
- å©çšè ã¯ãå©çšè ã«ããæ¬ããã°ã©ã ã®å©çšã«ããããŸãã¯ãå©çšè ãæ¬å©çšèŠçŽã«éåããããšã«ããæäŸè ãæå®³ã被ã£ãå Žåãåœè©²æå®³ãè³ åãããã®ãšããŸãã
- å©çšè ã¯ãèªå·±ã®è²¬ä»»ãšå€æã«ãããŠå©çšãããã®ãšããæ¬ããã°ã©ã ã®å©çšã«é¢ããŠã第äžè ãšã®éã§çããçŽäºã«ã€ããŠãèªãã®è²¬ä»»ãšè² æ ã§å¯Ÿå¿ããæäŸè ã«äžåã®è¿·æãæããªããã®ãšããŸããå©çšè ã¯æ¬ããã°ã©ã ã®å©çšã«ãã£ãŠçããæå®³ã«ã€ããŠèªå·±ã®è²¬ä»»ã§å¯ŸåŠãããã®ãšããŸãã
ç¬¬ïŒæ¡ïŒçŠæ¢è¡çºïŒ
å©çšè ã¯æ¬ããã°ã©ã ãå©çšããŠä»¥äžã®è¡çºãè¡ããªããã®ãšããŸãã
(1) æäŸè ãããã¯ç¬¬äžè ã®ç¥çè²¡ç£æš©ã䟵害ããè¡çºããŸãã¯äŸµå®³ãããããã®ããè¡çº
(2) æäŸè ãããã¯ç¬¬äžè ã®è²¡ç£ããã©ã€ãã·ãŒãããã¯èåæš©ã䟵害ããè¡çºããŸãã¯äŸµå®³ãããããã®ããè¡çº
(3) æäŸè ãããã¯ç¬¬äžè ãå·®å¥ãããã¯èª¹è¬äžå·ã»äŸ®èŸ±ããä»è ãžã®å·®å¥ãå©é·ãããŸãã¯åèªãããã¯ä¿¡çšãæ¯æããè¡çº
(4) æäŸè ãããã¯ç¬¬äžè ãžã®è¿·æè¡çºããŸãã¯è¿·æã«ãªãæãã®ããè¡çº
(5) èš±å¯ãããŠããªãæ³åŸæ¥åã«åŸäºããããæè³æ Œã®å°é家以å€ããã®æ³åŸã¢ããã€ã¹ãæäŸãããããè¡çº
(6) æè³æ Œã®å°é家以å€ããã®è²¡åã¢ããã€ã¹ãæäŸããè¡çº
(7) å¥åº·ãžã®å©èšãæ²»çæ¹æ³ã®æç€ºãªã©ãå«ãå»çè¡çº
(8) ãã®ä»æ³ä»€ã«åºã¥ãèš±å¯çãå¿ èŠãªè¡çºç¬¬ïŒæ¡ïŒå¶çŽäºé ïŒ
- å©çšè ã¯ãæ¬ããã°ã©ã ãçšããåŠçã®çµæç©ïŒä»¥äžãåŠççµæããšããïŒã«ã¯ãèåœãåããä»äººã®æš©å©ã䟵害ããå 容ããŸãã¯å©çšè ã®æ³å®ããæå¹æ§ãæçšæ§ãæºãããªãå 容ãå«ãŸããŠããå Žåãããããšãæ¿è«Ÿããäžæ£ç¢ºã»äžé©åãªåŠççµæã«ãããèªãåã¯ç¬¬äžè ã®æå®³ãæš©å©äŸµå®³ã®çºçãå«ççæžå¿µãèµ·ããåŸããšããåæã«ç«ã¡æ¬ããã°ã©ã ãå©çšãããã®ãšããŸããå©çšè ã¯ãåŠççµæã®æ£èª€ã驿³æ§ãå«ççåŠ¥åœæ§ãèªã確èªã®äžãå©çšãããã®ãšããŸããå©çšè ãåŠççµæãå«ãæ¬ããã°ã©ã ãçšããããšã«ãããå©çšè èªèº«åã¯ç¬¬äžè ã®æš©å©äŸµå®³ãçºçãããå ŽåãæäŸè ã¯ãã®æå®³ã«å¯ŸããŠäžåã®è²¬ä»»ãè² ããªããã®ãšããå©çšè ã¯æäŸè ã«å¯Ÿãäžåã®è¿·æãæããªããã®ãšããŸãã
- å©çšè ã¯åŠççµæã«ã€ããŠãããããã®åœãå°åã«ãããŠæ³ä»€ãªã©ã®èŠå¶ãé å®ããäžã§å©çšãããã®ãšããŸãã
- å©çšè ã¯ãåŠççµæãç¬¬ïŒæ¡ïŒçŠæ¢äºé ïŒã«èšèŒã®è¡çºã«å©çšããªããã®ãšããŸãã
ç¬¬ïŒæ¡ïŒæš©å©åž°å±çïŒ
- å©çšè ã¯ãæ¬å©çšèŠçŽã§æç€ºã§å®ãããã®ãé€ãæ¬ããã°ã©ã ã«é¢ããäžåã®æš©å©ãååŸããããšã¯ãããŸããã
- å©çšè ã¯ãæ¬ããã°ã©ã æ¹å€ç©ã®äœæã«ãã£ãŠæ°ãã«çºçããæš©å©ãååŸããŸãããæ¹å€ç©ã®å©çšã«åœãã£ãŠã¯æ¬å©çšèŠçŽã«åŸã£ãŠå©çšãããã®ãšããŸãã
- æäŸè ã¯åŠççµæã«ã€ããŠãæš©å©äž»åŒµãè¡ããªããã®ãšããŸãã
ç¬¬ïŒæ¡ïŒèŒžåºååŒïŒ
å©çšè ã¯ãæ¬ããã°ã©ã ããã³åŠççµæã®å©çšã«é¢é£ããŠå€åœçºæ¿åã³å€åœè²¿ææ³ïŒããã«é¢é£ããæ¿ç什ãå«ãïŒãŸãã¯ç±³åœèŒžåºç®¡çæ³ä»€ã§èŠå®ããèš±å¯ãå¿ èŠãªèŒžåºãè¡ããšãã¯ãå©çšè èªããæå®ã®èš±å¯ãååŸãããã®ãšããŸããç¬¬ïŒæ¡ïŒç®¡èœè£å€æïŒ
æ¬å©çšèŠçŽã«é¢ãçããçŽäºã«ã€ããŠã¯ãæ±äº¬å°æ¹è£å€æããã£ãŠç¬¬äžå¯©ã®å°å±çåæç®¡èœè£å€æãšããŸããç¬¬ïŒæ¡ïŒæºæ æ³ïŒ
æ¬å©çšèŠçŽã¯æ¥æ¬æ³ã«æºæ ããŸããç¬¬ïŒæ¡ïŒãã®ä»ã®èŠå®ïŒ
æ¬èŠçŽã¯ãæ¬ããã°ã©ã ã®å©çšè ãšæäŸè ãšã®éã®å©çšã«é¢ããå šãŠã®äºé ãå®ãããã®ã§ãããæ¬èŠçŽã«å®ãã®ãªãäºé ã«ã€ããŠã¯ãé¢ä¿æ³ä»€ã«åŸããã®ãšããŸãã第ïŒïŒæ¡ïŒèšèªïŒ
æ¬èŠçŽã¯æ¥æ¬èªãæ£æ¬ãšããŸããæ¬èŠçŽã®è±èš³çã¯ãåèã®ããã«äœæããããã®ã§ãããäœãã®æ³çææåããªããã®ãšããŸãã
以äž
LLM-jp-3 172B beta1 Terms of Use
This Terms of Use (hereinafter referred to as "TOU") sets forth the conditions for the use of the large-scale language model LLM-jp-3 172B beta1 (hereinafter referred to as "the Program") that is made public as a result of the development by the Research and Development Center for Large Language Models at the National Institute of Informatics (hereinafter referred to as "the Provider"). Users of the Program (hereinafter referred to as "Users") shall use the Program upon agreeing to the TOU.
Article 1 (License to Use)
- Users of the Program must apply for the use of the Program by a method separately specified in addition to the TOU and obtain individual permission from the Provider.
- Users may use the Program for commercial or non-commercial purposes in accordance with the TOU. Users are allowed to modify and duplicate the Program, but redistribution of the Program and/or the large-scale language model created by modifying the Program (hereinafter referred to as "Modified Works") is prohibited. Users may provide services using the Program or Modified Works, but such services must not allow third parties to access, download, or obtain the Program or Modified Works directly.
- Users who violate the TOU are not allowed to use the Program.
Article 2 (Responsibility)
- Users agree in advance that the Program is provided âAS ISâ, and the Provider makes no warranties, express or implied, regarding the Program, including, but not limited to, its accuracy, completeness, up-to-dateness, and quality, and that the Provider shall not be liable for any damages arising from the use or inability to use the Program.
- Users shall compensate for any and all damages suffered by the Provider as a result of the use of the Program and/or the Users' violation of the TOU.
- Users shall use the Program at their own responsibility and discretion, and shall handle any disputes arising with third parties in relation to the use of the Program at their own responsibility and expense, and shall indemnify, defend and hold harmless the Provider against all damages and losses without causing any inconvenience to the Provider. Users shall deal with any damages caused by the use of the Program at their own responsibility.
Article 3 (Prohibited Actions)
Users shall not engage in the following actions when using the Program.
(1) Actions that will or may infringe on the intellectual property rights of the Provider or third parties;
(2) Actions that will or may infringe on the property, privacy, or portrait rights of the Provider or third parties;
(3) Actions that discriminate against, defame, insult, or slander the Provider or third parties, promote discrimination against others, or damage the reputation or credibility of others;
(4) Actions that will or may cause inconvenience or harm to the Provider or third parties;
(5) Actions that engage in unauthorized legal services and/or provide legal advice from anyone other than a qualified professional;
(6) Actions that provide financial advice from anyone other than a qualified professional;
(7) Medical actions, including providing health advice or suggesting treatment methods; and
(8) Other actions that require permissions or other forms of authorization under laws and regulations.Article 4 (Restrictions)
- Users acknowledge that the results of processing using the Program (hereinafter referred to as "Processing Results") may contain falsehoods, biases, content that infringes on the rights of others, or content that does not meet the effectiveness or usefulness expected by Users, and agree to use the Program on the premise that inaccurate or inappropriate Processing Results may cause damage or infringement of rights to Users or third parties and/or ethical concerns. Users shall use the Processing Results after confirming their accuracy, legality, and ethical validity themselves. If the use of the Program, including the Processing Results, by Users cause infringement of the rights of the Users themselves or third parties, the Provider shall not be responsible for any damages, and the Users shall indemnify, defend and hold harmless the Provider against all damages and losses without causing any inconvenience to the Provider.
- Users shall use the Processing Results in compliance with the regulations such as laws and regulations in each country and region.
- Users shall not use the Processing Results for the actions listed in Article 3 (Prohibited Actions).
Article 5 (Ownership of Rights)
- Except as expressly provided in the TOU, Users shall not acquire any rights in relation to the Program.
- Users will acquire rights newly arising from the creation of Modified Works of the Program, but Users shall use Modified Works in accordance with the TOU.
- The Provider shall not assert any rights to the Processing Results.
Article 6 (Export Transaction)
Users shall obtain the necessary permissions themselves when exporting the Program and the Processing Results in relation to their use, where such export requires permissions under the Foreign Exchange and Foreign Trade Act (including related cabinet order and ministerial order) or U.S. export control laws and regulations.Article 7 (Jurisdiction)
The Tokyo District Court shall have exclusive jurisdiction in the court of the first instance over any disputes arising out of or in connection with the TOU.Article 8 (Governing Law)
The TOU is governed by and construed in accordance with the laws of Japan.Article 9 (Other Provisions)
The TOU sets forth the entire agreement as to all matters concerning the use of the Program between the Users and the Provider, and matters not provided for in the TOU shall be governed by the relevant laws and regulations.Article 10 (Governing Language)
The governing language of the TOU shall be Japanese. The English translation hereof is made for reference purpose only and shall have no effect.
Log in or Sign Up to review the conditions and access this model content.
llm-jp-3-172b-beta1
This repository provides large language models developed by the Research and Development Center for Large Language Models at the National Institute of Informatics.
The development was partially supported by GENIAC.
| Model Variant |
|---|
| llm-jp-3-172b-beta1 |
| llm-jp-3-172b-beta1-instruct |
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-172b-beta1")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-172b-beta1", 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: 700B
| Params | Layers | Hidden size | Heads | Context length |
|---|---|---|---|---|
| 172b | 96 | 12288 | 96 | 4096 |
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.
| Language | Dataset | Tokens |
|---|---|---|
| Japanese | Wikipedia | 2.6B |
| Common Crawl | 762.8B | |
| WARP/PDF | 237.3B | |
| WARP/HTML | 2.7B | |
| Kaken | 1.8B | |
| English | Wikipedia | 4.7B |
| Dolma/CC-head | 608.5B | |
| Dolma/C4 | 181.6B | |
| Dolma/Reddit | 83.1B | |
| Dolma/PeS2o | 62.9B | |
| Dolma/Gutenberg | 5.5B | |
| Dolma/Wiki | 3.9B | |
| Code | The Stack | 114.1B |
| Chinese | Wikipedia | 0.8B |
| Korean | Wikipedia | 0.3B |
Instruction tuning
The models have been fine-tuned on the following datasets.
| Language | Dataset | description |
|---|---|---|
| Japanese | ichikara-instruction-004-002 | 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 | |
| aya-dataset-ja | A Japanese subset of aya_dataset | |
| ichikara-instruction-format | A small amount of instruction dataset edited from ichikara-instruction, with some constraints on the output format. | |
| English | databricks-dolly-15k | - |
| oasst1-21k-en | A subset of oasst1 | |
| oasst2-33k-en | A subset of oasst2 | |
| Daring-Anteater | - | |
| FLAN | We used sampled one. |
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
See the LICENSE file.
Model Card Authors
The names are listed in alphabetical order.
Hirokazu Kiyomaru and Takashi Kodama.
- Downloads last month
- -