Downloads · 30 days
875
3% of all-time downloads
line-corporation/japanese-large-lm-1.7b-instruction-sft
japanese-large-lm-1.7b-instruction-sft is a text generation model from line-corporation. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository provides a 1.7B parameters Japanese language model, fine-tuned and trained by LINE Corporation.
Downloads · 30 days
875
3% of all-time downloads
All-time downloads
31.4K
Public
Repo size
3.3 GB
Likes
9
Public
Click a slice to open those files.
.bin3.3 GB · 100%
From the Hugging Face model README
This repository provides a 1.7B parameters Japanese language model, fine-tuned and trained by LINE Corporation.
詳細な説明や実験に関しては「Instruction Tuningにより対話性能を向上させた3.6B日本語言語モデルを公開します」をご覧ください。
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model = AutoModelForCausalLM.from_pretrained("line-corporation/japanese-large-lm-1.7b-instruction-sft")
tokenizer = AutoTokenizer.from_pretrained("line-corporation/japanese-large-lm-1.7b-instruction-sft", use_fast=False)
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
input_text = """四国の県名を全て列挙してください。"""
text = generator(
f"ユーザー: {input_text}\nシステム: ",
max_length = 256,
do_sample = True,
temperature = 0.7,
top_p = 0.9,
top_k = 0,
repetition_penalty = 1.1,
num_beams = 1,
pad_token_id = tokenizer.pad_token_id,
num_return_sequences = 1,
)
print(text)
# [{'generated_text': 'ユーザー: 四国の県名を全て列挙してください。\nシステム: 香川県、徳島県、愛媛県、高知県'}]
We use a sentencepiece tokenizer with a unigram language model and byte-fallback. We do not apply pre-tokenization with Japanese tokenizer. Thus, a user may directly feed raw sentences into the tokenizer.