DataPilot/sarashina2.2-3Bx4-moe

DataPilot/sarashina2.2-3Bx4-moeは、4つの「sbintuitions/sarashina2.2-3b-instruct-v0.1」モデルを統合して作成した約12Bパラメータ規模のMixture of Experts (MoE) モデルです。このモデルは、mergekit-moeを利用して、1つのベースモデル(自己注意機構やレイヤー正規化のパラメータ)と3つのエキスパートモデル(MLPパラメータ)を融合して構築されています。

特徴

  • Mixture of Expertsアーキテクチャ
    複数エキスパートの知識を統合し、各タスクに対して専門的で高品質な応答を生成します。

  • 統合による性能向上
    ベースモデルとエキスパートモデルを4コピー融合することで、パラメータ総数が約12B規模に拡張され、精度や表現力が向上しています。

推奨使用例

以下のPythonコードで、モデルのロードおよびテキスト生成を簡単に実行できます。

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

# モデルのロード
model_name = "DataPilot/sarashina2.2-3Bx4-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と言います。本日のご要件を教えて下さい。'}]

モデル概要

  • モデル名: DataPilot/sarashina2.2-3Bx4-moe

  • ベースモデル: sbintuitions/sarashina2.2-3b-instruct-v0.1

  • エキスパート数: 3(合計4コピー融合)

  • 総パラメータ数: 約12B

  • アーキテクチャ: Mixture of Experts (MoE)

  • ゲートモード: random

  • データ型: bfloat16(パフォーマンスとメモリ効率を考慮)

  • 用途:
    対話生成、文章補完、カスタムチャットボット開発など、多様な自然言語処理タスクに適しています。

ライセンスと引用

本モデルはオープンソースモデルを基盤に構築されています。再利用や再配布の際は元モデルおよびmergekitのライセンス規定をご確認ください。

Downloads last month
6
Safetensors
Model size
7.76B 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-3Bx4-moe

Finetuned
(5)
this model
Quantizations
1 model

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