Instructions to use hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview") model = AutoModelForMultimodalLM.from_pretrained("hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview
- SGLang
How to use hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview with Docker Model Runner:
docker model run hf.co/hotdogs/Qwen3.8-27B-abliterated-code-analysis-preview
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
| Step | Detail |
|---|---|
| Base | hotdogs/Qwen3.8-27B-abliterated (abliterated, ~27B) |
| Method | Unsloth LoRA, r=32, 233M trainable params (0.85%) |
| Dataset | hotdogs/code-analysis-sft-qwen38-v2 — 21,009 train / 1,900 valid |
| Languages | Python, JavaScript, Go, Rust, C |
| Answer style | 550–880 chars, line numbers, severity, fix code block |
| Sequence | max 2048 tokens, bf16, 5× RTX 3090 |
| Early stop | step 400 / 1313 (epoch ~0.30, loss ~0.0003) — stopped before the 15 archetypes were memorized to death |
| Merge | merge_and_unload, MTP 15 tensors recovered, no triple-nest |
Smoke test (v2)
| Case | Result |
|---|---|
| Off-by-one (in-archetype) | 🟢 Found it + fix + docstring note |
| Async race (unseen) | 🟢 "no cache-hit fast path" + concurrency |
| Clean code (hallucination test) | 🟢 "correct, no bugs" + minor float/bool note |
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).
- Downloads last month
- 447