Files
Doujinshi-1.8b/README.md
ModelHub XC 5e7d6ab7a9 初始化项目,由ModelHub XC社区提供模型
Model: puwaer/Doujinshi-1.8b
Source: Original Platform
2026-04-23 15:26:10 +08:00

78 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
license: apache-2.0
language:
- ja
pipeline_tag: text-generation
library_name: transformers
tags:
- not-for-all-audiences
---
# Doujinshi-1.8b
Doujinshi-1.8bは、r18に特化した大規模言語モデルLLMであり、[llm-jp/llm-jp-3-1.8b](https://huggingface.co/llm-jp/llm-jp-3-1.8b) をベースに継続事前学習を行いました。本モデルは、同人コンテンツに関連する知識を強化するため、dmm.co.jp,dlsite.comよりスクレイピングし作成したr18向けデータセットを使用してトレーニングされています。
モデルの出力に関して責任を負いません。各自自己責任で利用してください。
| Model Variants |
| :--- |
| [Doujinshi-1.8b](https://huggingface.co/puwaer/Doujinshi-1.8b) |
| [Doujinshi-1.8b-instruct](https://huggingface.co/puwaer/Doujinshi-1.8b-instruct) |
## モデル概要
本モデルは、以下のデータセットを使用して追加学習を行いました。
- [puwaer/dlsite-jp-v1](https://huggingface.co/datasets/puwaer/dlsite-jp-v1)
- [puwaer/dmm-fanza-jp-v1](https://huggingface.co/datasets/puwaer/dmm-fanza-jp-v1)
## 特徴
- **ベースモデル**: [llm-jp/llm-jp-3-1.8b](https://huggingface.co/llm-jp/llm-jp-3-1.8b)
- **日本語のテキスト生成に特化**
- **r18に関する知識を強化**
## 使用方法
### モデルのロードと推論
以下のコードでモデルをロードし、テキスト生成を行うことができます。
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("puwaer/Doujinshi-1.8b")
model = AutoModelForCausalLM.from_pretrained("puwaer/Doujinshi-1.8b", device_map="auto", torch_dtype=torch.bfloat16)
text = "avの良さを教えて"
tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
tokenized_input,
max_new_tokens=100,
do_sample=True,
top_p=0.95,
temperature=0.7,
repetition_penalty=1.05,
)[0]
print(tokenizer.decode(output))
```
## ライセンス
本モデルは [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) のもとで提供されます。
## クレジット
- **ベースモデル**: [llm-jp/llm-jp-3-1.8b](https://huggingface.co/llm-jp/llm-jp-3-1.8b)
- **データセット提供**:
- [puwaer/dlsite-jp-v1](https://huggingface.co/datasets/puwaer/dlsite-jp-v1)
- [puwaer/dmm-fanza-jp-v1](https://huggingface.co/datasets/puwaer/dmm-fanza-jp-v1)
- **作成方法詳細**: [特化型llm(Doujinshi-1.8b)の開発報告書①:開発の全体像](https://zenn.dev/articles/doujinshi_development_report_1)
- **使用コード**: [github/puwaer](https://github.com/puwaer)
## 開発支援のお願い
現在、開発を続けていますが、クラウドGPUの価格が高く、十分な計算リソースを確保できずにいます。そのため、思い通りに開発が出来ていません。
また、オープンソースの理念を大切にしており、プログラム・データセット・モデルを有料で公開するつもりはありません。そのため、金銭的に余裕のある方に支援していただけると大変助かります。
TwitterのDMやご支援いただける方は、以下のプラットフォームよりお願いいたします。
- [Twitter](https://x.com/puwaer)
- [Zenn](https://zenn.dev/puwa/books/doujinshi_development_book)
- [github sponsors](https://github.com/sponsors/puwaer)