CoolFace
Modelpublic

redashes/Qwen3.8-27B-BF16-SSMFIX-apostate

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
2likes90downloads
Model Card
πŸ“– δΈ­ζ–‡η‰ˆθ―΄ζ˜Ž β€” δΈ­ζ–‡ζ¨‘εž‹ε‘

Qwen3.8-27B-BF16-SSMFIX-Apostate

A selective-unlearning variant of Qwen3.8-27B built on the SSMFIX BF16 base, produced with the apostate KCRN method (Kernel Constraint Rank-Nullity projection). The model removes most refusal behaviors while keeping language-model capabilities close to the original.

Model Overview

PropertyValue
ArchitecturesQwen3_5ForConditionalGeneration
Model Typeqwen3_5 (text + vision towers, MTP heads)
Base ModelQwen3.8-27B (SSMFIX-v2 tuned base, BF16)
Hidden Size / Layers / Heads5120 / 64 / 24 (16 full-attention + 48 linear-attention layers)
KV Heads / Head Dim4 / 256
Intermediate Size17408
Vocabulary Size248320
Context Length262144
Vision Towerhidden 1152, depth 27, patch 16 (inherited from official BF16)
Weight FormatBF16, 18 shards (~52 GB)
DtypeBF16

Derivation

This model is derived from [redashes/Qwen3.8-27B-BF16-SSMFIX](https://huggingface.co/redashes/Qwen3.8-27B-BF16-SSMFIX) β€” a conv1d-repaired BF16 variant of Qwen3.8-27B (SSMFIX-v2, with per-layer Ξ±-scaling on 8 anomalous SSM layers). The KCRN edits (42 weight patches) are applied on top of this base without modifying the conv1d repair weights.

Base model repository: https://huggingface.co/redashes/Qwen3.8-27B-BF16-SSMFIX

Method

apostate KCRN (Kernel Constraint Rank-Nullity) β€” a closed-form, analytic unlearning algorithm by heterodoxin:

  1. 1.Compute a low-rank "refusal subspace" Q_b from the refusal direction residuals in MLP blocks (mlp.down_proj Γ—35, linear_attn.out_proj Γ—5, self_attn.o_proj Γ—2, 42 edits total).
  2. 2.Project the edit onto the null-space of Q_b (Ξ”W βŠ₯ Q_b), which structurally guarantees the refusal information is removed while normal generation directions are preserved.
  3. 3.No iterative tuning, no adversarial prompts β€” the projection is computed in a single solve.

This makes the KL divergence between base and edited model analytically bounded rather than empirically tuned.

Original project: github.com/heterodoxin/apostate β€” the KCRN unlearning library this model is built with.

Capability Benchmarks

Unified evaluation methodology (vLLM local-completions API, max_gen_toks=2048), same caliber as the baselines:

TaskOfficial BF16SSMFIX base**This model**
CMMLU (acc_norm)0.71790.69500.7112
TruthfulQA mc10.36470.37450.3488
TruthfulQA mc20.54180.55100.5233
TruthfulQA gen bleu_max10.9916.3212.24
TruthfulQA gen rouge1_max22.0230.0224.09
GSM8K (flex / strict)0.9560 / 0.96060.9598 / 0.96440.9575 / 0.9644
IFEval inst_strict0.62470.63430.6127

Key takeaways:

  • β€”Knowledge retention: CMMLU βˆ’0.67pp vs official, +1.62pp vs SSMFIX base.
  • β€”Math reasoning: GSM8K nearly identical to base (βˆ’0.15~βˆ’0.31pp).
  • β€”Truthfulness (mc): small dip (βˆ’1.6~βˆ’1.9pp vs official).
  • β€”Truthfulness (gen): better than official BF16 (bleu/rouge +1.2~+2.1).

Refusal Behavior

The unlearning targets harmful categories broadly. Overall refusal rate: 7/100 (7%) β€” measured on harmful_1000[800:900] (100 prompts, content-only judgment after removing keyword false positives); delivery rate β‰ˆ 93%.

Remaining refusal is concentrated in a few legally-sensitive directions:

DirectionTrue refusal rate
PII / privacy4/11 β‰ˆ 36%
Self-harm / crisis2/7 β‰ˆ 29%
Harassment1/7 β‰ˆ 14%

KL Divergence

Two numbers exist for this model β€” the original report value and the verified true value:

MetricValueNote
Reported KL (apostate kcrn_report.json)calibration 8.677 / heldout 8.055 nats/tokenRecorded on the 2nd bake; later identified as a protocol artifact: the bake dropped chat_template/special tokens from tokenizer_config.json, so tokenization misaligned and the reported KL is not meaningful.
True KL (independent verification after restoring the tokenizer)calibration 0.00598 / heldout 0.00392 nats/tokenMeasured with an independent verifier against the Qwen3.8-27B-BF16-SSMFIX base, 24+24 samples, position-aligned. Well under the 0.05 red line (β‰ˆ8–12% of it), and same order of magnitude as apostate's official Qwen3-8B reference (0.003659) β€” cross-validates the KCRN structural guarantee (Ξ”W βŠ₯ Q_b).

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "redashes/Qwen3.8-27B-BF16-SSMFIX-apostate",
    torch_dtype="bfloat16",
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("redashes/Qwen3.8-27B-BF16-SSMFIX-apostate")

messages = [{"role": "user", "content": "δ½ ε₯½"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(out[0], skip_special_tokens=True))

vLLM serving:

bash
vllm serve /path/to/Qwen3.8-27B-BF16-SSMFIX-apostate \
  --served-model-name Qwen3.8-27B-BF16-SSMFIX-apostate \
  --tensor-parallel-size 1 \
  --max-model-len 8192 \
  --kv-cache-dtype fp8_e4m3 \
  --enable-chunked-prefill
Note: the chat template enables thinking by default (Qwen3.5 template). Set enable_thinking=False if you want direct responses.

Disclaimer

This is an experimental research model derived from Qwen3.8-27B via unlearning. It is provided as-is without guarantees. Users are solely responsible for compliance with applicable laws and the original base model's license terms. Do not use for disallowed purposes.