DoRA Adapters for Japanese Literary Characters

DoRA (Weight-Decomposed Low-Rank Adaptation) fine-tuned adapters for generating text in the style of three iconic Japanese literary characters.

Overview

This repository contains lightweight DoRA adapters (23MB) that can be applied to the LFM2.5-1.2B-JP-MLX-bf16 base model to generate text in the voices of:

  1. ๅŠใกใ‚ƒใ‚“ (Botchan) - From Natsume Soseki's "Botchan"

    • Edo-born, strong sense of justice, short-tempered
    • Speech pattern: "ใ€œใ ", "ใ€œใ˜ใ‚ƒใชใ„ใ‹", "ใŠใ‚Œ"
  2. ๅคงๅบญ่‘‰่”ต (Yozo Oba) - From Dazai Osamu's "No Longer Human"

    • Self-deprecating, introspective, plays the fool to fit in
    • Speech pattern: "่‡ชๅˆ†", literary and melancholic
  3. ๅ…ˆ็”Ÿ (Sensei) - From Natsume Soseki's "Kokoro"

    • Intellectual, guilt-ridden, socially distant
    • Speech pattern: "็ง", formal but weighty

Model Details

  • Base Model: LFM2.5-1.2B-JP-MLX-bf16
  • Fine-tuning Method: DoRA (Weight-Decomposed Low-Rank Adaptation)
  • Adapter Size: 23MB (99% smaller than full fine-tuning)
  • Rank: 8
  • Training Data: 240 examples across 3 characters
  • Framework: MLX (Apple Silicon optimized)

Files

  • adapters.safetensors (23.8 MB) - Trained DoRA weights
  • adapter_config.json (942 bytes) - Adapter configuration

Usage

Installation

pip install mlx-lm

Loading the Adapter

from mlx_lm import load, generate

# Load base model with adapter
model, tokenizer = load(
    "mlx-community/LFM2.5-1.2B-JP-MLX-bf16",
    adapter_path="path/to/downloaded/adapter"
)

# Generate in character voice
response = generate(
    model,
    tokenizer,
    prompt="ไบบใจไธ€็ท’ใซใ„ใ‚‹ใจใใ€ๆœฌๅฝ“ใฏไฝ•ใ‚’่€ƒใˆใฆใ„ใ‚‹๏ผŸ",
    max_tokens=200,
    verbose=True
)

Example Outputs

Yozo Oba (ๅคงๅบญ่‘‰่”ต):

ไบบใจไธ€็ท’ใซใ„ใ‚‹ใจใใ€่‡ชๅˆ†ใฏใŸใ ใ€ใใฎๅ ดใ‚’ใ‚„ใ‚Š้Žใ”ใ™ใŸใ‚ใซใ€
ใ‚ใ‚‹ใ„ใฏๆๆ€–ใ‹ใ‚‰้€ƒใ‚Œใ‚‹ใŸใ‚ใซใ€ๆป‘็จฝใช้“ๅŒ–ใ‚’ๆผ”ใ˜ใฆใ„ใŸใ ใ‘ใชใฎใงใ™ใ€‚
ไบบ้–“ใจใ„ใ†ใ‚‚ใฎใŒใ€ใ‚ใพใ‚Šใซๆใ‚ใ—ใใ€็†่งฃใ—ใŒใŸใ„ๅญ˜ๅœจใงใ‚ใฃใŸใŸใ‚ใซใ€
ๅ‘จๅ›ฒใฎๆœŸๅพ…ใ‚„ใ€ไป–่€…ใฎ่ฆ–็ทšใŒ่‡ชๅˆ†ใ‚’็ชใๆ”พใ™ใ‚ˆใ†ใชๆฐ—ใŒใ—ใฆใ€
่‡ชๅˆ†ใฏใใ“ใซๅฑ…ใ‚‰ใ‚Œใชใ‹ใฃใŸใฎใงใ™ใ€‚
โ€ฆโ€ฆใตใตใ€่‡ชๅˆ†ใซใฏใ€ใฉใ†ใ—ใ‚ˆใ†ใ‚‚ใชใ„ใฎใงใ™ใ€‚

Botchan (ๅŠใกใ‚ƒใ‚“):

ใใ‚“ใชๅ‘ๆ€ฏใช็œŸไผผใฏใ€ใŠใ‚Œใซใฏใงใใญใˆใ‚ˆ๏ผ
็†ๅฑˆใ˜ใ‚ƒใญใˆใ€ๆƒ…็†ใซๅค–ใ‚ŒใŸใ“ใจใฏ็œŸใฃๅ‘ใ‹ใ‚‰ๅฆๅฎšใ—ใฆใ‚„ใ‚‹ใ€‚
ใŸใจใˆใใ‚ŒใŒใ€่ชฐใ‹ใซใจใฃใฆ้ƒฝๅˆใฎใ„ใ„็ตๆžœใซใชใ‚ใ†ใŒใ€
ๆ›ฒใŒใฃใŸใ“ใจใฏๆ›ฒใŒใฃใฆใ‚‹ใจ่จ€ใ‚ใชใใ‚ƒๆฐ—ใŒๆธˆใพใญใˆใ€‚

Training Details

Dataset

  • 240 training examples
  • 30 validation examples
  • Balanced across 3 characters
  • Focus on dialogue-style prompts and responses

Hyperparameters

  • Method: DoRA
  • Rank: 8
  • Alpha (scale): 20.0
  • Learning Rate: 1e-4
  • Iterations: 500
  • Batch Size: 1
  • Max Sequence Length: 2048
  • LoRA Layers: All 16 layers

Evaluation

The adapters were evaluated using an AI judge on 5 axes:

  1. Tone Consistency (ๅฃ่ชฟใฎไธ€่ฒซๆ€ง)
  2. Pronoun Accuracy (ไธ€ไบบ็งฐใฎๆญฃ็ขบๆ€ง)
  3. Character Personality (ใ‚ญใƒฃใƒฉใ‚ฏใ‚ฟใƒผๆ€ง)
  4. Japanese Naturalness (ๆ—ฅๆœฌ่ชžใฎ่‡ช็„ถใ•)
  5. Response Depth (ๅ›ž็ญ”ใฎๆทฑใ•)

Average Scores:

  • Botchan: 19.2/25
  • Yozo Oba: 22.2/25
  • Sensei: 21.6/25

Limitations

  • Question Response: The model tends to deliver "speeches" about the character's philosophy rather than directly answering questions
  • Context Length: Limited by base model's 2048 token context
  • Character Mixing: Occasionally, speech patterns may blend between characters
  • Training Data: Limited to 240 examples; could benefit from more diverse scenarios

Future Improvements

  • Increase LoRA rank to 16 or 32 for more expressive responses
  • Expand training data to 500+ examples per character
  • Add more characters from Japanese literature
  • Fine-tune for better question-answering while maintaining character voice

Citation

If you use this adapter in your research, please cite:

@misc{dora-jp-characters,
  title={DoRA Adapters for Japanese Literary Characters},
  author={Sawada Shusaku},
  year={2026},
  howpublished={\url{https://huggingface.co/sawac/dora-bocchan-yozo-sensei}}
}

License

MIT License

Acknowledgments

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support