license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen4-35B-A3B/blob/main/LICENSE
base_model: OpenUncensored/Qwen4-35B-A3B-Uncensored
base_model_relation: quantized
pipeline_tag: image-text-to-text
library_name: vllm
language:
- en
tags: - uncensored
- qwen4
- moe
- mxfp4
- fp8
- w4a8
- compressed-tensors
- rdna4
- rocm
Qwen4-35B-A3B-Uncensored, MXFP4 W4A8 (compressed-tensors)
A 4-bit conversion of OpenUncensored/Qwen4-35B-A3B-Uncensored
(itself Qwen/Qwen4-35B-A3B with refusals removed by directional ablation).
106 GB BF16 → 60 GB. Made for, and tested on, AMD Radeon AI PRO R9700 (RDNA4, gfx1201) with mainline vLLM plus
vllm_r9700_mod.
Format
compressed-tensors mxfp4-pack-quantized:
- Weights: OCP MXFP4 (E2M1 values, one E8M0 scale per 32 values), round-to-nearest, no calibration data. Per block
the shared exponent is the OCP rule or one step above it, whichever gives the lower squared error. - Activations: FP8 E4M3, dynamic per-token scales (W4A8).
- Quantized: attention
q/k/v/o_proj, Gated DeltaNetin_proj_qkv,in_proj_z,out_proj, shared expert and all
256 routed experts (fused expert tensors split per expert). - Kept BF16:
lm_head, embeddings, the n-gram embedding table, vision tower, MTP head, router and shared-expert
gates, DeltaNetin_proj_a/bandconv1d, sparse-attention indexer, gated-residual mixers.
Produced with tools/quantize_mxfp4.py.
Serving on R9700 (RDNA4)
Upstream vLLM has no RDNA4 kernels for this format (it emulates, and drops the FP8 activations in the MoE). The
vllm_r9700_mod plugin adds them. Build its Docker image, then:
docker run --rm -it --device /dev/kfd --device /dev/dri --group-add video \
--security-opt seccomp=unconfined --ipc host --shm-size 32g -p 8000:8000 \
-v /path/to/models:/models:ro vllm-r9700-mod \
/models/Qwen4-35B-A3B-Uncensored-MXFP4-W4A8 --trust-remote-code \
--max-model-len 1048576 --max-num-seqs 16 --gpu-memory-utilization 0.92 --reasoning-parser qwen4
With two GPUs visible the image adds --tensor-parallel-size 2 on its own (plain TP measured faster than TP + expert
parallel here). On one 32 GB card use --max-model-len 65536 (a 1M-token KV cache needs ~21 GB). Mount a volume at/root/.cache/vllm so compiled kernels and the plugin's kernel tuning survive restarts.
Important on any ROCm vLLM image: set DEBUG_CLR_DEVICE_ORDERING_EDGE=0 and HSA_ENABLE_IPC_MODE_LEGACY=0
(the plugin does this automatically). The image defaults make every HIP-graph kernel ~10× slower on RDNA4 and break
RCCL between cards.
Measured on R9700s capped at 210 W, vLLM default graph sizes, real concurrent requests (200 output tokens each),
aggregate output tok/s, no speculative decoding:
| Setup | Context | 1 | 4 | 8 | 9 | 16 |
|---|---|---|---|---|---|---|
| 2× R9700, TP2 | 1M | 94 | 294 | 496 | 490 | 762 |
| 1× R9700 | 64k | 82 | 243 | 114 | 352 | 500 |
Prefill (single request): 2× R9700 TP2 at 1M context, 5.1–5.4k tok/s for 1k–30k-token prompts, 5.0k at 100k,
4.7–4.9k at 250k; 1× R9700 about 3.2–3.4k tok/s.
Known issue: on each launch some captured decode graphs run slowly (~14 tok/s per stream at the concurrency levels
that use them; which ones changes per launch). Being worked on in the plugin repo. MTP speculative decoding (1 draft
token) was slower end to end on this setup, so it is off above.
On other GPUs, whether this loads fast depends on vLLM's MXFP4 W4A8 support for that hardware.
Quality
Not formally evaluated after quantization: no KL, MMLU or refusal re-measurement yet. Outputs were checked by hand for
coherence. The base model's card notes that 4-bit routed experts could weaken the refusal edit; that has not been
measured here either. See the base model card for its
evaluation, chat settings (reasoning_effort) and caveats.
Credits and license
- Qwen: the original model.
- OpenUncensored: the refusal ablation.
- This repo only changes the numeric format. Apache 2.0, as the originals.
This model will follow requests the original refuses. You are responsible for how you use it.