Complete weights for direct download; pinned reconstruction and adaptation guidance included
The complete checkpoint is uploaded in this repository: 124 model shards, four MTP shards, the Safetensors index, runtime configuration, tokenizer, and chat templates. After accepting the access terms, users can download the repository and load or serve it directly with a compatible runtime; rebuilding from a separate base model is not required. An agent connects to an inference server that has loaded the checkpoint—not to the raw model files themselves.
The repository also includes a tested deterministic builder for reconstructing this exact checkpoint from the pinned QuantTrio/GLM-5.2-Int4-Int8Mix base, plus technical documentation of the direction-recovery method, transplant formula, quantization codec, and validation criteria. That documentation records how this checkpoint was produced and provides a technical reference for adapting the process to another compatible compressed-tensors W8 group-128 variant with matching architecture and tensor layout. This is not an automated cross-variant workflow: the repository does not include a generic direction-extraction script or a drop-in builder, and the included builder and manifests are pinned to the named base revision.
This repository therefore provides both distribution paths:
- Direct use: approximately 405.5 GB of complete, ready-to-load model shards, MTP shards, index, configuration, tokenizer, and chat templates.
- Independent reconstruction: the direction vectors, relative magnitudes, and deterministic builder needed to reproduce the checkpoint from the pinned QuantTrio base, together with technical documentation of the full method.
What is this?
Huihui-ai produced an abliterated GGUF of GLM-5.2 by suppressing refusal-related
weight directions in the attention output projections. This kit transplants
those directions into QuantTrio's compressed-tensors W8 pack-quantized format,
which loads natively with the transformers library.
In Huihui's language, this is an uncensored version of GLM-5.2 created with
abliteration. This repository adapts that intervention to the pinned QuantTrio
checkpoint rather than redistributing Huihui's GGUF weights.
Specifically:
- Ablation directions and relative magnitudes were recovered by comparing the
Huihui abliterated GGUF
(pinned revision
2f0aff2760627f87faf16f8adc81caca7d7b10f6) against the
Unsloth stock GGUF
(pinned revision abc55e72527792c6e77069c99b4cb7de16fa9f23) via top-2
randomised SVD on the blk.{13..77}.attn_output.weight tensors.
- Those directions were transplanted into the
QuantTrio W8 base
(pinned revision
1d3bcfe5ec549ecd000fd80b37f191183842e983) using fresh
group-128 requantization and validated against 65 numerical gates.
The resulting model is not byte-identical to the Huihui GGUF. The edit
magnitude uses a uniform scale factor of 1.75, which was the minimum tested
value that passed all 65 frozen W8 numerical gates. Factor 1.0 reproduced
the original Huihui magnitude but fell below the group-W8 reliable edit
resolution; factor 1.6 still failed layer 23.
Credits
Usage warning
This model has reduced safety filtering. It can generate sensitive, controversial,
inappropriate, harmful, unsafe, or illegal content. It is not suitable for
deployment to minors, public-facing services, or high-security contexts without
additional controls. Users are solely responsible for all outputs and for
compliance with local laws and ethical standards. Research, testing, and
controlled internal use with monitoring and manual review are recommended.
There are no default safety guarantees. No warranty or liability is provided.
Numerical validation
The builder applies 65 independent frozen W8 gates (one per edited layer).
Gates require:
- Cosine similarity between requested and actual delta >= 0.99
- Relative RMSE <= 0.15
- Orthogonal leakage / requested norm <= 0.15
All 65 gates passed. The worst-performing layer was layer 46:
- Cosine: 0.9907504192
- Relative RMSE: 0.1369091172
- Leakage / requested: 0.1367936930
Summary: 65 layers edited, 130 tensor payloads modified (weight_packed and
weight_scale), 177,439 tensors byte-identical to the pristine QuantTrio base.
Behavioral validation
These results are specific to this build and the test corpus used. They are
not a universal guarantee.
A 32-question refusal corpus was evaluated:
- 32 / 32 questions bypassed (no refusals)
- Capability score: 11 / 12 (the same question was missed by unmodified stock GLM-5.2)
Direct download and serving
Accept the repository access terms on Hugging Face, then download the complete checkpoint:
hf download 0xdfi/GLM-5.2-QuantTrio-Abliterated \
--local-dir ./GLM-5.2-QuantTrio-Abliterated
The download contains 124 model shards, four MTP shards, model.safetensors.index.json, runtime configuration, tokenizer files, and chat templates. Reserve at least 430 GB of free disk space for the download and additional space required by your runtime.
Point a GLM-5.2 inference runtime that supports QuantTrio's compressed-tensors INT4/INT8Mix checkpoint format at the downloaded directory. After the inference server is healthy, point your agent at that server's OpenAI-compatible endpoint and use the served model name. Raw weights are not themselves an agent endpoint; the inference server is the layer between the model files and the agent.
Runtime flags, tensor/context parallelism, memory limits, and maximum context depend on the target hardware. Do not copy the four-DGX-Spark production profile onto unrelated hardware without validating memory and backend compatibility.
Rebuild instructions
You need approximately 820 GiB free disk space on a single filesystem.
Step 1: Install dependencies
pip install -r requirements.txt
Step 2: Fetch the QuantTrio base
hf download QuantTrio/GLM-5.2-Int4-Int8Mix \
--revision 1d3bcfe5ec549ecd000fd80b37f191183842e983 \
--local-dir ./base
Step 3: Build
python build.py \
--base-dir ./base \
--output-dir ./output \
--chunk-rows 512
The builder will:
- Parse the base index and identify the 65 target layers (self_attn.o_proj, layers 13-77).
- Hash the target shards to verify against the manifest.
- Copy the entire base tree byte-by-byte to the output directory.
- Patch the 130 target tensor payloads (weight_packed and weight_scale per layer)
using fresh group-128 requantization.
- Verify all edited and unchanged tensors.
- Write
output/BUILD_RECEIPT.json.
- Print
PASS on success.
Alternatively, let the builder download the base automatically:
python build.py --download-base --output-dir ./output --chunk-rows 512
Step 4: Verify
python -c "
import json
r = json.load(open('output/BUILD_RECEIPT.json'))
assert r['passed'], r
print('PASS: edited', r['edited_tensors'], 'tensors')
"
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("./output", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("./output", trust_remote_code=True)
The output directory is a complete model tree in compressed-tensors W8 format,
identical to the QuantTrio base except for the 130 edited tensor payloads.
Repository contents
model-00001-of-00124.safetensors
... # 124 complete model shards
model-00124-of-00124.safetensors
mtp-00001-of-00004.safetensors
... # 4 complete MTP shards
mtp-00004-of-00004.safetensors
model.safetensors.index.json
config.json
configuration.json
generation_config.json
tokenizer.json
tokenizer_config.json
chat_template.jinja
chat_template_original.jinja
build.py # Agent-facing wrapper (constructs manifest, runs builder)
repair_builder_v4.py # Reviewed fail-closed CPU-only builder (do not modify)
requirements.txt
recipe/
refusal_dirs.safetensors # FP32 ablation direction vectors, layers 13-77
huihui_mag.json # Per-layer relative magnitudes
manifest.json # Provenance and numerical contract
docs/
TECHNICAL_REPRODUCTION.md # Full acquisition and validation workflow
tests/
test_repair_builder_v4.py # Frozen builder tests
test_public_wrapper.py # Wrapper tests
LICENSE
NOTICE.md
AGENTS.md
Technical details
The edit formula for each layer L is:
W*_L = W_qt,L - lambda_final_L * d_L (d_L^T W_qt,L)
where:
d_L is the unit-normalised ablation direction recovered from the Huihui/Unsloth diff
qt_mag1_L = ||d_L^T W_qt,L||_2 / ||W_qt,L||_F (projection of QuantTrio matrix onto direction)
lambda_match_L = m_L / qt_mag1_L (scale to match Huihui relative magnitude)
lambda_final_L = 1.75 * lambda_match_L
m_L is the per-layer relative magnitude from recipe/huihui_mag.json
After editing, the float32 result is requantized using the compressed-tensors
group-128 W8 codec: fresh amax-based BF16 scales are stored before quantization,
then weights are divided by the restored BF16 scale, clamped to [-128, 127],
rounded to nearest even, converted to q+128 unsigned bytes, and packed
little-endian into int32 lanes.
The builder is CPU-only, uses no network during the build phase, creates no
hardlinks or symlinks, writes through fsynced temporary files with atomic
rename, and operates under an exclusive fcntl lock with crash-recoverable
checkpoint state. See docs/TECHNICAL_REPRODUCTION.md for the full
acquisition and validation procedure.