Instructions to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="IstroSec/ThinkingCap-Qwen3.8-27B-abliterated") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated") model = AutoModelForMultimodalLM.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated", "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/IstroSec/ThinkingCap-Qwen3.8-27B-abliterated
- SGLang
How to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated 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 "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated" \ --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": "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated", "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 "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated" \ --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": "IstroSec/ThinkingCap-Qwen3.8-27B-abliterated", "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 IstroSec/ThinkingCap-Qwen3.8-27B-abliterated with Docker Model Runner:
docker model run hf.co/IstroSec/ThinkingCap-Qwen3.8-27B-abliterated
ThinkingCap-Qwen3.8-27B-abliterated
An uncensored variant of bottlecapai/ThinkingCap-Qwen3.8-27B, a Qwen3.8-27B fine-tune with calibrated thinking length. The refusal behaviour was removed by merging a published abliteration adapter; the vision tower and the MTP head for speculative decoding are carried over unmodified. Full bf16 weights.
This is the source checkpoint. The quantized builds made from it:
| Build | Size | KL vs. this model | Notes |
|---|---|---|---|
| This repo, bf16 | 55.6 GB | — | source; quantize from here |
…-abliterated-FP8-DYNAMIC |
31.3 GB | 0.0068 | W8A8 FP8, vLLM |
…-abliterated-FP8-BLOCK |
31.3 GB | 0.0046 | W8A8 FP8 with 128×128 weight blocks, vLLM; on Ada GPUs use FP8-DYNAMIC |
…-abliterated-NVFP4A16 |
20.6 GB | 0.0155 | 4-bit FP4 weights, vLLM |
…-abliterated-W4A16 |
19.5 GB | 0.0260 | 4-bit integer weights, vLLM |
…-abliterated-GGUF |
13.0–29.0 GB | — | IQ3_M to Q8_0 and a vision mmproj, llama.cpp; Q5_K_M recommended |
Both 4-bit vLLM builds are weight-only (activations stay bf16) and run on sm80+ GPUs (Ampere and newer), with Marlin kernels on most of them. NVFP4A16 has the lower KL; W4A16 is 1.1 GB smaller. Speed was not measured for either.
Usage
vLLM
vllm serve IstroSec/ThinkingCap-Qwen3.8-27B-abliterated \
--reasoning-parser qwen3 \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
--max-model-len 65536
Sampling (Qwen3.8 recommendations, which ThinkingCap uses unchanged): thinking mode temperature 1.0, top_p 0.95, top_k 20, min_p 0; non-thinking mode temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5. Thinking budget via chat_template_kwargs: {"reasoning_effort": "xhigh"}, with xhigh (default, recommended), medium or low. Do not use greedy decoding for thinking.
MTP. The head is present and unmodified. As a reference point for checking it: on the original bf16 weights, bottlecapai measured ~53% draft acceptance (≈2.6 tokens/step) at xhigh with vLLM 0.29.0. A value near zero means the head is missing or mis-loaded.
Transformers
from transformers import AutoModelForImageTextToText, AutoProcessor
m = AutoModelForImageTextToText.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated", dtype="bfloat16", device_map="cuda")
p = AutoProcessor.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated")
msgs = [{"role": "user", "content": "…"}]
text = p.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True, reasoning_effort="medium")
out = m.generate(**p.tokenizer(text, return_tensors="pt").to("cuda"), max_new_tokens=2048, do_sample=True, temperature=1.0, top_p=0.95, top_k=20)
llama.cpp
Use the GGUF builds; they were converted from this checkpoint.
Evaluation
Heretic's evaluator (--evaluate-model), 100 harmful prompts from mlabonne/harmful_behaviors and 100 harmless from mlabonne/harmless_alpaca, against the original ThinkingCap:
| Refusals | KL divergence vs. original | |
|---|---|---|
| ThinkingCap-Qwen3.8-27B (original) | 97 / 100 | — |
| This model | 6 / 100 | 0.0654 |
Evaluator: Heretic 1.2.0, as reported by the tool's banner. KL is measured on first-token distributions over the harmless prompts.
For comparison, the published abliterations of the base model sit at 0–2/100 refusals with KL 0.05–0.08.
Standard capability benchmarks were not run. On the base model, the adapter's author reports PIQA unchanged within error (acc 0.8118 vs 0.8101 original); whether that holds on ThinkingCap is unverified.
How it was made
The refusal behaviour was removed by a LoRA transplant, not by a fresh search. ThinkingCap is a fine-tune of Qwen/Qwen3.8-27B, and MuXodious published an abliteration adapter for that base model, Qwen3.8-27B-absolute-heresy-LoRA, made with Heretic (Self-Organizing-Map multi-direction extraction, magnitude-preserving orthogonal ablation). That adapter was applied to ThinkingCap at scale 1.0 and merged.
Two direct Heretic runs on ThinkingCap were tried first, stock rank-1 ablation (77 trials) and Arbitrary-Rank Ablation (194 trials); neither reached a usable Pareto point. The transplant worked at scale 1.0 on the first attempt, which suggests ThinkingCap's SFT left the base model's refusal geometry largely intact.
After the merge, the mtp.* tensors, which the PEFT save path drops, were copied back from the original checkpoint, so speculative decoding works unchanged.
What is preserved
- Thinking-length calibration: ThinkingCap's weights and chat template are otherwise unmodified, so the
reasoning_effortcontrol (xhighdefault,medium,low) carries over. Its token-efficiency numbers were not re-benchmarked on this model. - Vision: the ViT tower and merger are untouched. The adapter edits only the text decoder's attention output projections and MLP down projections (parameter table on the source card).
- MTP head: present and unmodified; use
--speculative-config '{"method":"mtp",…}'in vLLM. - Tool calling: same chat template and parser flags as the original; not separately tested.
Limitations and intended use
- The model complies with requests the original declined. It has no safety filter; you are the safety layer. Run it behind your own policy controls, for research, red-teaming, creative work, or agent pipelines where over-refusal was the problem.
- 6/100 of the harmful evaluation prompts still refuse; abliteration reduces refusal, it does not remove it.
- Thinking and non-thinking modes were not evaluated separately. A reasoning trace may still discuss policy or guidelines even where the final answer complies; test in thinking mode for your use case.
- All limitations of the original ThinkingCap apply.
License
PolyForm Small Business License 1.0.0 + BottleCap personal-use grant, inherited from ThinkingCap (see LICENSE). Upstream Qwen materials and the abliteration adapter are Apache-2.0 (see NOTICE). This model as a whole is not Apache-2.0: check the PolyForm terms before commercial use, and contact BottleCap AI for a commercial license.
Credits
bottlecapai (ThinkingCap) · MuXodious (the abliteration adapter this transplant uses) · p-e-w/heretic (evaluation tooling and the method behind the adapter) · Qwen team (Qwen3.8-27B)
- Downloads last month
- 236