diafill-sarashina2.2-3b-instruct

Model Summary

DiaFill is a Japanese dialogue script generation model designed to produce natural, spoken-style dialogue scripts rich in fillers and brief utternaces. Unlike typical assistant models that respond to users, this model is fine-tuned to generate a multi-turn dialogue script between two speakers based on a given scenario (seed data).

Training Data

This model was fine-tuned on non-public Japanese dialogue script data created as part of the GENIAC (Generative AI Accelerator Challenge) project. The training data itself is not publicly available.

The project is described in the following press release: https://www.softbank.jp/corp/news/press/sbkk/2025/20250213_01/

Usage (Dialogue Script Generation)

This model generates a dialogue script based on a "Seed" prompt describing the genre, topic, and speakers.

Input Data Specification

  • genre: Choose one of the following Japanese strings:
    • 雑談 (Chit-chat)
    • コールセンター(手続き) (Call Center - Procedure)
    • コールセンター(テクニカルサポート) (Call Center - Technical Support)
    • コールセンター(カスタマーサクセス) (Call Center - Customer Success)
  • industry: Required only for Call Center genres (e.g., "家電", "通信"). Omit this field if the genre is 雑談.
  • tone: Basically, choose either フランク (Casual) or 丁寧 (Polite) for each speaker.

Python Code Example

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed

model_name = "sbintuitions/diafill-sarashina2.2-3b-instruct"
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
set_seed(42)

seed_data = {
    "topics": ["家電保証", "修理依頼", "延長保証"],
    "genre": "コールセンター(手続き)",
    "industry": "家電",
    "speaker1_name": "田中",
    "speaker2_name": "鈴木",
    "speaker1_tone": "フランク",
    "speaker2_tone": "丁寧",
    "summary": "カスタマーは、家電保証に関する手続きについて問い合わせた。オペレーターが修理依頼や延長保証に関する詳細を案内し、カスタマーは納得して対応を依頼した。",
}

messages = [
    {"role": "user", "seed": seed_data},
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

with torch.no_grad():
    outputs = model.generate(
        inputs,
        max_new_tokens=512,
        do_sample=True,
        repetition_penalty=1.1,
    )

generated_script = tokenizer.decode(
    outputs[0][inputs.shape[1] :],
    skip_special_tokens=True,
)
print(generated_script)

Generation example

カスタマー: あもしもし
オペレーター: はい。お電話ありがとうございます。Aモバイル担当の田中でございます。本日はいかがなさいましたか?
カスタマー: はい。えっとーちょっと家電のあのー保証について問い合わせたいんですけれども
オペレーター: かしこまりました。保証でございますね。具体的にはどのような内容でしょうか?
カスタマー: えーっとですね。ま保障は1年
オペレーター: あはい。
カスタマー: 保証されてると思うんですけども、これ例えば壊れたときとかに、どういう手続きしたらいいかっていうのを教えていただきたいです。
オペレーター: かしこまりました。では保証の延長、また故障時の対応についてお知りになられたいとのことですね。かしこまりました。お使いいただいてる端末はAndroidとiPhoneどちらとなりますか。
カスタマー: iPhoneです。
オペレーター: iPhoneでございますね。かしこまりました。では詳しいご案内のために資料を確認して参りますので一旦保留といたします。お切りにならずにお待ちください。
カスタマー: あはい。お願いします。

License

MIT License

Downloads last month
73
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sbintuitions/diafill-sarashina2.2-3b-instruct

Collection including sbintuitions/diafill-sarashina2.2-3b-instruct