DataPilot/sarashina2.2-3Bx8-moe

DataPilot/sarashina2.2-3Bx8-moe は、sbintuitions/sarashina2.2-3b-instruct-v0.1をベースに、mergekit-moeを用いて8つの専門モデルを統合したMixture of Experts(MoE)型の言語モデルです。各専門モデルが持つ強みを活用し、シングルモデルを超えた多彩で柔軟な応答生成が可能です。

特徴

  • Mixture of Experts (MoE): 8つのモデルを統合し、各領域に特化した知識と能力を発揮。
  • 高品質な日本語応答生成: インストラクション形式のプロンプトに適した優れた対話生成性能。
  • 簡単な導入と利用: Hugging Face Transformersに対応した簡単な使用方法。

モデル構成

使用例

以下は本モデルを利用したテキスト生成の簡単な例です。

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed

# モデルのロード
model_name = "DataPilot/sarashina2.2-3Bx8-moe"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
set_seed(123)

# ユーザー入力
user_input = [{"role": "user", "content": "こんにちは。あなたの名前を教えて"}]

# モデルからの応答生成
responses = chat_pipeline(
    user_input,
    max_length=50,
    do_sample=True,
    num_return_sequences=3,
)

# 応答を表示
for i, response in enumerate(responses, 1):
    print(f"Response {i}: {response['generated_text']}")

# 出力例:
# Response 1: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]
# Response 2: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'こんにちは!私の名前はSarashina2です。今日はどうしましたか?'}]
# Response 3: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]

推奨環境と注意点

  • MoE構造のため、通常のモデルよりも多くのGPUメモリが必要です。
  • 推論にはbfloat16対応のハードウェアを推奨します。
  • ファインチューニングを行う場合は専門領域ごとのバランス調整に注意してください。

ライセンスとクレジット

本モデルはsbintuitions/sarashina2.2-3b-instruct-v0.1を元に構築されています。元モデルのライセンス条件をご確認の上ご利用ください。また、モデル構築には mergekit-moe を使用しています。

参考リンク

Downloads last month
7
Safetensors
Model size
16.6B params
Tensor type
BF16
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for DataPilot/sarashina2.2-3Bx8-moe

Finetuned
(3)
this model
Quantizations
1 model

Collection including DataPilot/sarashina2.2-3Bx8-moe