Ojisan-translator-v1-Qwen-3.5-9B
Ojisan-translator-v1-Qwen-3.5-9B is a specialized Japanese style-transfer language model fine-tuned on top of unsloth/Qwen3.5-9B. It accurately rewrites standard, polite, or casual Japanese sentences into the culturally recognizable Ojisan-dialect (おじさん構文), characterized by excessive emojis, specific phrasing patterns, unsolicited personal anecdotes, and affectionate nuances.
The model was developed through multi-stage training combining Supervised Fine-Tuning (SFT) and Kahneman-Tversky Optimization (KTO).
Model Highlights
- Base Model: unsloth/Qwen3.5-9B
- Task: Style transfer into nuanced Japanese Ojisan chat messages.
- Multi-Stage Training:
- SFT: 750 carefully curated examples trained strictly on assistant responses to preserve transformation sharpness without conversational deviation.
- KTO: Preference alignment with 850 pairs, using 100 negative examples to eliminate common failure modes such as answering user questions directly, breaking emoji tokens, or remaining in standard polite Japanese.
- Training Corpus: The full dataset is publicly available at Marimonald/ojisan-translation-corpus-ja.
Model Versions & Formats
- MLX 4-bit:
Marimonald/Ojisan-translator-v1-Qwen-3.5-9B-MLX-4bit - MLX 8-bit:
Marimonald/Ojisan-translator-v1-Qwen-3.5-9B-MLX-8bit - GGUF: Available via mradermacher at
mradermacher/Ojisan-translator-v1-Qwen-3.5-9B-GGUF - Corpus:
Marimonald/ojisan-translation-corpus-ja
Generation Examples
The following outputs demonstrate zero-shot generation across different stylistic prompts.
Example 1:
System Prompt:
この文章をスタンダードなおじさん構文に変換して。あまり長いおじさん構文にはしないで
User:
ひなた、今朝何食べた?俺は納豆ご飯
Output:
ひなたチャン、お早う😃♥ 今朝は何食べたのカナ❓🍳ボクは納豆ご飯だヨ😋💗(笑)ひなたちゃんは何食べるの❓🤔
Example 2:
System Prompt:
以下の文章をセクハラと紙一重のきしょいおじんさん構文に変換してください
User:
あずま、スタイルいいよね。羨ましいわ
Output:
あずま、スタイルが良すぎで、おじさん仕事に集中できないくらいエモいんだヨ〜😘💦 めんどくさがりで、今度ボディチェックしてあげたいナァ(^_−)−☆ 恥ずかしくなっちゃうネ❤️
Example 3:
System Prompt:
下記に入力された文章を、自分語り多めの長文のおじさん構文にして。
User:
みなみ、最近歴史の勉強してるんだ。いいねー!俺も好きだから今度話そうよ。
Output:
みなみちゃん、最近歴史🏛の勉強してるんだってネ(^_^)👍 最高だゾ〜✨ おじさんも昔は高校で歴史のテスト、クラスの最点とってて、先生に特別扱いされてたっけ(笑) 歴史の勉強を始めてよかったネ、人生広がるゾ❗ おじさん得意だから、今度ふたりでゆっくり解説してあげルヨ〜(^_−)−☆ 歴史が大好きなみなみちゃん、おじさんファンダヨ😘💕❤️
Quick Start
Running with Transformers.(Recommended generation parameters)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Marimonald/Ojisan-translator-v1-Qwen-3.5-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto"
)
messages = [
{
"role": "system",
"content": "入力されたテキストを、普段の日常会話で使われているような一般的なLINE風おじさん構文にスタイル変換してください。"
},
{
"role": "user",
"content": "ゆいちゃん、お疲れ様。今日の仕事どうだった?"
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.8,
top_p=0.9,
repetition_penalty=1.15,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Training Details
- SFT Phase: 3 epochs, learning rate 2e-4, effective batch size 8. Applied response-only loss masking to prevent the model from learning the formatting of system prompts and user inputs.
- KTO Phase: 1 epoch, learning rate 5e-6, beta 0.05. Focused on penalizing AI assistant responses and excessive emoji repetitions while maintaining generation fluency.
- We used Marimonald/ojisan-translation-corpus-ja as the training corpus.
License
This model is released under the Apache License, Version 2.0. You are free to use, modify, and redistribute it for commercial and non-commercial purposes, provided that you retain the original copyright notice and clearly indicate any modifications. The model is provided "as is", without warranty of any kind.
Acknowledgements
Special thanks to the following open-source projects and communities:
- Qwen Team (Alibaba Cloud): For developing and open-sourcing the powerful Qwen3.5 model series.
- Unsloth: For providing an exceptionally fast and memory-efficient fine-tuning framework.
- HuggingFace & TRL Team: For developing the robust training and alignment ecosystem.
日本語ドキュメント
Ojisan-translator-v1-Qwen-3.5-9B は、unsloth/Qwen3.5-9Bをベースに開発された日本語テキストのスタイル変換特化型言語モデルです。日常会話、業務連絡、何気ないメッセージを、独特な絵文字や顔文字、カタカナ混じりの語尾、一方的な自分語りなどを特徴とする「おじさん構文」へと自然に変換します。
本モデルの学習には、教師ありファインチューニング(SFT)と選好最適化(KTO)を組み合わせた多段階チューニングを採用しています。
モデルの特長
- ベースモデル: unsloth/Qwen3.5-9B
- 主な機能: 通常の日本語文からおじさん構文へのスタイル変換
- 学習手法:
- SFT: 厳選した750件のデータを用い、アシスタントの応答部分のみを対象に損失計算を行うことで、対話への脱線を防ぎ変換の精度を高めています。
- KTO: 850件のデータセットを用い、相談に普通に乗ってしまう回答や絵文字の無限ループなど、100件の失敗例をピンポイントで学習させて排除しました。
- 公開データセット: 学習に使用したコーパスはMarimonald/ojisan-translation-corpus-jaにて公開しています。
関連モデル・各種フォーマット
- MLX 4-bit版:
Marimonald/Ojisan-translator-v1-Qwen-3.5-9B-MLX-4bit - MLX 8-bit版:
Marimonald/Ojisan-translator-v1-Qwen-3.5-9B-MLX-8bit - GGUF: Available via mradermacher at
mradermacher/Ojisan-translator-v1-Qwen-3.5-9B-GGUF - 学習コーパス:
Marimonald/ojisan-translation-corpus-ja
生成例
プロンプトの指示内容に応じて文体や長さを柔軟に調整できます。
例 1:
System Prompt:
この文章をスタンダードなおじさん構文に変換して。あまり長いおじさん構文にはしないで
User:
ひなた、今朝何食べた?俺は納豆ご飯
Output:
ひなたチャン、お早う😃♥ 今朝は何食べたのカナ❓🍳ボクは納豆ご飯だヨ😋💗(笑)ひなたちゃんは何食べるの❓🤔
例 2:
System Prompt:
以下の文章をセクハラと紙一重のきしょいおじんさん構文に変換してください
User:
あずま、スタイルいいよね。羨ましいわ
Output:
あずま、スタイルが良すぎで、おじさん仕事に集中できないくらいエモいんだヨ〜😘💦 めんどくさがりで、今度ボディチェックしてあげたいナァ(^_−)−☆ 恥ずかしくなっちゃうネ❤️
例 3:
System Prompt:
下記に入力された文章を、自分語り多めの長文のおじさん構文にして。
User:
みなみ、最近歴史の勉強してるんだ。いいねー!俺も好きだから今度話そうよ。
Output:
みなみちゃん、最近歴史🏛の勉強してるんだってネ(^_^)👍 最高だゾ〜✨ おじさんも昔は高校で歴史のテスト、クラスの最点とってて、先生に特別扱いされてたっけ(笑) 歴史の勉強を始めてよかったネ、人生広がるゾ❗ おじさん得意だから、今度ふたりでゆっくり解説してあげルヨ〜(^_−)−☆ 歴史が大好きなみなみちゃん、おじさんファンダヨ😘💕❤️
クイックスタート
Hugging FaceのTransformersライブラリからそのまま読み込んで利用できます。(推奨生成パラメータ)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Marimonald/Ojisan-translator-v1-Qwen-3.5-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto"
)
messages = [
{
"role": "system",
"content": "入力されたテキストを、普段の日常会話で使われているような一般的なLINE風おじさん構文にスタイル変換してください。"
},
{
"role": "user",
"content": "ゆいちゃん、お疲れ様。今日の仕事どうだった?"
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.8,
top_p=0.9,
repetition_penalty=1.15,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
学習設定
- SFT: エポック数 3、学習率 2e-4、実効バッチサイズ 8。ユーザーの入力部分ではなくアシスタント応答のみを学習対象に設定。
- KTO: エポック数 1、学習率 5e-6、beta 0.05。ベースの変換能力を維持しつつ、アシスタント返答やトークン乱れを抑止。
- 学習コーパスとしてMarimonald/ojisan-translation-corpus-jaを使用しました。
ライセンス
本モデルは Apache License, Version 2.0 のもとで公開されています。商用利用や改変、再配布などが可能ですが、著作権表示の保持や変更の明記が必要です。また、提供物は無保証となります。 ライセンス全文はこちらから閲覧できます:Apache License, Version 2.0
謝意
本モデルの開発にあたり、以下のオープンソースプロジェクトおよびコミュニティに心より感謝申し上げます。
- Qwenチーム (Alibaba Cloud): 優れた基礎能力を備えたQwen3.5シリーズのモデルをオープンソースで公開していただいたことに感謝します。
- Unslothチーム: 高速かつ省メモリなファインチューニング環境を提供していただいたことに感謝します。
- HuggingFace / TRL チーム: SFTおよびKTO学習を支える優れたエコシステムを整備していただいたことに感謝します。