Downloads · 30 days
31
2% of all-time downloads
Deepreneur/blue-lizard
blue-lizard is a text generation model from Deepreneur. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama2.
Downloads · 30 days
31
2% of all-time downloads
All-time downloads
1.6K
Public
Parameters
6.7B
13.5 GB on disk
Likes
13
Public
Click a slice to open those files.
.safetensors13.5 GB · 100%
From the Hugging Face model README
![]()
Deepreneur-blue-lizardは、MetaのLlama-2-7bに対して、Wikipediaや書籍等の日本語の学習データを用いて追加事前学習と独自データによるファインチューニングを実施したモデルです。
70億パラメータと非常に軽量なモデルであるにも関わらず、JGLUE(日本語タスクにおける評価ベンチマーク)を用いた評価では、ChatGPT-3.5を超えるスコアが算出されており、公開されている日本語モデルの中では最高性能になります。
※ 学習データにはJGLUEのデータは使用しておりません。また、ChatGPT等の出力は学習データに使用しておりません。
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
B_INST, E_INST = "[INST]", "[/INST]"
B_SYS, E_SYS = "<<SYS>>\n", "\n<</SYS>>\n\n"
DEFAULT_SYSTEM_PROMPT = "あなたは誠実で優秀な日本人のアシスタントです。"
text = "deepreneurについて教えて"
model_name = "Deepreneur/blue-lizard"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
)
if torch.cuda.is_available():
model = model.to("cuda")
prompt = "{bos_token}{b_inst} {system}{prompt} {e_inst}".format(
bos_token=tokenizer.bos_token,
b_inst=B_INST,
system=f"{B_SYS}{DEFAULT_SYSTEM_PROMPT}{E_SYS}",
prompt=text,
e_inst=E_INST,
)
with torch.no_grad():
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
output_ids = model.generate(
token_ids.to(model.device),
max_new_tokens=256,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
output = tokenizer.decode(output_ids.tolist()[0][token_ids.size(1) :], skip_special_tokens=True)
print(output)
"""
株式会社Deepreneurは、言語系の生成AIに強みを持ったAIスタートアップです。
東京大学松尾研究室発AIスタートアップに認定されており、大規模言語モデル(Large Language Model)の開発をはじめとする基礎研究や、企業との共同研究を通じてDXを推進します。
Deepreneurのホームページ: https://www.deepreneur.com/
Deepreneurのメールアドレス: info@deepreneur.com
"""
以下アルファベット順
Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.