Run this model with HF Jobs
Run llm-jp/llm-jp-13b-v2.0 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/llm-jp/llm-jp-13b-v2.0. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/llm-jp/llm-jp-13b-v2.0 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/llm-jp/llm-jp-13b-v2.0. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/llm-jp/llm-jp-13b-v2.0. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use llm-jp/llm-jp-13b-v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llm-jp/llm-jp-13b-v2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llm-jp/llm-jp-13b-v2.0")# pip install -U transformers accelerate # Load model directly 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") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llm-jp/llm-jp-13b-v2.0 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-13b-v2.0" # 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-13b-v2.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/llm-jp/llm-jp-13b-v2.0
- SGLang
How to use llm-jp/llm-jp-13b-v2.0 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-13b-v2.0" \ --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-13b-v2.0", "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-13b-v2.0" \ --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-13b-v2.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use llm-jp/llm-jp-13b-v2.0 with Docker Model Runner:
docker model run hf.co/llm-jp/llm-jp-13b-v2.0
Update README.md
Browse files20 unmodified lines212223242526272829303132335 unmodified lines394041424344454647484950515253545556575859606162638 unmodified lines727374757677781 unmodified line808182838485868788893 unmodified lines939495969798993 unmodified lines10310410510610710810910 unmodified lines1201211221231241251264 unmodified lines13113213313413513613711 unmodified lines14915015115215315415520 unmodified linespipeline_tag: text-generationinference: false---# llm-jp-13b-v1.0This repository provides large language models developed by [LLM-jp](https://llm-jp.nii.ac.jp/), a collaborative project launched in Japan.| Model Variant || :--- ||**Instruction models**|| [llm-jp-13b-instruct-full-jaster-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-jaster-v1.0) || [llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0) || [llm-jp-13b-instruct-full-dolly-oasst-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-dolly-oasst-v1.0) |5 unmodified lines| || :--- ||**Pre-trained models**|| [llm-jp-13b-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-v1.0) || [llm-jp-1.3b-v1.0](https://huggingface.co/llm-jp/llm-jp-1.3b-v1.0) |Checkpoints format: Hugging Face Transformers (Megatron-DeepSpeed format models are available [here](https://huggingface.co/llm-jp/llm-jp-13b-v1.0-mdsfmt))## Required Libraries and Their Versions- torch>=2.0.0- transformers>=4.34.0- tokenizers>=0.14.0- accelerate==0.23.0## Usage```pythonimport torchfrom transformers import AutoTokenizer, AutoModelForCausalLMtokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-13b-v1.0")model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-13b-v1.0", device_map="auto", torch_dtype=torch.float16)text = "自然言語処理とは何か"tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)with torch.no_grad():8 unmodified lines```## Model Details- **Model type:** Transformer-based Language Model- **Total seen tokens:** 300B1 unmodified line|Model|Params|Layers|Hidden size|Heads|Context length||:---:|:---:|:---:|:---:|:---:|:---:||13b model|13b|40|5120|40|2048||1.3b model|1.3b|24|2048|16|2048|## Training- **Pre-training:**- **Hardware:** 96 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))3 unmodified lines- **Hardware:** 8 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))- **Software:** [TRL](https://github.com/huggingface/trl), [PEFT](https://github.com/huggingface/peft), and [DeepSpeed](https://github.com/microsoft/DeepSpeed)## TokenizerThe tokenizer of this model is based on [huggingface/tokenizers](https://github.com/huggingface/tokenizers) Unigram byte-fallback model.The vocabulary entries were converted from [`llm-jp-tokenizer v2.1 (50k)`](https://github.com/llm-jp/llm-jp-tokenizer/releases/tag/v2.1).Please refer to [README.md](https://github.com/llm-jp/llm-jp-tokenizer) of `llm-ja-tokenizer` for details on the vocabulary construction procedure.3 unmodified lines- **Vocabulary size:** 50,570 (mixed vocabulary of Japanese, English, and source code)## Datasets### Pre-training10 unmodified linesThe pre-training was continuously conducted using a total of 10 folds of non-overlapping data, each consisting of approximately 27-28B tokens.We finalized the pre-training with additional (potentially) high-quality 27B tokens data obtained from the identical source datasets listed above used for the 10-fold data.### Instruction tuningThe models have been fine-tuned on the following datasets.4 unmodified lines||[OpenAssistant Conversations Dataset](https://huggingface.co/datasets/OpenAssistant/oasst1)| A translated one by DeepL in LLM-jp |## EvaluationYou can view the evaluation results of several LLMs on this [leaderboard](http://wandb.me/llm-jp-leaderboard). We used [llm-jp-eval](https://github.com/llm-jp/llm-jp-eval) for the evaluation.## Risks and Limitations11 unmodified lines[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)## Model Card Authors*The names are listed in alphabetical order.*Hirokazu Kiyomaru, Hiroshi Matsuda, Jun Suzuki, Namgi Han, Saku Sugawara, Shota Sasaki, Shuhei Kurita, Taishi Nakamura, Takumi Okamoto.20 unmodified lines212223242526272829303132335 unmodified lines394041424344454647484950515253545556575859606162638 unmodified lines727374757677781 unmodified line8081828384858687883 unmodified lines92939495969798993 unmodified lines10310410510610710810910 unmodified lines1201211221231241251264 unmodified lines13113213313413513613713811 unmodified lines15015115215315415515615720 unmodified linespipeline_tag: text-generationinference: false---# llm-jp-13b-v2.0This repository provides large language models developed by [LLM-jp](https://llm-jp.nii.ac.jp/), a collaborative project launched in Japan.| Model Variant || :--- ||**Instruction models (To be updated)**|| [llm-jp-13b-instruct-full-jaster-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-jaster-v1.0) || [llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0) || [llm-jp-13b-instruct-full-dolly-oasst-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-dolly-oasst-v1.0) |5 unmodified lines| || :--- ||**Pre-trained models**|| [llm-jp-13b-v2.0](https://huggingface.co/llm-jp/llm-jp-13b-v2.0) |Checkpoints format: Hugging Face Transformers## Required Libraries and Their Versions (To be updated)- torch>=2.0.0- transformers>=4.34.0- tokenizers>=0.14.0- accelerate==0.23.0## Usage (To be updated)```pythonimport torchfrom transformers import AutoTokenizer, AutoModelForCausalLMtokenizer = 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.float16)text = "自然言語処理とは何か"tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)with torch.no_grad():8 unmodified lines```## Model Details (To be updated)- **Model type:** Transformer-based Language Model- **Total seen tokens:** 300B1 unmodified line|Model|Params|Layers|Hidden size|Heads|Context length||:---:|:---:|:---:|:---:|:---:|:---:||13b model|13b|40|5120|40|2048|## Training (To be updated)- **Pre-training:**- **Hardware:** 96 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))3 unmodified lines- **Hardware:** 8 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))- **Software:** [TRL](https://github.com/huggingface/trl), [PEFT](https://github.com/huggingface/peft), and [DeepSpeed](https://github.com/microsoft/DeepSpeed)## Tokenizer (To be updated)The tokenizer of this model is based on [huggingface/tokenizers](https://github.com/huggingface/tokenizers) Unigram byte-fallback model.The vocabulary entries were converted from [`llm-jp-tokenizer v2.1 (50k)`](https://github.com/llm-jp/llm-jp-tokenizer/releases/tag/v2.1).Please refer to [README.md](https://github.com/llm-jp/llm-jp-tokenizer) of `llm-ja-tokenizer` for details on the vocabulary construction procedure.3 unmodified lines- **Vocabulary size:** 50,570 (mixed vocabulary of Japanese, English, and source code)## Datasets (To be updated)### Pre-training10 unmodified linesThe pre-training was continuously conducted using a total of 10 folds of non-overlapping data, each consisting of approximately 27-28B tokens.We finalized the pre-training with additional (potentially) high-quality 27B tokens data obtained from the identical source datasets listed above used for the 10-fold data.### Instruction tuning (To be updated)The models have been fine-tuned on the following datasets.4 unmodified lines||[OpenAssistant Conversations Dataset](https://huggingface.co/datasets/OpenAssistant/oasst1)| A translated one by DeepL in LLM-jp |## Evaluation (To be updated)You can view the evaluation results of several LLMs on this [leaderboard](http://wandb.me/llm-jp-leaderboard). We used [llm-jp-eval](https://github.com/llm-jp/llm-jp-eval) for the evaluation.## Risks and Limitations11 unmodified lines[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)## Model Card Authors (To be updated)*The names are listed in alphabetical order.*Hirokazu Kiyomaru.
README.md+20-18