Instructions to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC 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-FP8-DYNAMIC 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-FP8-DYNAMIC") 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("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC") model = AutoModelForMultimodalLM.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC", 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 IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC 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-FP8-DYNAMIC" # 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-FP8-DYNAMIC", "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-FP8-DYNAMIC
- SGLang
How to use IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC 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-FP8-DYNAMIC" \ --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-FP8-DYNAMIC", "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-FP8-DYNAMIC" \ --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-FP8-DYNAMIC", "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-FP8-DYNAMIC with Docker Model Runner:
docker model run hf.co/IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC
ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC
FP8 (W8A8, dynamic per-token activations) quantization of ThinkingCap-Qwen3.8-27B-abliterated, the uncensored variant of bottlecapai/ThinkingCap-Qwen3.8-27B.
36.8 GB (from 55.6 GB bf16). That's ~6 GB more than an FP8 build that also quantizes the DeltaNet block; see below for why it doesn't. Near-lossless. Serves on FP8-capable GPUs (Hopper, Ada, Blackwell, DGX Spark) natively, and on Ampere through vLLM's Marlin weight-only FP8 fallback — no custom kernels either way.
What is quantized
Produced with llm-compressor, scheme FP8_DYNAMIC: per-channel FP8 (E4M3) weights, per-token dynamic FP8 activations. Data-free — no calibration set.
Quantized: all Linear modules in the 64 decoder layers' MLPs and the 16 full-attention layers' q/k/v/o_proj.
Kept in bf16 on purpose:
| Component | Why |
|---|---|
linear_attn.* (Gated DeltaNet, 48 layers) |
quantizing the recurrent block roughly doubles KL on this architecture and can cause thinking loops / multi-turn drift |
visual.* |
vision tower and merger |
lm_head |
standard |
mtp.* |
MTP head, re-grafted from bf16 after quantization so speculative decoding works |
The MTP Linears are listed in quantization_config.ignore so vLLM loads them as bf16 rather than looking for scales that don't exist.
Evaluation
| Refusals (100 harmful) | KL vs. bf16 abliterated | |
|---|---|---|
| bf16 abliterated (source) | 6 / 100 | — |
| FP8-DYNAMIC (this repo) | {{fp8.refusals}} | {{fp8.kl}} |
Method: Heretic --evaluate-model against the bf16 abliterated checkpoint, non-thinking mode. KL under 0.01 is imperceptible; under 0.05 is good.
Chain of provenance for the full picture: original ThinkingCap refuses 97/100; the bf16 abliteration brings that to 6/100 at KL 0.065 vs. original; this quantization adds the KL above on top of that.
Usage
vLLM (recent release; cu130 wheels on DGX Spark)
vllm serve IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC \
--reasoning-parser qwen3 \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
--max-model-len 65536 --gpu-memory-utilization 0.85
KV cache: only the 16 full-attention layers have one, so the FP8 KV cache (--kv-cache-dtype fp8) buys less than on a dense model. Leave it at auto unless you're memory-bound; if you do enable it, fp8_e5m2 needs no scales.
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"} — xhigh (default, recommended), medium, or low.
Transformers loads it too (dequantized to bf16 on load, so it needs the full ~56 GB):
from transformers import AutoModelForImageTextToText
m = AutoModelForImageTextToText.from_pretrained("IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC", device_map="cuda")
Not for llama.cpp — this is compressed-tensors format. GGUF builds are made separately from the bf16 source.
Reproduce
from llmcompressor import oneshot
from llmcompressor.modifiers.quantization import QuantizationModifier
recipe = QuantizationModifier(
targets="Linear", scheme="FP8_DYNAMIC",
ignore=["lm_head", "re:.*visual.*", "re:.*linear_attn.*"],
)
oneshot(model=model, recipe=recipe)
# then copy mtp.* from the bf16 checkpoint and add the MTP Linears to quantization_config.ignore
Limitations
Everything from the bf16 card applies: no safety filter, 6/100 residual refusals, thinking mode not separately evaluated. You are the safety layer.
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). Commercial use beyond the PolyForm terms: contact BottleCap AI.
Credits
bottlecapai (ThinkingCap) · MuXodious (abliteration adapter) · p-e-w/heretic · vllm-project/llm-compressor · Qwen team
- Downloads last month
- -
Model tree for IstroSec/ThinkingCap-Qwen3.8-27B-abliterated-FP8-DYNAMIC
Base model
IstroSec/ThinkingCap-Qwen3.8-27B-abliterated