zer0like/Qwen3.8-27B-think-pi-heretic-mtp is a full-precision (bfloat16) multimodal (Qwen3_5ForConditionalGeneration) checkpoint built by combining:
Qwen/Qwen3.8-27Bharness-hub/Qwen3.8-27B-think-pi-adapted merged into the BF16 base weightsHeretic v2.1.0 using Arbitrary-Rank Ablation (ARA) on top of the merged checkpointmtp.* tensors (mtp_num_hidden_layers: 1, model-mtp.safetensors) stripped during transformers .save_pretrained() were restored from Qwen/Qwen3.8-27B for speculative decoding / Lightning MTP supportApple Silicon (
oMLX) Quantized Version:zer0like/Qwen3.8-27B-think-pi-heretic-oQ6h-mtp
harness-hub/Qwen3.8-27B-think-pi-adapted LoRA ($r = 32$, $\alpha = 64$), RL-trained inside the pi coding agent with thinking enabled for substantially fewer reasoning tokens and tool-call steps on software engineering tasks.KL = 0.0733): Chosen at the Pareto knee (Trial 32 out of 318 Optuna trials) rather than pushing refusals to 0/100 at the cost of KL >= 0.24, preserving coding accuracy, math notation, and thinking behavior.AutoModelForImageTextToText / AutoProcessor) and the 1-layer native Multi-Token Prediction draft head (model-mtp.safetensors).Modified with Heretic v2.1.0 (heretic.modifiers.ara.ARA, preserve_row_magnitudes = true, lora_rank = 50) in bfloat16 (quantization = "none"):
Trial 32 / 318 trials)| Parameter | Value |
|---|---|
start_layer_index |
31 |
end_layer_index |
62 |
preserve_good_behavior_weight |
0.4355 |
steer_bad_behavior_weight |
0.0008 |
overcorrect_relative_weight |
0.9562 |
neighbor_count |
10 |
Qwen3.8-27B-think-pi)| Metric | This Model (Trial 32) |
Pre-Heretic Baseline |
|---|---|---|
Refusals (mlabonne/harmful_behaviors) |
28 / 100 | 98 / 100 |
KL divergence (mlabonne/harmless_alpaca) |
0.0733 | 0 (by definition) |
(Note: Pushing refusals lower to 0–14/100 on this RL-adapted checkpoint required KL = 0.24–0.33, which noticeably degraded output quality. Note also that the restored mtp.* weights come from the base Qwen/Qwen3.8-27B checkpoint and were not re-tuned on the merged/abliterated weights.)
bfloat16)import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "zer0like/Qwen3.8-27B-think-pi-heretic-mtp"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "user", "content": [{"type": "text", "text": "Write a concise Python async TCP proxy."}]}
]
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=1024)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
oMLX)For local Apple Silicon inference with MTP speculative decoding, you can either use the pre-quantized zer0like/Qwen3.8-27B-think-pi-heretic-oQ6h-mtp build or quantize this BF16 model directly in oMLX (Models > oQ Quantization) with Preserve MTP weights enabled.
model-00005-of-00012.safetensors 4.6 GiBmodel-00008-of-00012.safetensors 4.6 GiBmodel-00011-of-00012.safetensors 4.6 GiBmodel-00003-of-00012.safetensors 4.6 GiBmodel-00009-of-00012.safetensors 4.6 GiBmodel-00010-of-00012.safetensors 4.6 GiBmodel-00007-of-00012.safetensors 4.6 GiBmodel-00006-of-00012.safetensors 4.6 GiBmodel-00004-of-00012.safetensors 4.6 GiBmodel-00002-of-00012.safetensors 4.5 GiBmodel-00012-of-00012.safetensors 2.6 GiBmodel-00001-of-00012.safetensors 2.4 GiBmodel-mtp.safetensors 810 MiBQwen/Qwen3.8-27B