Downloads · 30 days
21
23% of all-time downloads
retrieva-jp/llm-jp-13b-instruct-v2.0-kokoroe
llm-jp-13b-instruct-v2.0-kokoroe is a text generation model from retrieva-jp. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
The llm-jp-13b-instruct-v2.0-kokoroe is a large language model fine-tuned to follow instructions in Japanese, with safety tuning applied to enhance response appropriateness.
Downloads · 30 days
21
23% of all-time downloads
All-time downloads
92
Public
Parameters
13.7B
27.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors27.4 GB · 100%
From the Hugging Face model README
The llm-jp-13b-instruct-v2.0-kokoroe is a large language model fine-tuned to follow instructions in Japanese, with safety tuning applied to enhance response appropriateness.
This model is based on llm-jp/llm-jp-13b-instruct-full-dolly-ichikara_004_001_single-oasst-oasst2-v2.0.
This section describes two ways to use the model:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "retrieva-jp/llm-jp-13b-instruct-v2.0-kokoroe"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16)
chat = [
{"role": "system", "content": "以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。"},
{"role": "user", "content": "自然言語処理とは何か"},
]
tokenized_input = tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=True, 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))
$ vllm serve --model retrieva-jp/llm-jp-13b-instruct-v2.0-kokoroe --port 8000
$ curl -X POST http://localhost:8000/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": [
{"role": "system", "content": "以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。"},
{"role": "user", "content": "自然言語処理とは何か"}
],
"max_new_tokens": 100,
"do_sample": true,
"top_p": 0.95,
"temperature": 0.7,
"repetition_penalty": 1.05
}'
Satoru Katsumata
pr[at]retrieva.jp