MissawB/otaku-qwen38-27b-adapter
Otaku expert — LoRA adapter for Qwen3.8-27B
A QLoRA adapter trained to answer questions about anime and manga culture, in English and French. This repository carries two formats of the same adapter:
What was measured
This repository is only reached after a behavioural gate returns GO. What follows is measurements, not claims.
Training — HF job 6a9dc0d1e686246ca69a669d, one L40S, 35.4 h, 1207 steps, 1 epoch.
grad_norm stayed between 0.237 and 0.969 across 120 logged steps, with no non-finite value. All 512 adapter tensors are clean (no NaN, no Inf).
Gate — HF job 6a9fe93a8e5f7b7fd14cb93a, compared against the stock qwen3.8:27b tag re-created with the same Modelfile frame, at temperature 0 and seed 0, on 120 held-out questions, each asked with its own system prompt and language:
The fine-tune recalls roughly 30 % more of the reference content than the base, and the gap is not noise. The headline metric — recall of the reference answer's content, each token weighted by how rare it is in the corpus — is length-insensitive by construction: the same facts buried in filler score identically. That is what separates it from token F1, which triples between the two models but mostly measures that the base is verbose.
What these numbers do NOT establish
- The references come from the training distribution. The adapter learned which facts this corpus emphasises, which is not the same as knowing more about anime. The held-out set was never seen during training, so the measurement is honest — but it describes this distribution, not a general benchmark.
- The base is capped at 200 tokens. It spends its budget on preambles and bullet lists, and gets cut off before finishing (its F1 of 0.14 says so loudly). Part of the gap therefore comes from the adapter spending its budget on facts instead. This is not an artifact: in production the budget is the same, so a user really does receive less from the base.
- On "Who is the hero of Chainsaw Man?", the adapter lists characters instead of naming the hero. It passes the substring check; the base answers that particular question more precisely.
What it learned is therefore twofold: a form — short, complete answers — and a factual selection closer to what the domain expects.
Serving with Ollama
FROM qwen3.8:27b
ADAPTER ./otaku-adapter.gguf
PARAMETER num_ctx 4096
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""The frame is not decorative: a derived Modelfile inherits neither the `TEMPLATE` nor the `PARAMETER stop` lines. Without it the model generates to the end of its window, the client gives up after 90 s with zero tokens, and nothing in the logs explains why.
Recipe
QLoRA NF4, r=16, lora_alpha=32, lora_dropout=0.05 — the QLoRA paper's values for models of 33B and above — applied to the seven q/k/v/o/gate/up/down_proj modules of the language tower only; the vision tower is left untouched. learning_rate=1e-4, cosine schedule, 10 % warmup, max_grad_norm=0.3, effective batch size 32, max_length=4096, bf16.
One thing worth knowing before starting from this base. unsloth/Qwen3.8-27B-unsloth-bnb-4bit declares bnb_4bit_compute_dtype: float16, while Qwen/Qwen3.8-27B is natively bfloat16 — the 4-bit repack changed the dtype. Training with bf16=True without correcting that field runs the quantised matmuls in fp16 with no `GradScaler`, because that is an fp16-only mechanism which bf16=True never enables. fp16 overflows at 65504. An earlier run diverged at step 230 and burned 36 hours of L40S to produce an adapter that was NaN end to end.
