hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview
0110
Qwen3.8-27B Code Analysis Preview (v2)
A code-analysis / code-review fine-tune of `hotdogs/Qwen3.8-27B-abliterated`, trained on the v2 dataset that fixes the template-collapse problem of v1.
Given a snippet of code, it produces a structured, multi-paragraph review — real bugs found, line-level reasoning, severity, and a concrete fix in a code block. It is a reasoning model: it thinks first (separated into reasoning_content when served) and then answers.
v1 → v2: v1 was trained on a synthetic placeholder dataset (15 unique code bodies, 29–44 char answers like ## Review\n\nFound N issue(s) in L lines.). The model faithfully reproduced the template — it answered "No bugs found. Code is clean." and missed real bugs. v2 was retrained on 21,009 real code+bug+answer rows across 5 languages with 550–880 char detailed answers. The model now actually finds the bugs.Highlights
- ✅ Finds real bugs — off-by-one, missing cache-hit,
fetchnot checkingres.ok, async races, etc. - ✅ Generalizes — correctly analyzes bug types not in the training archetypes (base model supplies the code knowledge; the LoRA supplies the review structure)
- ✅ No hallucination on clean code — says "correct, no bugs" instead of inventing problems
- ✅ Reasoning separated — internal monologue goes to
reasoning_content, user sees only the answer - ✅ MTP preserved — 15 multi-token-prediction tensors (
mtp.*/blk.64.nextn.*) kept for speculative decoding
How it was made
Smoke test (v2)
Usage (transformers)
from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch
MODEL = "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview"
tok = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
MODEL, torch_dtype=torch.bfloat16,
device_map="auto", trust_remote_code=True, attn_implementation="sdpa")
model.eval()
def review(code, max_new=600):
text = tok.apply_chat_template(
[{"role": "user", "content": "Review this code and report any bugs you find.\n\n```python\n" + code + "\n```"}],
tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(input_ids=inputs["input_ids"],
attention_mask=inputs["attention_mask"],
max_new_tokens=max_new, do_sample=False,
repetition_penalty=1.05)
new = out[0][inputs["input_ids"].shape[1]:]
return tok.decode(new, skip_special_tokens=True)Usage (GGUF)
See the GGUF repo → `hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview-mtp-GGUF`
Files
12 safetensors shards (~52 GB, bf16) + tokenizer, processor, config, chat template, generation config. 1,199 tensors incl. 15 MTP.
License
MIT (inherits the abliterated base).
