Text Generation
Transformers
Safetensors
Japanese
English
llama
conversational
text-generation-inference
Instructions to use DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it") model = AutoModelForCausalLM.from_pretrained("DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it
- SGLang
How to use DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it 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 "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it with Docker Model Runner:
docker model run hf.co/DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-reasoning-it
| { | |
| "add_bos_token": true, | |
| "add_eos_token": false, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<MASK|LLM-jp>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<PAD|LLM-jp>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<CLS|LLM-jp>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "6": { | |
| "content": "<SEP|LLM-jp>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "7": { | |
| "content": "<EOD|LLM-jp>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "99574": { | |
| "content": "<|SYSTEM|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99575": { | |
| "content": "<|WARNING|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99576": { | |
| "content": "</|NOTE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99577": { | |
| "content": "</|ASSISTANT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99578": { | |
| "content": "<|REFERENCE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99579": { | |
| "content": "<|ASSISTANT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99580": { | |
| "content": "</|RESPONSE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99581": { | |
| "content": "<|RESPONSE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99582": { | |
| "content": "<|EXAMPLE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99583": { | |
| "content": "<|HINT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99584": { | |
| "content": "</|SYSTEM|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99585": { | |
| "content": "</|USER|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99586": { | |
| "content": "</|CONTEXT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99587": { | |
| "content": "</|EXAMPLE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99588": { | |
| "content": "</|IMPORTANT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99589": { | |
| "content": "</|REASONING|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99590": { | |
| "content": "<|USER|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99591": { | |
| "content": "<|SOLUTION|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99592": { | |
| "content": "</|WARNING|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99593": { | |
| "content": "<|REASONING|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99594": { | |
| "content": "</|ERROR|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99595": { | |
| "content": "</|HINT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99596": { | |
| "content": "<|CONTEXT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99597": { | |
| "content": "<|IMPORTANT|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99598": { | |
| "content": "<|NOTE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99599": { | |
| "content": "<|ERROR|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99600": { | |
| "content": "</|SOLUTION|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "99601": { | |
| "content": "</|REFERENCE|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| } | |
| }, | |
| "bos_token": "<s>", | |
| "chat_template": "{% for message in messages %}\n{%- if message['role'] == 'system' -%}\n<|SYSTEM|>{{ message['content'] }}</|SYSTEM|>\n{%- elif message['role'] == 'user' -%}\n<|USER|>{{ message['content'] }}</|USER|>\n{%- elif message['role'] == 'hint' -%}\n<|HINT|>{{ message['content'] }}</|HINT|>\n{%- elif message['role'] == 'reasoning' -%}\n<|REASONING|>{{ message['content'] }}</|REASONING|>\n{%- elif message['role'] == 'assistant' -%}\n<|ASSISTANT|>{{ message['content'] }}</|ASSISTANT|>\n{%- endif -%}\n{% endfor %}\n{%- if add_generation_prompt -%}\n<|ASSISTANT|>\n{%- endif -%}", | |
| "clean_up_tokenization_spaces": false, | |
| "cls_token": "<CLS|LLM-jp>", | |
| "eod_token": "</s>", | |
| "eos_token": "</s>", | |
| "extra_ids": 0, | |
| "extra_special_tokens": {}, | |
| "mask_token": "<MASK|LLM-jp>", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<PAD|LLM-jp>", | |
| "sep_token": "<SEP|LLM-jp>", | |
| "sp_model_kwargs": {}, | |
| "tokenizer_class": "PreTrainedTokenizerFast", | |
| "unk_token": "<unk>" | |
| } | |