Downloads · 30 days
17
8% of all-time downloads
DataPilot/ArrowPro-7B-Nyan
ArrowPro-7B-Nyan is a text generation model from DataPilot. 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.
Downloads · 30 days
17
8% of all-time downloads
All-time downloads
216
Public
Parameters
7.2B
29 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README

当モデルはMistral系のArrowPro-7B-KUJIRAをもとにdatabricks-dolly-15k-Nyan-jaを用いて語尾を「にゃん!」にするファインチューニングを実施したモデルとなります。
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-Nyan")
model = AutoModelForCausalLM.from_pretrained(
"DataPilot/ArrowPro-7B-Nyan",
torch_dtype="auto",
)
model.eval()
if torch.cuda.is_available():
model = model.to("cuda")
def build_prompt(user_query):
sys_msg = "あなたは日本語を話す優秀なアシスタントです。回答には必ず日本語で答えてください。"
template = """[INST] <<SYS>>
{}
<</SYS>>
{}[/INST]"""
return template.format(sys_msg,user_query)
# Infer with prompt without any additional input
user_inputs = {
"user_query": "まどマギで一番かわいいキャラはだれ?",
}
prompt = build_prompt(**user_inputs)
input_ids = tokenizer.encode(
prompt,
add_special_tokens=True,
return_tensors="pt"
)
tokens = model.generate(
input_ids.to(device=model.device),
max_new_tokens=500,
temperature=1,
top_p=0.95,
do_sample=True,
)
out = tokenizer.decode(tokens[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
print(out)
このモデルを作成するために計算資源を貸してくれたwitness氏とMeta Data Labに感謝を申し上げます
このモデルを利用する際は他人に迷惑をかけないように最大限留意してください。