Instructions to use mlx-community/Qwen3.5-27B-heretic-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen3.5-27B-heretic-8bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Qwen3.5-27B-heretic-8bit") config = load_config("mlx-community/Qwen3.5-27B-heretic-8bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/Qwen3.5-27B-heretic-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.5-27B-heretic-8bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/Qwen3.5-27B-heretic-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use mlx-community/Qwen3.5-27B-heretic-8bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.5-27B-heretic-8bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/Qwen3.5-27B-heretic-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Qwen3.5-27B-heretic-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Qwen3.5-27B-heretic-8bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/Qwen3.5-27B-heretic-8bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
mlx-community/Qwen3.5-27B-heretic-8bit
This model was converted to MLX format from coder3101/Qwen3.5-27B-heretic using mlx-vlm version 0.3.12.
Qwen3.5-27B-heretic is a decensored/abliterated version of Qwen/Qwen3.5-27B, created using Heretic v1.2.0 with Magnitude-Preserving Orthogonal Ablation (MPOA).
Quantization Details
- Bits: 8
- Group size: 64
- Mode: affine
- Total size: ~29.5 GB
- Bits per weight: 8.627 (avg)
Vision encoder layers with dimensions incompatible with the group size are kept in bfloat16.
Key Features
- Vision + Text: Natively multimodal — accepts images and video as input
- Abliterated: Refusal rate reduced from 94% to 14% while maintaining low KL divergence (0.0653) from the original model
- Hybrid Architecture: Gated DeltaNet + Gated Attention layers (not standard transformer)
- Long Context: 262,144 token context window
- Thinking Mode: Supports
<think>reasoning (disabled by default in this conversion's chat template for faster interactive use; passenable_thinking=Trueto re-enable)
Use with mlx-vlm
pip install mlx-vlm
Text Generation
from mlx_vlm import load, generate
model, processor = load("mlx-community/Qwen3.5-27B-heretic-8bit")
prompt = "Hey, what's up?"
output = generate(model, processor, prompt, max_tokens=500, temperature=0.7)
print(output)
Vision (Image Understanding)
from mlx_vlm import load, generate
model, processor = load("mlx-community/Qwen3.5-27B-heretic-8bit")
output = generate(
model, processor,
prompt="Describe this image in detail",
image="path/to/image.jpg",
max_tokens=500,
temperature=0.3,
)
print(output)
CLI
# Text chat
mlx_vlm generate --model mlx-community/Qwen3.5-27B-heretic-8bit \
--prompt "Hello" --max-tokens 500 --chat
# Image + text
mlx_vlm generate --model mlx-community/Qwen3.5-27B-heretic-8bit \
--image photo.jpg --prompt "What do you see?" --max-tokens 500
Re-enabling Thinking Mode
The chat template defaults to thinking OFF for snappier interactive use. To re-enable <think> reasoning, pass enable_thinking=True when applying the chat template:
prompt = processor.tokenizer.apply_chat_template(
messages, add_generation_prompt=True, enable_thinking=True
)
Original Model
- Base: Qwen/Qwen3.5-27B
- Abliteration: coder3101/Qwen3.5-27B-heretic (Heretic v1.2.0, MPOA method)
- Parameters: 27B
- Architecture:
Qwen3_5ForConditionalGeneration(Vision-Language, Gated DeltaNet + Gated Attention)
- Downloads last month
- 191
8-bit