← back to catalog · registered 2026-10-29 16:01

FrostWolfAI/Spark-X2.6-4B-abliterated

Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/FrostWolfAI%2FSpark-X2.6-4B-abliterated"
Response includes
  • classification m1
  • files 16
  • author_summary 2 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M1
Primary method

Direct removal

No other method signals detected in this model.
Confidence
MEDIUM
Why this label 3 signals
Method inferred from partial signals - repository name, related files, or tag patterns. Producer identity not confirmed; label may sharpen or shift as we gather more evidence.
  • 'abliterated' in name/tags
  • is_gguf=0 (base model)
  • no specific method indicators - defaulting to M1 (most common)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
MEDIUM
Why we say so
primary_method=M1; difference-of-means is the reference extraction for M1/M3 (Arditi 2024)
Downloads · 30-day
0
Likes
0
Model age
today
created 2026-10-29

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Variants by this author 2 formats · 0 downloads combined

The same weights this author released in different packaging. Pick the format that matches your runtime.

Metadata

License
apache-2.0
Languages
en zh
Tags
transformers safetensors spark2_5 text-generation spark sparkx2_5 spark-x2.6 on-device agentic tool-calling reasoning heretic

Related

Total size
7.66 GB
Files
16
Quantizations
1
Registered
2026-10-29 16:01
Last updated on HF
2026-10-29 16:05

Files by quantization

Auxiliary files 16 files 7.67 GB
model-00001-of-00002.safetensors 4.63 GB 618c7df2 download
model-00002-of-00002.safetensors 3.03 GB 0d6674e8 download
tokenizer.json 9.65 MB f3ae6d33 download
vocab.json 2.89 MB 9cca33b9 download
merges.txt 1.50 MB 3f921c3a download
model.safetensors.index.json 23.9 KB fbb51047 download
modeling_spark.py 20.0 KB a0b8ef0c download
LICENSE 11.1 KB b7456707 download
README.md 9.68 KB e7c2db34 download
tokenizer_config.json 5.70 KB 3744e6bd download
chat_template.jinja 5.58 KB f0a835dd download
configuration_spark.py 4.23 KB cca611a0 download
config.json 2.13 KB 18c8384c download
.gitattributes 1.48 KB a6344aac download
generation_config.json 281 B d47d1131 download
special_tokens_map.json 156 B 9a77af52 download

README current version from Hugging Face


license: apache-2.0
language:

  • en
  • zh
    library_name: transformers
    pipeline_tag: text-generation
    base_model: XHToken/Spark-X2.6-4B
    base_model_relation: quantized
    tags:
  • spark
  • sparkx2_5
  • spark-x2.6
  • on-device
  • agentic
  • tool-calling
  • reasoning
  • heretic
  • ara
  • uncensored
  • decensored
  • abliterated
  • reproducible
  • local-llm

Spark-X2.6-4B-abliterated

A decensored variant of XHToken/Spark-X2.6-4B, produced with
Heretic v2.0.0.dev0 using Arbitrary-Rank Ablation (ARA).
Spark-X2.6's architecture is untouched - 36 layers in a 3:1 pattern of sliding-window (512) and global
attention, head-wise sigmoid attention gates, fused QKV, tied embeddings and the 1,048,576-token context -
along with its DeepSeek-style chat template, controllable thinking and <tool_call> format. Refusal
behaviour is suppressed with a low-rank weight edit to the attention output projections (out_proj) and
MLP down-projections of layers 9-19, not by fine-tuning.

Who this is for: local agents, coding and security research on a single consumer GPU or a laptop.
Spark-X2.6-4B is XHToken's post-trained 4B on-device model, built for coding, agentic tool use and
long-context work, with a configurable thinking budget (none / low / high). The abliteration removes
refusals; it does not add capability.

Refusals drop from 100/100 to 2/100 at a KL divergence of 0.0177 - a tight edit with little drift
in phrasing or format on harmless prompts.

Abliteration parameters

Trial 46 of a 60-trial Heretic v2 run (seed 2026102902), modifier heretic.modifiers.ara.ARA.

Parameter Value
start_layer_index 9
end_layer_index 19
preserve_good_behavior_weight 0.8871
steer_bad_behavior_weight 0.0004
overcorrect_relative_weight 0.9891
neighbor_count 4

ARA settings were Heretic v2 defaults: LoRA rank 50, row magnitudes preserved
(magnitude-preserving orthogonal ablation), merged into the BF16 weights at export.

Performance

Metric This model Original model (XHToken/Spark-X2.6-4B)
KL divergence 0.0177 0 (by definition)
Refusals 2/100 100/100

Heretic's numbers are measured on mlabonne/harmful_behaviors (test[:100]) for refusals and
mlabonne/harmless_alpaca (test[:100]) for first-token KL divergence, with the thinking block closed.
The base model refused every one of the 100 evaluation prompts; 98 of them now clear.

Thinking on vs. off

Spark-X2.6 thinks by default, and a reasoning model can talk itself back into a refusal inside <think>.
We checked both modes on the first 40 held-out harmful_behaviors test prompts with greedy decoding:

Mode Refusals
enable_thinking=False (150 new tokens) 0/40
enable_thinking=True (1,200 new tokens) 0/22 that finished reasoning (18 were still thinking at the token cap)

Benign coding and explanation prompts stayed coherent and on-format in both modes.

Why abliteration instead of fine-tuning

Fine-tuning a "helpful" persona on top of RLHF'd refusals fights the base model's training and tends to
degrade coherence. Abliteration instead finds and edits the specific weight directions responsible for
refusal, leaving the rest of the network (and its capabilities) untouched. Heretic v2's ARA goes beyond
classic single-direction ablation: it optimizes a low-rank edit that steers harmful-prompt activations
toward harmless ones while explicitly preserving behaviour on harmless prompts, which handles refusal
spread over several directions. See the Heretic repo and the
original abliteration writeup for the mechanism.

Files

Safetensors

File Size
model-00001-of-00002.safetensors 4.97 GB
model-00002-of-00002.safetensors 3.25 GB

BF16, 4,112,079,360 parameters (4.11B). The reproduce/ directory carries the full Heretic recipe -
config.toml, requirements.txt, the Optuna study journal, reproduce.json and SHA-256 sums - so this
exact model can be regenerated. See reproduce/README.md.

GGUF quantizations

Coming soon to this repository. spark2_5 is supported by upstream
llama.cpp; you will need a recent build.

Quickstart

# transformers >= 5 (the checkpoint ships custom code)
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "FrostWolfAI/Spark-X2.6-4B-abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name, device_map="auto", dtype="bfloat16", trust_remote_code=True
)

messages = [{"role": "user", "content": "Explain how a TLS 1.3 handshake works."}]
inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    enable_thinking=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)
out = model.generate(
    **inputs, do_sample=True, temperature=1.0, top_p=0.95, top_k=0, max_new_tokens=4096
)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

[!IMPORTANT]
The upstream Spark-X2.6-4B code targets transformers==4.57.1. The modeling_spark.py shipped here is
patched for transformers 5.x (tied-weights dict, inputs_embeds mask keyword, hidden_states
output). It was tested with transformers 5.21.1. The weights are identical in layout to the original,
so SGLang and vLLM recipes from the base model card
apply unchanged.

Generation parameters

XHToken's recommended settings (also in generation_config.json):
temperature=1.0, top_p=0.95, top_k=0 (disabled), repetition_penalty=1.0.

Chat template and thinking

Spark uses DeepSeek-style turn markers (<|start▁of▁sentence|><|User|>...<|Bot|>). Thinking is on by
default and arrives in a <think>...</think> block. Control it per request:

  • enable_thinking=False - no reasoning, direct answer
  • reasoning_effort="low" / "high" (default) - reasoning budget

With an OpenAI-compatible server, pass them via "chat_template_kwargs", e.g. {"enable_thinking": false}.

Tool use

Pass function schemas with tools=... to tokenizer.apply_chat_template(). Note that the template
requires tool_calls[].function.arguments as a dict, not a JSON string. Calls come back as:

<tool_call>get_weather<arg_key>city</arg_key><arg_value>Paris</arg_value></tool_call>

Feed results back under a tool role; they are rendered inside <tool_response>...</tool_response>.
Servers: SGLang --tool-call-parser spark25 --reasoning-parser qwen3.

Runs anywhere

Device Recommended format Weights
RTX 3090 / 4090 / 5090 (24 GB+) BF16 safetensors 8.22 GB
RTX 3060 / 4060 (8-12 GB) GGUF Q6_K / Q8_0 (coming soon) ~3.4-4.4 GB
Laptop / Apple Silicon (16 GB) GGUF Q4_K_M / MLX 4-bit (coming soon) ~2.5 GB

Weights only. Three of every four layers use a 512-token sliding window, so the KV cache grows far more
slowly than in a pure global-attention 4B - but at the full 1M-token window it is still a server workload.

Model details

Architecture Spark2_5ForCausalLM (model_type: spark2_5, custom code)
Parameters 4.11B
Layers 36: 27 sliding-window attention + 9 global attention (3:1 pattern)
Attention 16 heads / 4 KV heads, head dim 256, fused QKV, head-wise sigmoid output gate
Hidden / intermediate 2560 / 10240, GELU MLP
Position embedding RoPE; global layers theta 5e6 with partial rotary 0.25, sliding layers theta 1e4 (full rotary)
Sliding window 512
Context length 1,048,576
Vocab 131,072
Embeddings Tied (no separate lm_head tensor)
Precision bfloat16
Languages English, Chinese
Base model XHToken/Spark-X2.6-4B (commit d1b5f26)

Responsible use

Refusal suppression is deliberate and works as intended: this model will comply with requests the base
model would refuse, including some it should not. There is no safety filtering layered on top. You are
responsible for how you deploy it - don't put it behind an unmoderated public-facing endpoint serving
third parties. It inherits Spark-X2.6-4B's factual limitations; abliteration removes refusal directions,
it does not add capability or judgment.

Made by FrostWolfAI - the uncensored base behind the upcoming
Frost Cyber Mini 1.1.

License

Apache-2.0, inherited from XHToken/Spark-X2.6-4B.

Related

Abliteration hardware

Recorded in reproduce/reproduce.json:

  • GPU: NVIDIA GeForce RTX 4090 (23.99 GB VRAM), power-limited to 360 W
  • OS: Windows 11 Pro
  • CUDA / driver: CUDA 13.2, driver 617.42
  • Software: PyTorch 2.15.0, Transformers 5.21.1, Heretic 2.0.0.dev0 (git efb1be6)

Heretic notes that KL-divergence and refusal numbers can vary slightly with hardware and library versions.

Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration