Instructions to use sawac/dora-bocchan-yozo-sensei with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use sawac/dora-bocchan-yozo-sensei with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir dora-bocchan-yozo-sensei sawac/dora-bocchan-yozo-sensei
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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:
ๅใกใใ (Botchan) - From Natsume Soseki's "Botchan"
- Edo-born, strong sense of justice, short-tempered
- Speech pattern: "ใใ ", "ใใใใชใใ", "ใใ"
ๅคงๅบญ่่ต (Yozo Oba) - From Dazai Osamu's "No Longer Human"
- Self-deprecating, introspective, plays the fool to fit in
- Speech pattern: "่ชๅ", literary and melancholic
ๅ ็ (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 weightsadapter_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:
- Tone Consistency (ๅฃ่ชฟใฎไธ่ฒซๆง)
- Pronoun Accuracy (ไธไบบ็งฐใฎๆญฃ็ขบๆง)
- Character Personality (ใญใฃใฉใฏใฟใผๆง)
- Japanese Naturalness (ๆฅๆฌ่ชใฎ่ช็ถใ)
- 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
- Base model: mlx-community/LFM2.5-1.2B-JP-MLX-bf16
- Training framework: mlx-lm
- Original works: Natsume Soseki and Dazai Osamu
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