158 yesterday

9B distilled from DeepSeek-V4-Pro: decensored, with thinking, tool calling and vision in one checkpoint. q4km 6.25GB · q6k 7.98GB · q8_0 10.15GB · f16 18.84GB.

vision tools thinking
ollama run tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0

Details

yesterday

2fb1d3bb0353 · 10GB

qwen35
·
8.95B
·
Q8_0
clip
·
456M
·
Q8_0
{ "num_ctx": 32768, "num_predict": 4096, "repeat_penalty": 1.05, "stop": [ "
{{ if .Tools }}{{ end }}{{ if .Thinking }}{{ end }}{{ if .System }}<|im_start|>system {{ .System }}<

Readme

DeepSeek-V4-Pro-Qwen3.5-9B — Heretic

Frontier reasoning from a much larger teacher, compressed into 9B, decensored, and shipped with vision + tool calling. One ollama run away.

  • 8.95B params · qwen35 · 262K native context (32K in these builds) · Apache-2.0
  • Capabilities: thinking, tools, vision, completion
  • Verified running 100% on GPU under Ollama 0.40.16 (A100-SXM4-40GB)
ollama run tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0

Mở Notebook trên Google Colab https://colab.research.google.com…

Why this model

You get DeepSeek-V4-Pro’s reasoning style at 9B. The student was trained on ~250K math & STEM samples generated by DeepSeek-V4-Pro in Max Effect mode — not generic web data. It inherits the decomposition habits: restate, break the problem down, verify, then answer.

It is decensored without being lobotomized. Heretic’s Arbitrary-Rank Ablation edits refusal directions in weight space instead of retraining, so refusals drop from 100⁄100 to 3⁄100 while the model’s output distribution barely moves (KL 0.0422). Math and instruction-following survive intact.

It answers with fewer tokens per correct answer. Against Qwen3.5-9B on the same 1,500-question MMLU-Pro sample: 36.1% fewer reasoning tokens per correct answer while scoring +0.93 points higher. That is the difference between a model that thinks and one that rambles.

It actually follows the output format you asked for. Told to “output only ONE capital letter” after thinking, it complied 97.2% of the time. The base Qwen3.5-9B managed 37.3%, with 62.1% verbose refusals-to-format. For agent loops and parsing pipelines this matters more than a point of accuracy.

Three capabilities in one 9B checkpoint. Thinking, tool calling, and image input — a combination that normally means stitching together a VLM and a separate agent model.

Small coding/tool-use gains came for free. No coding data was in the training mix, yet programming and tool-calling behaviour improved — transfer from stronger reasoning structure. Treat it as a bonus, not a specialty.


What’s new at a glance

What changed Why it matters
Distilled from DeepSeek-V4-Pro (Max Effect) into Qwen3.5-9B Large-teacher reasoning quality in a size that fits on a single consumer GPU
SFT → GSPO RL pipeline, ~250K math/STEM samples Multi-step derivations, constraint tracking, reliable final answers
Heretic v2.0.0.dev0 ARA decensoring 100⁄100 → 3⁄100 refusals, KL divergence only 0.0422
Token efficiency: 3,157 tokens per correct answer 36.1% cheaper than Qwen3.5-9B at higher accuracy
Format compliance 97.2% (vs 37.3% base) Predictable output for parsers, graders, and agents
Vision projector included (CLIP, 456M) Ask about images without a second model
Tool calling verified end-to-end Single and parallel calls, full tool round-trip
Four pre-built quantizations, capability metadata fixed Correct badges and no format surprises after pull

Tags

Tag Quant Size Best for
:q4km Q4_K_M 6.3 GB 8–12 GB GPUs, fastest
:q6k Q6_K 8.0 GB Best size-to-quality ratio
:q8_0 Q8_0 10 GB Recommended default — near-lossless
:f16 F16 18 GB Reference build, no quantization

Every tag carries the vision projector and declares tools + thinking capabilities.


Quick start

# CLI
ollama run tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0 "Prove that sqrt(2) is irrational"

# API
curl http://localhost:11434/api/chat -d '{
  "model": "tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0",
  "messages": [{"role": "user", "content": "Compute 17*23"}],
  "stream": false
}'
from ollama import chat

r = chat(
    model="tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0",
    messages=[{"role": "user", "content": "Explain Rayleigh scattering in three sentences."}],
)
print(r.message.content)

Also OpenAI-compatible at http://localhost:11434/v1.


Tool calling

from ollama import chat

tools = [{
    "type": "function",
    "function": {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"],
        },
    },
}]

r = chat(
    model="tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0",
    messages=[{"role": "user", "content": "What's the weather in Hanoi? Use the tool."}],
    tools=tools,
)
print(r.message.tool_calls)
# [ToolCall(function=Function(name='get_weather', arguments={'city': 'Hanoi'}))]

Verified here: single call for a one-tool request; two parallel calls for a two-tool request (convert_currency + get_weather); and the full round trip — tool_calls → tool result → grounded final answer using the returned data.


Vision

import base64
from ollama import chat

img = base64.b64encode(open("photo.jpg", "rb").read()).decode()

r = chat(
    model="tranhuythang9999/deepseek-v4-pro-9b-heretic:q8_0",
    messages=[{
        "role": "user",
        "content": "What animal is on the candy?",
        "images": [img],
    }],
)
print(r.message.content)

Images are genuinely encoded: a 2.3 MB JPEG expands the prompt from ~15 to ~4,000 tokens, and scene descriptions are accurate. Fine-grained details are the weak spot — the correct tiny logo was identified on a clean run, then mis-identified on repeated runs at Q4/Q8. Reach for :f16 when visual precision matters.

On CUDA, if vision ever looks nonsensical, disable flash attention and restart:

OLLAMA_FLASH_ATTENTION=0 ollama serve

This sidesteps a known llama.cpp issue with mtmd flash attention and Qwen3.5-VL image embeddings.


Thinking: two rules that save you time

  1. Give it budget. With num_predict ≤ 300 the model spends everything inside the thinking block and returns an empty content with done_reason=length. Use ≥ 1024; these builds default to 4096.
  2. Don’t use temperature 0. The hybrid-attention stack can loop inside the thinking block. Recommended sampling, already baked into every tag: temperature 0.6, top_p 0.95, top_k 20, repeat_penalty 1.05.

Performance

Measured on A100-SXM4-40GB, Ollama 0.40.16, 100% GPU offload, 32K context, single request:

Tag Load Generation Prompt processing
:q4km 7.2 s 110.6 tok/s 455 tok/s
:q6k — 100.7 tok/s 495 tok/s
:q8_0 — 92.8 tok/s 503 tok/s
:f16 31.8 s 65.3 tok/s 177 tok/s

Upstream benchmarks for the parent model (not re-run here):

Benchmark Score
GSM8K 94.50%
MMLU-Pro Math 92.40%
MMLU-Pro (Math + Physics + Chemistry avg) 90.53%
Tokens per correct answer 3,157
Correct answers per 1M tokens 316.8 (+56.4% vs Qwen3.5-9B)

How the decensoring works

Arbitrary-Rank Ablation steers refusal directions out of the residual stream — a weight-space edit, no retraining.

Parameter Value
Layer range 9 → 24
preserve_good_behavior_weight 0.8264
steer_bad_behavior_weight 0.0003
overcorrect_relative_weight 0.9645
neighbor_count 12
Metric This model Original
Refusals 3 / 100 100 / 100
KL divergence 0.0422 0 (by definition)

The tiny KL is the point: capability is preserved while the refusal reflex is removed.


Lineage

Qwen/Qwen3.5-9B-Base
  └── Qwen/Qwen3.5-9B
        └── Jackrong/DeepSeek-V4-Pro-Qwen3.5-9B        SFT + GSPO RL distillation, ~250K math/STEM
              └── xtools-at/…-UNCENSORED-heretic       Heretic v2.0.0.dev0 ARA ablation
                    └── these GGUFs                    mradermacher quantization

Limitations

  • Experimental community model. Expect hallucinations and reasoning errors on hard or underspecified problems.
  • Uncensored by design. Refusal behaviour was intentionally removed. Outputs are unfiltered and may be offensive. Do not expose this directly to end users without your own guardrails — you own what it generates and how it ships.
  • Weak visual detail. Good scene understanding, unreliable fine-grained recognition at Q4/Q8.
  • 32K context in these builds (262K is the architecture ceiling). Raising num_ctx costs KV-cache memory.
  • Upstream MMLU-Pro numbers come from 500 sampled questions per subject, not the full subsets.
  • Independently verify high-stakes math, science, and factual output.

Credits

Teacher data: DeepSeek · Base family: Qwen · Distillation: Jackrong · Decensoring: xtools-at / Heretic v2.0.0.dev0 · GGUF quantization: mradermacher · Fine-tuning tooling: Unsloth · Packaging & validation: this repository.

@misc{jackrong_deepseek_v4_pro_qwen35_9b,
  title     = {DeepSeek-V4-Pro-Qwen3.5-9B},
  author    = {Jackrong},
  year      = {2026},
  publisher = {Hugging Face}
}