RichardErkhov
commited on
Commit
•
30e0a2e
1
Parent(s):
acffc94
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
SniffyOtter-7B-Novel-Writing-NSFW - GGUF
|
11 |
+
- Model creator: https://huggingface.co/Aratako/
|
12 |
+
- Original model: https://huggingface.co/Aratako/SniffyOtter-7B-Novel-Writing-NSFW/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q2_K.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q2_K.gguf) | Q2_K | 2.53GB |
|
18 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.IQ3_XS.gguf) | IQ3_XS | 2.81GB |
|
19 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.IQ3_S.gguf) | IQ3_S | 2.96GB |
|
20 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_S.gguf) | Q3_K_S | 2.95GB |
|
21 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.IQ3_M.gguf) | IQ3_M | 3.06GB |
|
22 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q3_K.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q3_K.gguf) | Q3_K | 3.28GB |
|
23 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_M.gguf) | Q3_K_M | 3.28GB |
|
24 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q3_K_L.gguf) | Q3_K_L | 3.56GB |
|
25 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.IQ4_XS.gguf) | IQ4_XS | 3.67GB |
|
26 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q4_0.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q4_0.gguf) | Q4_0 | 3.83GB |
|
27 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.IQ4_NL.gguf) | IQ4_NL | 3.87GB |
|
28 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q4_K_S.gguf) | Q4_K_S | 3.86GB |
|
29 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q4_K.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q4_K.gguf) | Q4_K | 4.07GB |
|
30 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q4_K_M.gguf) | Q4_K_M | 4.07GB |
|
31 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q4_1.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q4_1.gguf) | Q4_1 | 4.24GB |
|
32 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q5_0.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q5_0.gguf) | Q5_0 | 4.65GB |
|
33 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q5_K_S.gguf) | Q5_K_S | 4.65GB |
|
34 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q5_K.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q5_K.gguf) | Q5_K | 4.78GB |
|
35 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q5_K_M.gguf) | Q5_K_M | 4.78GB |
|
36 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q5_1.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q5_1.gguf) | Q5_1 | 5.07GB |
|
37 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q6_K.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q6_K.gguf) | Q6_K | 5.53GB |
|
38 |
+
| [SniffyOtter-7B-Novel-Writing-NSFW.Q8_0.gguf](https://huggingface.co/RichardErkhov/Aratako_-_SniffyOtter-7B-Novel-Writing-NSFW-gguf/blob/main/SniffyOtter-7B-Novel-Writing-NSFW.Q8_0.gguf) | Q8_0 | 7.17GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
license: cc-by-nc-4.0
|
46 |
+
datasets:
|
47 |
+
- Aratako/Syosetu711K-Cleaned-158K-Instruct
|
48 |
+
language:
|
49 |
+
- ja
|
50 |
+
library_name: transformers
|
51 |
+
tags:
|
52 |
+
- not-for-all-audiences
|
53 |
+
- nsfw
|
54 |
+
base_model:
|
55 |
+
- Elizezen/SniffyOtter-7B
|
56 |
+
---
|
57 |
+
# SniffyOtter-7B-Novel-Writing-NSFW
|
58 |
+
[GGUF版はこちら/Click here for the GGUF version](https://huggingface.co/Aratako/SniffyOtter-7B-Novel-Writing-NSFW-GGUF)
|
59 |
+
|
60 |
+
## 概要
|
61 |
+
|
62 |
+
[Elizezen/SniffyOtter-7B](https://huggingface.co/Elizezen/SniffyOtter-7B)をベースに、NSFW特化で小説生成用のinstruction tuningを施したモデルです。
|
63 |
+
|
64 |
+
ジャンルやクオリティ、キーワードや過激さを指定すると、それに従った小説を生成するようにinstruction tuningしています。
|
65 |
+
|
66 |
+
[Aratako/Antler-7B-Novel-Writing](https://huggingface.co/Aratako/Antler-7B-Novel-Writing)との違いは主に以下の点になります。
|
67 |
+
|
68 |
+
- 元モデルを[Elizezen/Antler-7B](https://huggingface.co/Elizezen/Antler-7B)から[Elizezen/SniffyOtter-7B](https://huggingface.co/Elizezen/SniffyOtter-7B)へ変更
|
69 |
+
- そのため、ライセンスがCC-BY-NC-4.0となります
|
70 |
+
- 学習データをNSFWのものに限定
|
71 |
+
- [Aratako/Syosetu711K-Cleaned-158K-Instruct](https://huggingface.co/datasets/Aratako/Syosetu711K-Cleaned-158K-Instruct)から、NSFWのテキストのみを抽出
|
72 |
+
- さらに、テキストを100文字ずつに分割し、[oshizo/japanese-sexual-moderation-v2](https://huggingface.co/oshizo/japanese-sexual-moderation-v2)を利用してsexuality scoreを取得し、テキスト内の平均スコアが0.4以上のものを抽出
|
73 |
+
|
74 |
+
## プロンプトフォーマット
|
75 |
+
Mistralのchat templateを利用してください。また、学習に利用したデータのフォーマットの関係上、以下のような形式が望ましいと思われます。
|
76 |
+
|
77 |
+
```
|
78 |
+
[INST] {小説生成の指示}
|
79 |
+
ジャンル:{ジャンル}
|
80 |
+
クオリティ:{クオリティを示す数値(0から3)}
|
81 |
+
キーワード:{小説の概要を示すタグ・キーワードを読点区切りで羅列}
|
82 |
+
過激さ:{表現の過激さを示す数値(0~3、高い方がより過激)} [/INST]
|
83 |
+
```
|
84 |
+
|
85 |
+
## プロンプト内で指定する属性について
|
86 |
+
本モデルは学習時の指示にジャンルやキーワード、クオリティ、過激さなどを追加して学習しているため、それらの属性を指定することである程度出力の制御が可能です。
|
87 |
+
|
88 |
+
### ジャンル
|
89 |
+
[なろうR18小説API](https://dev.syosetu.com/xman/api/)における`nocgenre`のジャンルで学習しています。具体的には以下のものを学習時に使っています。この形式で指定するのが望ましいかと思われます。
|
90 |
+
- 男性向け、女性向け、BL、大人向け ※APIページ上での表記からやや変更して学習しています。
|
91 |
+
|
92 |
+
### クオリティ
|
93 |
+
本モデルの学習に使用した[データセット](https://huggingface.co/datasets/Aratako/Syosetu711K-Cleaned-158K-instruct)の大本である[RyokoAI/Syosetu711K](https://huggingface.co/datasets/RyokoAI/Syosetu711K)のq-scoreを利用して学習時のレコードにクオリティタグをつけています。
|
94 |
+
|
95 |
+
[使用したデータセット](https://huggingface.co/datasets/Aratako/Syosetu711K-Cleaned-158K-instruct)は既にq-scoreが0.8以上の高品質のものをフィルターしてありますが、さらにそれを25%ずつに分け、下から0、1、2、3とラベリングしています。3を指定するとより高品質な出力になる事が期待されます。
|
96 |
+
|
97 |
+
### 過激さ
|
98 |
+
学習テキストに対して[oshizo/japanese-sexual-moderation-v2](https://huggingface.co/oshizo/japanese-sexual-moderation-v2)を利用して取得したsexuality scoreの平均値を25%ずつ分割し、低い方から0、1、2、3とラベリングして学習しています。大きい数値を指定するとより過激な表現になる事が想定されます。
|
99 |
+
|
100 |
+
## 学習関連の情報
|
101 |
+
|
102 |
+
### 使用データセット
|
103 |
+
- [Aratako/Syosetu711K-Cleaned-158K-instruct](https://huggingface.co/Aratako/Syosetu711K-Cleaned-158K-instruct)
|
104 |
+
- 上記データセットのうち概要で説明した処理を行いフィルタしたデータを利用
|
105 |
+
|
106 |
+
## 学習の設定
|
107 |
+
RunpodでGPUサーバを借り、A6000x4で学習を行いました。主な学習パラメータは以下の通りです。
|
108 |
+
- lora_r: 128
|
109 |
+
- lisa_alpha: 256
|
110 |
+
- lora_dropout: 0.05
|
111 |
+
- lora_target_modules: ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj", "lm_head"]
|
112 |
+
- learning_rate: 2e-5
|
113 |
+
- num_train_epochs: 10 epochs
|
114 |
+
- batch_size: 64
|
115 |
+
- max_seq_length: 4096
|
116 |
+
|
117 |
+
## ライセンス
|
118 |
+
元モデルである[Elizezen/SniffyOtter-7B](https://huggingface.co/Elizezen/SniffyOtter-7B)と同じく、CC-BY-NC-4.0の元配布します。
|
119 |
+
|