Instructions to use darrellbest/Qwen3.5-4B-Heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use darrellbest/Qwen3.5-4B-Heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="darrellbest/Qwen3.5-4B-Heretic") 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("darrellbest/Qwen3.5-4B-Heretic") model = AutoModelForMultimodalLM.from_pretrained("darrellbest/Qwen3.5-4B-Heretic", 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 darrellbest/Qwen3.5-4B-Heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "darrellbest/Qwen3.5-4B-Heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darrellbest/Qwen3.5-4B-Heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/darrellbest/Qwen3.5-4B-Heretic
- SGLang
How to use darrellbest/Qwen3.5-4B-Heretic 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 "darrellbest/Qwen3.5-4B-Heretic" \ --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": "darrellbest/Qwen3.5-4B-Heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "darrellbest/Qwen3.5-4B-Heretic" \ --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": "darrellbest/Qwen3.5-4B-Heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use darrellbest/Qwen3.5-4B-Heretic with Docker Model Runner:
docker model run hf.co/darrellbest/Qwen3.5-4B-Heretic
Qwen3.5-4B Heretic (ARA)
Qwen/Qwen3.5-4B with its refusal behaviour removed by Heretic using Arbitrary-Rank Ablation (ARA), full-weight. bf16, same architecture and parameter count as the original, including the vision encoder, thinking control and the multi-token-prediction weights.
Results
| Refusals | KL divergence | |
|---|---|---|
| Original Qwen3.5-4B | 99/100 | 0 (by definition) |
| This model | 6/100 | 0.0220 |
Measured by Heretic on the test[:100] splits of mlabonne/harmful_behaviors (refusals) and
mlabonne/harmless_alpaca (KL divergence, the drift in ordinary behaviour), with Heretic's default system prompt and
refusal markers. The numbers come from an independent re-evaluation of the final exported weights (evaluate_model).
Built on dalatexcoder's findings
No ARA parameters have been published for the 4B; the only public decensoring of it (p-e-w/Qwen3.5-4B-heretic, directional ablation) reaches 40/100 from 93/100. The parameters here are those published with dalatexcoder/Qwen3.5-2B-heretic-ara, with the layer range (12-19 of 24) scaled to the 4B's 32 layers (16-25). They transferred better than the 9B's published sets, which were also tried as-is (10/100 to 91/100).
What this release adds is a complete checkpoint: save_pretrained drops Qwen3.5's 15 multi-token-prediction tensors
and rounds the 48 float32 Gated DeltaNet parameters (linear_attn.A_log, linear_attn.norm.weight) down to bf16.
Both were restored from the original here (ARA never touches either), so all 738 tensors match the original in name,
shape and dtype. The MTP weights live in model-auxiliary.safetensors, listed in the index.
Parameters
ARA, full weight, on attn.o_proj and mlp.down_proj:
| Parameter | Value |
|---|---|
| start_layer_index | 16 |
| end_layer_index | 25 |
| preserve_good_behavior_weight | 0.8058 |
| steer_bad_behavior_weight | 0.0003 |
| overcorrect_relative_weight | 1.0351 |
| neighbor_count | 10 |
Calibration used 400 harmless and 400 harmful prompts (train[:400]).
Checked
- Ordinary prompts (facts, a haiku, a two-sentence technical explanation): correct and fluent.
- Thinking-mode reasoning, 4 arithmetic and word problems x 10 seeds with Qwen's recommended sampling (vLLM): 40/40 finished and answered correctly, the same as the original's 40/40.
- Vision: given an image of a red circle and a blue square, it describes exactly that.
Tooling
A merge of upstream Heretic's master and its ara branch (ARA with master's scorers and thinking-model handling),
Heretic upstream 3521f86 + ARA c91d690, transformers 5.17.0, torch 2.11.0+cu130, one RTX PRO 6000.
Use
Exactly like the original, with transformers, vLLM or SGLang. Thinking mode is on by default and can be turned off
per request (enable_thinking=False).
Reduced safety guardrails by design. You are responsible for what you do with it.
The family
| Repository | Format | Size | Use it with |
|---|---|---|---|
| Qwen3.5-4B-Heretic | bf16 safetensors | 9.35 GB | transformers, vLLM, SGLang |
| Qwen3.5-4B-Heretic-GGUF | GGUF BF16 / Q8_0 / Q4_K_M + vision mmproj | 8.67 / 4.61 / 2.78 GB + 0.67 GB | llama.cpp, Ollama |
| Qwen3.5-4B-Heretic-FP8 | FP8 W8A8, compressed-tensors | 6.79 GB | vLLM |
| Qwen3.5-4B-Heretic-NVFP4 | NVFP4, compressed-tensors | 5.67 GB | vLLM on Blackwell |
- Downloads last month
- 13