base_model: electroglyph/Spark-X2.6-4B-uncensored
base_model_relation: quantized
license: apache-2.0
library_name: mlx
pipeline_tag: text-generation
language:
- en
- zh
tags: - mlx
- omlx
- spark2_5
- oq4e
- abliterated
- uncensored
- heretic
- apple-silicon
- quantization
Spark-X2.6-4B Abliterated — MLX oQ4e (FP16 source)
This is an MLX/oMLX oQ4e quantization by xunlinkx of electroglyph/Spark-X2.6-4B-uncensored, a community abliterated derivative of the official XHToken/Spark-X2.6-4B. It is not an official XHToken release.
The Electroglyph source was produced with Heretic 2.0.0.dev0 Arbitrary-Rank Ablation (ARA) and includes reproducibility assets. Its model card reports 6 refusals in 100 prompts and KL divergence 0.0027 against the original model. These are the source author’s reported measurements; this quantized checkpoint has not been independently evaluated on that refusal set. See the source model card and its reproduction instructions for details.
Quantization details
- Source checkpoint: BF16; converted to FP16 before quantization. The
-fp16suffix identifies the quantization input format. - Method: oMLX enhanced quantization with 128 calibration samples, sequence length 512, and affine quantization (group size 64).
- Quantization: 4-bit enhanced mixed precision.
- Per-layer layout: 4-bit base weights; all 36 attention gates (
self_attn.g_proj) are 8-bit, and fused Q/K/V projections plus MLP down projections are 6-bit. Full layout is embedded inconfig.json. - Architecture:
spark2_5. - License: Apache-2.0, inherited from the upstream model lineage. See Electroglyph’s repository and the official XHToken project.
Intended use and safety
This variant is intended for users who want less refusal behavior than the original model. “Uncensored” describes the intended behavior; abliteration describes the weight-modification method. It is not guaranteed to answer every request. Reduced refusal behavior also means you should provide your own moderation, access controls, and review if you make it available to others.
The smallest of this set, intended for Apple Silicon with a tighter unified-memory budget, including 8 GB Macs. Context length and other running apps affect memory use.
Apple Silicon and loading
Prepared for MLX on Apple Silicon, including M1 through M6. FP16 source weights were chosen for broad compatibility across generations; FP16-derived quantized models are suitable on M3 and newer as well. Use a current oMLX or MLX-LM version with spark2_5 architecture support. The quantization metadata is stored in config.json.
mlx_lm.generate \
--model xunlinkx/Spark-X2.6-4B-Abliterated-Uncensored-MLX-oQ4e-fp16 \
--prompt "What is the capital of Anhui Province?" \
--max-tokens 256 \
--temp 1.0 \
--top-p 0.95
The upstream Spark card recommends temperature 1.0 and top-p 0.95. Consult it for chat-template and thinking-budget settings supported by your runtime.
Local smoke check
A short generation prompt loaded and ran successfully for this checkpoint: 16 generated tokens; MLX reported 2.859 GB peak memory. This confirms basic loading and generation only; it is not a quality benchmark, hardware compatibility survey, or independent test of the source model’s refusal behavior.
Attribution
The original model is by the SparkLLM team at XHToken. Heretic ablation and the uncensored source derivative are by Electroglyph. This repository contains only xunlinkx’s MLX/oMLX quantization of that derivative.