Downloads · 30 days
110
15% of all-time downloads
abeja/Mixtral-8x7B-Instruct-v0.1-japanese
Mixtral-8x7B-Instruct-v0.1-japanese is a text generation model from abeja. 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.
Mixtral-8x7B-Instruct-v0.1-japaneseはMixtral-8x7B-Instruct-v0.1をベースに日本語の語彙拡張継続事前学習を実施したモデルです。 詳細はABEJAのテックブログを参照してください。 学習を実施したMetagton-LMのレポジトリはこちらです。
Downloads · 30 days
110
15% of all-time downloads
All-time downloads
719
Public
Parameters
46.9B
188 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors188 GB · 100%
From the Hugging Face model README
Mixtral-8x7B-Instruct-v0.1-japaneseはMixtral-8x7B-Instruct-v0.1をベースに日本語の語彙拡張継続事前学習を実施したモデルです。
詳細はABEJAのテックブログを参照してください。
学習を実施したMetagton-LMのレポジトリはこちらです。
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "abeja/Mixtral-8x7B-Instruct-v0.1-japanese"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
use_cache=True,
device_map="auto",
)
model.eval()
input_text = """# system
誠実で紳士的で優秀なAIアシスタントとして、簡潔でわかりやすく役に立つ回答を自信をもって答えなさい。
# question
人とAIが協調するためには?
# answer"""
input_ids = tokenizer.encode(input_text, return_tensors="pt")
with torch.no_grad():
output_ids = model.generate(
input_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], skip_special_tokens=True)
print(output)