18 2 days ago

vision
ollama run n0404n0404/Qwen3.8-27B-Heretic-JP-Roleplay-DanbooruTags:q2_k

Models

View all →

Readme

Qwen3.8-27B Heretic · Japanese Roleplay + Danbooru Tags (NSFW)

GGUF quantizations of sss22213/Qwen3.8-27B-Heretic-JP-Roleplay-NSFW-DanbooruTags: the Japanese roleplay model n0404n0404/qwen3.8-27b-heretic-jp-roleplay (Qwen3.8-27B, refusals removed with Heretic, roleplay QLoRA) with one more skill trained in: turning a scene description into a Danbooru tag prompt for Stable Diffusion WebUI (A1111). Play a scene, then ask for the image prompt for it — or use it purely as a description-to-tags converter.

Adult content. This model does not refuse; the roleplay data and the tag data both include explicit material, and the tag task emits nsfw for questionable/explicit scenes. Not for minors, not for public-facing deployments. You are responsible for how you use it.

Unquantized BF16 weights: sss22213/Qwen3.8-27B-Heretic-JP-Roleplay-NSFW-DanbooruTags on Hugging Face (safetensors, ~51 GB).

Tags

Tag Quant Size Fits in
q2_k Q2_K 11.6 GB 12–16 GB VRAM. Smallest, noticeably lossy — last resort.
q3_k_m Q3_K_M 14.2 GB 16 GB VRAM.
q4_k_m / latest Q4_K_M 17.5 GB 24 GB VRAM. Recommended balance of quality and size.
q6_k Q6_K 23.0 GB 24 GB VRAM with a small context, comfortable on 32 GB. Closest to the bf16 weights.

Every tag ships with the vision projector (0.93 GB, included in the sizes above). Sizes are model weights only; the KV cache for your context length comes on top.

ollama run n0404n0404/qwen3.8-27b-heretic-jp-roleplay-danboorutags

Tag mode: description → A1111 prompt

Use exactly this system prompt — it is the one the training data was built with:

あなたはイラスト生成用プロンプトの専門家です。与えられた場面描写を、Stable Diffusion WebUI(A1111)向けの Danbooru タグに変換してください。描写に含まれる要素だけをタグにし、存在しないタグを作らず、タグはカンマ区切りで一行に出力してください。

Then send the scene description (Japanese is what it was trained on) as the message. The reply is one comma-separated line in A1111 syntax — underscores turned into spaces, parentheses escaped — ordered nsfw (only for questionable/explicit scenes) → character → franchise → the tags the description actually mentions. It is trained to tag only what the description supports and not to invent style, quality or meta tags; add those yourself.

Easiest as a Modelfile so the system prompt is baked in and thinking is off (the answer is short; reasoning adds nothing here):

FROM n0404n0404/qwen3.8-27b-heretic-jp-roleplay-danboorutags:q4_k_m
PARAMETER num_ctx 8192
SYSTEM """あなたはイラスト生成用プロンプトの専門家です。与えられた場面描写を、Stable Diffusion WebUI(A1111)向けの Danbooru タグに変換してください。描写に含まれる要素だけをタグにし、存在しないタグを作らず、タグはカンマ区切りで一行に出力してください。"""
ollama create danbooru-tagger -f Modelfile
ollama run danbooru-tagger
>>> /set nothink
>>> 夜の屋上で、制服姿の少女が手すりにもたれて街の灯りを眺めている。長い黒髪が風になびく。

From the API, pass the same system message and "think": false.

Roleplay mode

Identical to qwen3.8-27b-heretic-jp-roleplay: character sheet and scene in the system prompt, thinking left on (that is where it plans the scene and keeps the character consistent), num_ctx raised for long sessions:

FROM n0404n0404/qwen3.8-27b-heretic-jp-roleplay-danboorutags:q4_k_m
PARAMETER num_ctx 32768
SYSTEM """あなたは「花音」というキャラクターとしてロールプレイを行います。
性格:明るく少し強気。一人称は「あたし」。
状況:放課後の教室。ユーザーは同級生。
セリフは「」で、地の文は三人称で書いてください。"""

Mid-roleplay you can ask, in character context, for a tag line describing the current scene — but the dedicated system prompt above gives cleaner results.

Sampling: temperature 0.6 / top-p 0.95 / top-k 20 is a good starting point (the values the training reasoning was generated with). Vision: image input works (stock Qwen3.8 projector) but neither fine-tune used images.

How it was made

  1. Base: Qwen3.8-27B → Heretic ablation (no-refusal) → Japanese roleplay QLoRA with model-written <think> reasoning (jp-roleplay).
  2. Tag data: dartags/danbooru-2408-blind-captions (MIT) — Danbooru posts with a one-sentence Japanese scene summary. Coverage-sampled so every tag appears a minimum number of times (~440k rows); the answer is the tags the summary actually mentions, in A1111 form, nsfw prepended for q/e ratings. 10,000 roleplay conversations mixed in as a refresher; empty <think> blocks masked from the loss so the tag samples could not shorten the reasoning.
  3. LoRA: LoRA Forge (Unsloth + TRL) on one H100, bf16: r 32, alpha 32, dropout 0.05, lr 4e-4 cosine, 8k sequences, effective batch 16, 1 epoch (28,459 steps), assistant-only loss. Train loss 0.507, 33.1 h.
  4. Merge: at alpha 8 — a quarter of the trained strength. Alpha 32 and 16 both shortened the roleplay reasoning; 8 kept it while the tag task still worked. Then GGUF conversion and quantization with llama.cpp, vision projector attached.

Full model card with every setting: Hugging Face.

Caveats

  • The tag skill is deliberately applied at 25 % strength to protect the roleplay side; expect it to be less exact than a dedicated tagger, and check output against your image model’s vocabulary.
  • Tag vocabulary is Danbooru as of 2024-08; newer characters and franchises are unknown. Only Japanese descriptions were trained.
  • No formal evaluation of tag accuracy or roleplay quality after the merge — manual checks only.
  • Quantization changes the model further; Q2_K in particular loses noticeably.
  • Apache-2.0 like the base model; training data is MIT.

日本語

日本語ロールプレイモデル(jp-roleplay)に、場面描写 → Stable Diffusion WebUI(A1111)向け Danbooru タグへの変換を追加学習したモデルの GGUF 量子化版です。成人向けの内容を生成し、拒否しません。

  • タグ変換は上記の system プロンプトを そのまま 使い、場面描写を日本語で送ってください。thinking はオフ(/set nothink)で構いません。出力は描写に含まれる要素のタグのみ(nsfw → キャラクター → 作品 → タグの順)。画風・品質タグは自分で足してください。
  • ロールプレイはキャラクター設定を system プロンプトに書き、thinking はオンのまま。
  • LoRA は学習時の 14 の強さでマージしています(ロールプレイ側の推論の長さを守るため)。
  • 推奨: q4_k_m(24 GB VRAM)。16 GB なら q3_k_mq6_k が最も元の精度に近いです。

中文說明

在日文角色扮演模型(jp-roleplay)上再加訓「場景描述 → A1111 Danbooru 標籤」能力後的 GGUF 量化版。會產生成人內容且不拒答,請自行負責。

  • 轉標籤:system prompt 原文照用(見上),把日文場景描述丟進去;可關思考(/set nothink)。輸出只含描述裡有的元素(nsfw → 角色 → 作品 → 標籤),畫風/品質標籤請自己補。
  • 角色扮演:角色設定寫在 system prompt,保持思考開啟。
  • LoRA 以訓練強度的 1/4(alpha 8/32)合併,為了保住角色扮演的思考長度;標籤精準度會比專用 tagger 低一些。
  • 建議 q4_k_m(24 GB 顯卡);16 GB 選 q3_k_mq6_k 最接近原始精度。每個 tag 都附視覺 projector。