LoRA-JP — Japanese Domain LoRA Fine-tuning Pipeline
LoRA-JP — Japanese Domain LoRA Fine-tuning Pipeline
A reproducible QLoRA/LoRA fine-tuning pipeline for Japanese business documents. Uses Unsloth+TRL to accelerate training and vLLM dynamic LoRA adapters for hot-swappable serving. Internal R&D project.
Live Demo
Preview the actual application interface
Training curve
VRAM usage
base weights
16.4 GB (4bit)
adapters + kv
31.6 GB
Checkpoint registry
internal benchmark · 社内検証| ckpt | base model | dataset | adapter | F1 | status |
|---|---|---|---|---|---|
| ckpt-4212 | Qwen2.5-32B | jp-legal-42k | 148 MB | 0.884 | deployed |
| ckpt-4198 | Llama-3.1-70B | jp-medical-18k | 312 MB | 0.871 | eval |
| ckpt-4180 | Qwen2.5-32B | jp-finance-26k | 148 MB | 0.852 | deployed |
| ckpt-4155 | Phi-3-14B | jp-customer-94k | 82 MB | 0.818 | archive |
| ckpt-4142 | Qwen2.5-32B | jp-legal-42k (v1) | 148 MB | 0.806 | archive |
Domain benchmark
base vs tunedHot-swap adapter
liveChallenge
Generic LLMs handle internal abbreviations, in-house terminology, and document formats poorly, and prompt engineering alone can't close the gap. Full fine-tuning, on the other hand, is too VRAM- and cost-heavy for small in-house experiments.
Solution
Unsloth-driven QLoRA (4-bit quantization + LoRA) makes training feasible on a single A100 40GB. TRL's SFTTrainer and DPOTrainer combine supervised and preference tuning, with WandB tracking loss and sample outputs. Resulting adapters are hot-swapped through vLLM's dynamic LoRA loading.
Results
- 1.9× training throughput on identical hardware (Unsloth vs. vanilla HF)
- +14% task accuracy on the internal eval set (internal benchmark)
- Three adapters served concurrently via vLLM hot-swap with zero restarts
- Training-job configs unified into reviewable YAML in PRs
Measured Impact
学習スループット
1.9x
vs HF標準
社内タスク精度
+14%
内部評価
同時アダプタ数
3
vLLM dynamic
学習コスト
A100 40GB x1
単一GPU
What it does
学習
QLoRA 4bit
bitsandbytes+PEFTでVRAM消費を最小化。
選好学習
TRL DPOTrainerで好ましい応答を学習。
サービング
動的LoRA切替
vLLMホットスワップで再起動なし切替。
複数アダプタ多重化
同一ベースモデルで3系統のアダプタ同時公開。
System Layers
Layered architecture showing components, responsibilities, and data flow.
Layer
データ層
学習用ペアをParquetで版管理。
Layer
学習層
QLoRAでVRAM節約しつつ選好学習まで統合。
Layer
サービング層
複数アダプタを同一ベースモデルで多重化。
How we built it
データ設計
SFT/DPO用のプロンプト・応答ペアを設計。
Deliverables
- スキーマ
- サンプル500件
学習パイプライン
Unsloth+TRLでジョブをYAML化。
Deliverables
- 学習ジョブYAML
- 再現スクリプト
評価接続
Kotobaハーネスと自動連携。
Deliverables
- CIジョブ
- 差分レポート
サービング検証
vLLMでアダプタ同時提供の負荷試験。
Deliverables
- 負荷試験レポート
- 運用手順書
Delivery Timeline
- Phase 1In Progress2026-05
データ前処理
社内文書をSFT/DPO形式に変換するETLを整備。
- Phase 2Planned2026-06
Unsloth学習基盤
QLoRA学習ジョブをKubernetesで再現可能化。
- Phase 3Planned2026-07
vLLMホットスワップ
dynamic LoRA loadingを本番類似環境で検証。
- Phase 4Planned2026-09
評価ループ統合
Kotoba評価ハーネスと接続し回帰テスト化。
Who built it
Roles
- MLエンジニア (リード)
- データエンジニア
Tools & Platforms
Backend
Infrastructure
Other
Considering a similar project?
We will propose the best solution for your business needs.
Discuss Your Project