Instructions to use egibson/ThinkingCap-Qwen3.6-27B-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use egibson/ThinkingCap-Qwen3.6-27B-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="egibson/ThinkingCap-Qwen3.6-27B-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("egibson/ThinkingCap-Qwen3.6-27B-heretic") model = AutoModelForMultimodalLM.from_pretrained("egibson/ThinkingCap-Qwen3.6-27B-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 egibson/ThinkingCap-Qwen3.6-27B-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "egibson/ThinkingCap-Qwen3.6-27B-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": "egibson/ThinkingCap-Qwen3.6-27B-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/egibson/ThinkingCap-Qwen3.6-27B-heretic
- SGLang
How to use egibson/ThinkingCap-Qwen3.6-27B-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 "egibson/ThinkingCap-Qwen3.6-27B-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": "egibson/ThinkingCap-Qwen3.6-27B-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 "egibson/ThinkingCap-Qwen3.6-27B-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": "egibson/ThinkingCap-Qwen3.6-27B-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 egibson/ThinkingCap-Qwen3.6-27B-heretic with Docker Model Runner:
docker model run hf.co/egibson/ThinkingCap-Qwen3.6-27B-heretic
This is a decensored version of bottlecapai/ThinkingCap-Qwen3.6-27B, made using Heretic v1.4.0
Heretic removes refusal behavior ("safety alignment") from language models via directional ablation (abliteration), using a TPE-based (Optuna) parameter optimizer to automatically find ablation parameters that minimize refusals while co-minimizing KL divergence from the original model's behavior on harmless prompts.
GGUF quantizations (Q4_K_M, Q6_K, Q8_0, f16) and the mmproj file for this model are available at egibson/ThinkingCap-Qwen3.6-27B-heretic-GGUF.
Abliteration parameters
This model corresponds to trial 187 of 200 optimization trials, selected from the Pareto front for its low refusal rate at negligible KL divergence cost:
| Parameter | Value |
|---|---|
| direction_index | 39.11 |
| attn.o_proj.max_weight | 1.31 |
| attn.o_proj.max_weight_position | 40.14 |
| attn.o_proj.min_weight | 1.26 |
| attn.o_proj.min_weight_distance | 19.99 |
| mlp.down_proj.max_weight | 1.43 |
| mlp.down_proj.max_weight_position | 41.06 |
| mlp.down_proj.min_weight | 1.26 |
| mlp.down_proj.min_weight_distance | 31.46 |
Performance
| Keywords (refusals detected on harmful prompts) | KL divergence from original model on harmless prompts | |
|---|---|---|
| bottlecapai/ThinkingCap-Qwen3.6-27B (original) | 97/100 | 0 (by definition) |
| This model | 12/100 | 0.0186 |
Lower keyword count means fewer refusals. Lower KL divergence means the model's behavior on harmless prompts is closer to the original (values above 0.5 typically indicate significant capability damage — 0.0186 is negligible).
Citation
This is a finetuned derivative of Qwen3.6-27B (Qwen Team, 2026) via bottlecapai/ThinkingCap-Qwen3.6-27B, and should respect the original models' licensing requirements. Please cite the base model if you use this one:
@misc{ThinkingCap-Qwen3.6-27B,
title = {bottlecapai/ThinkingCap-Qwen3.6-27B},
author = {Lasocki, Karol and Osusky, Adam and Lindauer, Jan and Jirkovsky, Adam and
Mihal, Filip and Platek, Ondrej and Herel, David and Ihnatchenko, Luka and
Bartek, Vojtech and Jirak, Jiri and Mikolov, Tomas},
year = {2026},
}
Abliteration performed with Heretic by Philipp Emanuel Weidmann.
- Downloads last month
- 40