base_model: electroglyph/Qwen4-35B-A3B-uncensored
library_name: transformers
quantized_by: Intel AutoRound
scheme: W4A16
format: auto_round
Qwen4-35B-A3B-uncensored-AutoRound-W4A16-G128
This uncensor kinda sucks, it's barely uncensored, this is mostly for my personal use right now, for generating training data for a better heretic refusal classifier
AutoRound W4A16G128 (4-bit weights / 16-bit activations, group_size=128, symmetric)
quantization of electroglyph/Qwen4-35B-A3B-uncensored.
- Tool: Intel AutoRound (
scheme="W4A16",format="auto_round") - Real SignRound tuning on calibration data (not RTN).
- Vision and PLE/engram tensors retain their source precision and values.
- Calibration with
HuggingFaceH4/ultrachat_200k:num=96,nvidia/OpenCodeInstruct:num=32(nsamples=128, seqlen=1024, iters=1000).
Quantization config
{
"scheme": "W4A16",
"format": "auto_round",
"bits": 4,
"group_size": 128,
"sym": true,
"mixed_8bit_layer_patterns": [],
"nsamples": 128,
"seqlen": 1024,
"iters": 1000,
"lr": null,
"batch_size": 4,
"gradient_accumulate_steps": 4,
"dataset": "HuggingFaceH4/ultrachat_200k:num=96,nvidia/OpenCodeInstruct:num=32",
"device_map": "auto",
"model_dtype": "bf16",
"low_gpu_mem_usage": false,
"low_cpu_mem_usage": true,
"enable_torch_compile": false,
"seed": 42
}
Serve text on an RTX 3090 with vLLM
Use a separate Linux serving environment. This vLLM build supports the original
Qwen4 MoE architecture and reads the AutoRound weights directly.
The command disk-offloads the BF16 engrams and fits the context to available VRAM.
For CPU offload, use --engram-config '{"cpu_offload":true,"disk_offload":false}'
with the same checkpoint. The full BF16 engram table uses about 38.15 GiB of host RAM.
uv venv --python 3.12 .venv-vllm
source .venv-vllm/bin/activate
uv pip install https://wheels.vllm.ai/943e6dd49315e5d4329ef7e8df555a1f57af3633/vllm-0.35.0rc1.dev306%2Bg943e6dd49-cp38-abi3-manylinux_2_28_x86_64.whl
vllm serve electroglyph/Qwen4-35B-A3B-uncensored-AutoRound-W4A16-G128 --trust-remote-code --language-model-only --engram-config '{"disk_offload":true}' --enforce-eager --max-model-len auto --max-num-seqs 1 --max-num-batched-tokens 512
The Python example uses CPU offload.
from vllm import LLM, SamplingParams
llm = LLM(
model="electroglyph/Qwen4-35B-A3B-uncensored-AutoRound-W4A16-G128", trust_remote_code=True, language_model_only=True,
engram_config={"cpu_offload": True, "disk_offload": False}, enforce_eager=True,
max_model_len=-1, max_num_seqs=1, max_num_batched_tokens=512,
)
print(llm.generate(["Hello, my name is"], SamplingParams(max_tokens=32))[0].outputs[0].text)
Run with Transformers
pip install "transformers>=5.26.0" "auto-round>=0.17.0" tiktoken xgrammar
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("electroglyph/Qwen4-35B-A3B-uncensored-AutoRound-W4A16-G128", trust_remote_code=True)
model = AutoModelForMultimodalLM.from_pretrained(
"electroglyph/Qwen4-35B-A3B-uncensored-AutoRound-W4A16-G128", device_map="auto", dtype="auto", use_kernels=False
)